This commit is contained in:
Ross Bryan 2022-09-19 17:53:24 -04:00
Родитель 3f4cc14bf4
Коммит 06ed245934
3 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -164,8 +164,8 @@ func (g *generator) generateExamples(outputDir string, s *Swagger) error {
body = g.exampleOpenShiftClusterListResponse()
case "#/definitions/OperationList":
body = g.exampleOperationListResponse()
case "#/definitions/InstallVersions":
body = g.exampleInstallVersions()
case "#/definitions/OpenShiftVersionList":
body = g.exampleOpenShiftVersionListResponse()
}
}

Просмотреть файл

@ -41,7 +41,7 @@ type generator struct {
exampleOpenShiftClusterCredentialsResponse func() interface{}
exampleOpenShiftClusterAdminKubeconfigResponse func() interface{}
exampleOpenShiftClusterListResponse func() interface{}
exampleInstallVersions func() interface{}
exampleOpenShiftVersionListResponse func() interface{}
exampleOperationListResponse func() interface{}
systemData bool
@ -120,7 +120,7 @@ var apis = map[string]*generator{
exampleOpenShiftClusterCredentialsResponse: v20220904.ExampleOpenShiftClusterCredentialsResponse,
exampleOpenShiftClusterListResponse: v20220904.ExampleOpenShiftClusterListResponse,
exampleOpenShiftClusterAdminKubeconfigResponse: v20220904.ExampleOpenShiftClusterAdminKubeconfigResponse,
exampleInstallVersions: v20220904.ExampleInstallVersionsResponse,
exampleOpenShiftVersionListResponse: v20220904.ExampleOpenShiftVersionListResponse,
exampleOperationListResponse: api.ExampleOperationListResponse,
xmsEnum: []string{"EncryptionAtHost", "FipsValidatedModules", "SoftwareDefinedNetwork", "Visibility"},

Просмотреть файл

@ -22,6 +22,7 @@ var proxyResources = []string{
"SyncIdentityProvider",
"MachinePool",
"Secret",
"OpenShiftVersion",
}
func Run(api, outputDir string) error {
@ -102,12 +103,12 @@ func Run(api, outputDir string) error {
if g.installVersionList {
s.Paths["/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/locations/{location}/listinstallversions"] = &PathItem{
Get: &Operation{
Tags: []string{"InstallVersions"},
Tags: []string{"OpenShiftVersions"},
Summary: "Lists all OpenShift versions available to install in the specified location.",
Description: "The operation returns the installable OpenShift versions as strings.",
OperationID: "InstallVersions_List",
Parameters: g.populateParameters(6, "InstallVersions", "Install Versions"),
Responses: g.populateResponses("InstallVersions", false, http.StatusOK),
OperationID: "OpenShiftVersions_List",
Parameters: g.populateParameters(6, "OpenShiftVersionList", "OpenShift Versions"),
Responses: g.populateResponses("OpenShiftVersionList", false, http.StatusOK),
},
}
}
@ -127,7 +128,7 @@ func Run(api, outputDir string) error {
}
if g.installVersionList {
names = append(names, "InstallVersions")
names = append(names, "OpenShiftVersionList")
}
if g.clusterManager {