mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-07 12:37:48 +00:00
cleaned up path handling a little
Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
@@ -971,7 +971,7 @@ func (index *SpecIndex) GetOperationCount() int {
|
||||
Definition: m.Value,
|
||||
Name: m.Value,
|
||||
Node: method.Content[y+1],
|
||||
Path: fmt.Sprintf("$.paths.%s.%s", p.Value, m.Value),
|
||||
Path: fmt.Sprintf("$.paths['%s'].%s", p.Value, m.Value),
|
||||
ParentNode: m,
|
||||
}
|
||||
if locatedPathRefs[p.Value] == nil {
|
||||
@@ -1039,7 +1039,7 @@ func (index *SpecIndex) GetOperationsParameterCount() int {
|
||||
Name: serverRef.Value,
|
||||
Node: serverRef,
|
||||
ParentNode: prop,
|
||||
Path: fmt.Sprintf("$.paths.%s.servers[%d]", pathItemNode.Value, i),
|
||||
Path: fmt.Sprintf("$.paths['%s'].servers[%d]", pathItemNode.Value, i),
|
||||
}
|
||||
serverRefs = append(serverRefs, ref)
|
||||
}
|
||||
@@ -1123,7 +1123,7 @@ func (index *SpecIndex) GetOperationsParameterCount() int {
|
||||
Name: "servers",
|
||||
Node: serverRef,
|
||||
ParentNode: httpMethodProp,
|
||||
Path: fmt.Sprintf("$.paths.%s.%s.servers[%d]", pathItemNode.Value, prop.Value, i),
|
||||
Path: fmt.Sprintf("$.paths['%s'].%s.servers[%d]", pathItemNode.Value, prop.Value, i),
|
||||
}
|
||||
serverRefs = append(serverRefs, ref)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user