Skip to content

Commit 283e374

Browse files
authored
fix: add OpenAPIModelName for PackageManifest to fix oc explain (#3755)
1 parent 6176b63 commit 283e374

2 files changed

Lines changed: 152 additions & 120 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
Copyright Red Hat, Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1
18+
19+
// OpenAPIModelName returns the OpenAPI model name for this type.
20+
// This is used by openapi-gen to register the GVK extension.
21+
// The format matches what k8s.io/apimachinery/pkg/runtime.Scheme.ToOpenAPIDefinitionName would generate.
22+
func (PackageManifest) OpenAPIModelName() string {
23+
return "com.github.operator-framework.operator-lifecycle-manager.pkg.package-server.apis.operators.v1.PackageManifest"
24+
}
25+
26+
// OpenAPIModelName returns the OpenAPI model name for this type.
27+
// This is used by openapi-gen to register the GVK extension.
28+
// The format matches what k8s.io/apimachinery/pkg/runtime.Scheme.ToOpenAPIDefinitionName would generate.
29+
func (PackageManifestList) OpenAPIModelName() string {
30+
return "com.github.operator-framework.operator-lifecycle-manager.pkg.package-server.apis.operators.v1.PackageManifestList"
31+
}

0 commit comments

Comments
 (0)