Skip to content

Commit

Permalink
chore: remove unused function FromV3PathItem
Browse files Browse the repository at this point in the history
  • Loading branch information
reversearrow committed Sep 30, 2024
1 parent c606b55 commit 5da0c0b
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions openapi2conv/openapi2_conv.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,27 +851,6 @@ func FromV3SecurityRequirements(requirements openapi3.SecurityRequirements) open
return result
}

func FromV3PathItem(doc3 *openapi3.T, pathItem *openapi3.PathItem) (*openapi2.PathItem, error) {
result := &openapi2.PathItem{
Extensions: stripNonExtensions(pathItem.Extensions),
}
for method, operation := range pathItem.Operations() {
r, err := FromV3Operation(doc3, operation)
if err != nil {
return nil, err
}
result.SetOperation(method, r)
}
for _, parameter := range pathItem.Parameters {
p, err := FromV3Parameter(parameter, doc3.Components)
if err != nil {
return nil, err
}
result.Parameters = append(result.Parameters, p)
}
return result, nil
}

func findNameForRequestBody(operation *openapi3.Operation) string {
nameSearch:
for _, name := range attemptedBodyParameterNames {
Expand Down

0 comments on commit 5da0c0b

Please sign in to comment.