Bugfix: OpenAPI generator should pass generate type extensions

Kubernetes-commit: ab5bcf6d2da5fc9cd2374e966f87e20a95d59ed6
This commit is contained in:
mbohlool 2017-04-11 15:32:19 -07:00 committed by Kubernetes Publisher
parent c44e920355
commit f8217a24e4
3 changed files with 9 additions and 0 deletions

View File

@ -3,3 +3,5 @@ reviewers:
- gmarek
- mbohlool
- philips
approvers:
- mbohlool

View File

@ -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,
}

View File

@ -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",
},
},
}
}