fixed bad code.

This commit is contained in:
quobix
2024-09-09 16:58:20 -04:00
parent 244ce963c8
commit ac1d206f01

View File

@@ -331,12 +331,9 @@ func (index *SpecIndex) GetAllComponentSchemas() map[string]*Reference {
if index != nil && index.allComponentSchemas != nil { if index != nil && index.allComponentSchemas != nil {
return index.allComponentSchemas return index.allComponentSchemas
} }
if index != nil && index.allComponentSchemas == nil { schemaMap := syncMapToMap[string, *Reference](index.allComponentSchemaDefinitions)
schemaMap := syncMapToMap[string, *Reference](index.allComponentSchemaDefinitions) index.allComponentSchemas = schemaMap
index.allComponentSchemas = schemaMap return index.allComponentSchemas
return index.allComponentSchemas
}
return nil
} }
// GetAllSecuritySchemes will return all security schemes / definitions found in the document. // GetAllSecuritySchemes will return all security schemes / definitions found in the document.