fix: add paths/parent nodes to schemas as well

This commit is contained in:
Tristan Cartledge
2022-12-16 13:39:01 +00:00
committed by Dave Shanley
parent 53789cbc1b
commit c75a1bfaf4
2 changed files with 23 additions and 0 deletions

View File

@@ -1648,6 +1648,8 @@ func (index *SpecIndex) extractDefinitionsAndSchemas(schemasNode *yaml.Node, pat
Definition: def,
Name: name,
Node: schema,
Path: fmt.Sprintf("$.components.schemas.%s", name),
ParentNode: schemasNode,
}
index.allSchemas[def] = ref
}