mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Bugfix: OpenAPI generator should pass generate type extensions
This commit is contained in:
parent
2d023d967d
commit
ab5bcf6d2d
@ -3,3 +3,5 @@ reviewers:
|
|||||||
- gmarek
|
- gmarek
|
||||||
- mbohlool
|
- mbohlool
|
||||||
- philips
|
- philips
|
||||||
|
approvers:
|
||||||
|
- mbohlool
|
||||||
|
@ -127,6 +127,7 @@ func (o *openAPI) buildDefinitionRecursively(name string) error {
|
|||||||
}
|
}
|
||||||
if item, ok := o.definitions[name]; ok {
|
if item, ok := o.definitions[name]; ok {
|
||||||
schema := spec.Schema{
|
schema := spec.Schema{
|
||||||
|
VendorExtensible: item.Schema.VendorExtensible,
|
||||||
SchemaProps: item.Schema.SchemaProps,
|
SchemaProps: item.Schema.SchemaProps,
|
||||||
SwaggerSchemaProps: item.Schema.SwaggerSchemaProps,
|
SwaggerSchemaProps: item.Schema.SwaggerSchemaProps,
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ func (_ TestInput) OpenAPIDefinition() *openapi.OpenAPIDefinition {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
schema.Extensions = spec.Extensions{"x-test": "test"}
|
||||||
return &openapi.OpenAPIDefinition{
|
return &openapi.OpenAPIDefinition{
|
||||||
Schema: schema,
|
Schema: schema,
|
||||||
Dependencies: []string{},
|
Dependencies: []string{},
|
||||||
@ -385,6 +386,11 @@ func getTestInputDefinition() spec.Schema {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
VendorExtensible: spec.VendorExtensible{
|
||||||
|
Extensions: spec.Extensions{
|
||||||
|
"x-test": "test",
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user