mirror of https://github.com/k3s-io/k3s
Merge pull request #44368 from mbohlool/bugfix
Automatic merge from submit-queue Bugfix: OpenAPI generator should pass generate type extensions OpenAPI spec generator does not pass generated type extensions (using `x-kubernetes-` tags on types). This is already working for field extensions but not for types.pull/6/head
commit
23b666894d
|
@ -3,3 +3,5 @@ reviewers:
|
|||
- gmarek
|
||||
- mbohlool
|
||||
- philips
|
||||
approvers:
|
||||
- mbohlool
|
||||
|
|
|
@ -127,6 +127,7 @@ func (o *openAPI) buildDefinitionRecursively(name string) error {
|
|||
}
|
||||
if item, ok := o.definitions[name]; ok {
|
||||
schema := spec.Schema{
|
||||
VendorExtensible: item.Schema.VendorExtensible,
|
||||
SchemaProps: item.Schema.SchemaProps,
|
||||
SwaggerSchemaProps: item.Schema.SwaggerSchemaProps,
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ func (_ TestInput) OpenAPIDefinition() *openapi.OpenAPIDefinition {
|
|||
},
|
||||
},
|
||||
}
|
||||
schema.Extensions = spec.Extensions{"x-test": "test"}
|
||||
return &openapi.OpenAPIDefinition{
|
||||
Schema: schema,
|
||||
Dependencies: []string{},
|
||||
|
@ -385,6 +386,11 @@ func getTestInputDefinition() spec.Schema {
|
|||
},
|
||||
},
|
||||
},
|
||||
VendorExtensible: spec.VendorExtensible{
|
||||
Extensions: spec.Extensions{
|
||||
"x-test": "test",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue