From ac1d206f016cb64babdc54f51835cfddc2033923 Mon Sep 17 00:00:00 2001 From: quobix Date: Mon, 9 Sep 2024 16:58:20 -0400 Subject: [PATCH] fixed bad code. --- index/spec_index.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/index/spec_index.go b/index/spec_index.go index 36f13a45..9803fd07 100644 --- a/index/spec_index.go +++ b/index/spec_index.go @@ -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.