resolver tests all operational

time to start some cleanup.

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2023-10-18 12:01:06 -04:00
parent 51971762a9
commit 48c83ddb30
9 changed files with 960 additions and 855 deletions

View File

@@ -22,7 +22,10 @@ func (index *SpecIndex) extractDefinitionsAndSchemas(schemasNode *yaml.Node, pat
}
def := fmt.Sprintf("%s%s", pathPrefix, name)
fullDef := fmt.Sprintf("%s%s", index.specAbsolutePath, def)
ref := &Reference{
FullDefinition: fullDef,
Definition: def,
Name: name,
Node: schema,
@@ -278,6 +281,13 @@ func (index *SpecIndex) scanOperationParams(params []*yaml.Node, pathItemNode *y
paramRefName := param.Content[1].Value
paramRef := index.allMappedRefs[paramRefName]
if paramRef == nil {
// could be in the rolodex
ref := index.SearchIndexForReference(paramRefName)
if ref != nil {
paramRef = ref
}
}
if index.paramOpRefs[pathItemNode.Value] == nil {
index.paramOpRefs[pathItemNode.Value] = make(map[string]map[string][]*Reference)