Commit ab5bcf6d authored by mbohlool's avatar mbohlool

Bugfix: OpenAPI generator should pass generate type extensions

parent 2d023d96
...@@ -3,3 +3,5 @@ reviewers: ...@@ -3,3 +3,5 @@ reviewers:
- gmarek - gmarek
- mbohlool - mbohlool
- philips - philips
approvers:
- mbohlool
...@@ -127,6 +127,7 @@ func (o *openAPI) buildDefinitionRecursively(name string) error { ...@@ -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 { ...@@ -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 { ...@@ -385,6 +386,11 @@ func getTestInputDefinition() spec.Schema {
}, },
}, },
}, },
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-test": "test",
},
},
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment