Skip to content

Commit

Permalink
refactor: openapi3edit: cleanup to use SpecMore.OperationIDsCounts()
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Oct 20, 2022
1 parent 2b60267 commit cc34225
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openapi3edit/intersection.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ func NewSpecMetadata(spec *openapi3.Spec) SpecMetadata {
OperationIDs: []string{},
Endpoints: []string{}}
if spec != nil {
mapOpIDs := SpecOperationIds(spec)
sm := openapi3.SpecMore{Spec: spec}
mapOpIDs := sm.OperationIDsCounts()
for key := range mapOpIDs {
md.OperationIDs = append(md.OperationIDs, key)
}
md.Endpoints = SpecEndpoints(spec, true)
sm := openapi3.SpecMore{Spec: spec}
md.SchemaNames = sm.SchemaNames()
}
return md
Expand Down

0 comments on commit cc34225

Please sign in to comment.