Skip to content

Commit

Permalink
fixed bad code.
Browse files Browse the repository at this point in the history
  • Loading branch information
daveshanley committed Sep 9, 2024
1 parent 244ce96 commit ac1d206
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions index/spec_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,9 @@ func (index *SpecIndex) GetAllComponentSchemas() map[string]*Reference {
if index != nil && index.allComponentSchemas != nil {
return index.allComponentSchemas
}
if index != nil && index.allComponentSchemas == nil {
schemaMap := syncMapToMap[string, *Reference](index.allComponentSchemaDefinitions)
index.allComponentSchemas = schemaMap
return index.allComponentSchemas
}
return nil
schemaMap := syncMapToMap[string, *Reference](index.allComponentSchemaDefinitions)
index.allComponentSchemas = schemaMap
return index.allComponentSchemas
}

// GetAllSecuritySchemes will return all security schemes / definitions found in the document.
Expand Down

0 comments on commit ac1d206

Please sign in to comment.