We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 003349e + 4324f3b commit acd137cCopy full SHA for acd137c
build.go
@@ -247,15 +247,18 @@ func makeComponentSchemasMap(schemas *Schemas) map[string]interface{} {
247
248
for _, s := range *schemas {
249
scheme := make(map[string]interface{})
250
- scheme[keyType] = s.Type
251
- scheme[keyProperties] = makePropertiesMap(&s.Properties)
252
- scheme[keyRef] = s.Ref
253
254
- if s.XML.Name != "" {
255
- scheme[keyXML] = s.XML
256
- }
+ if s.Ref != "" {
+ scheme[keyRef] = s.Ref
+ } else {
+ scheme[keyType] = s.Type
+ schemesMap[s.Name] = scheme
+ scheme[keyProperties] = makePropertiesMap(&s.Properties)
257
258
- schemesMap[s.Name] = scheme
+ if s.XML.Name != "" {
259
+ scheme[keyXML] = s.XML
260
+ }
261
262
}
263
264
return schemesMap
0 commit comments