Skip to content

Commit

Permalink
fix: add support for Pod exec options in openapi generator
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa authored Jul 9, 2024
1 parent 6f1ae01 commit ef755d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kubernetes-model-generator/openapi/generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/getkin/kin-openapi/openapi3"
admissionV1 "k8s.io/api/admission/v1"
admissionV1Beta1 "k8s.io/api/admission/v1beta1"
coreV1 "k8s.io/api/core/v1"
apiextensionsV1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
apiextensionsV1Beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -56,6 +57,7 @@ func main() {
reflect.TypeOf(metaV1.ListOptions{}),
reflect.TypeOf(metaV1.PatchOptions{}),
reflect.TypeOf(metaV1.UpdateOptions{}),
reflect.TypeOf(coreV1.PodExecOptions{}),
reflect.TypeOf(metaV1.RootPaths{}),
reflect.TypeOf(metaV1.GroupKind{}),
}, "api-machinery-extra"},
Expand Down Expand Up @@ -181,6 +183,10 @@ func openApiKind(t reflect.Type) *openapi3.SchemaRef {
return &openapi3.SchemaRef{
Value: openapi3.NewIntegerSchema(),
}
case reflect.Int64, reflect.Uint64:
return &openapi3.SchemaRef{
Value: openapi3.NewInt64Schema(),
}
case reflect.Array, reflect.Slice:
// Byte-arrays as String (Fabric8)
if t.Elem().Kind() == reflect.Uint8 {
Expand Down

0 comments on commit ef755d9

Please sign in to comment.