Skip to content

Commit 2319aec

Browse files
committed
rm unused code
1 parent 8f13eea commit 2319aec

File tree

3 files changed

+0
-42
lines changed

3 files changed

+0
-42
lines changed

specification/operation.go

-6
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@ type Operation struct {
2020

2121
RequestBody Maybe[Ref[RequestBody]]
2222

23-
// Deprecated // TODO
24-
2523
HTTPMethod HTTPMethod
2624
Method HTTPMethodTitle
2725

28-
Operation *openapi3.Operation
29-
3026
Security SecurityRequirements
3127

3228
Responses Map[Ref[Response]]
@@ -46,8 +42,6 @@ func NewOperation(pi *PathItem, rawPath string, method httpMethod, operation *op
4642
HTTPMethod: method.HTTP,
4743
Method: method.Title,
4844

49-
Operation: operation,
50-
5145
Security: specSecurityReqs,
5246
}
5347

specification/security.go

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88

99
type Security struct {
1010
Requirement []string
11-
Scheme openapi3.SecurityScheme
1211
}
1312

1413
func GetSecurity(secSchemes openapi3.SecuritySchemes, secRequirements openapi3.SecurityRequirements) ([][]Security, error) {
@@ -26,7 +25,6 @@ func GetSecurity(secSchemes openapi3.SecuritySchemes, secRequirements openapi3.S
2625
}
2726
sOut = append(sOut, Security{
2827
Requirement: reqs,
29-
Scheme: *ref.Value,
3028
})
3129
}
3230
out = append(out, sOut)

specification/spec.go

-34
Original file line numberDiff line numberDiff line change
@@ -80,40 +80,6 @@ func ParseSwagger(spec *openapi3.Swagger, opts SchemaOptions) (*Spec, error) {
8080
return s, nil
8181
}
8282

83-
type PathParameters []*PathParameterOld
84-
85-
func (ps PathParameters) Get(name string) (*PathParameterOld, bool) {
86-
for _, p := range ps {
87-
if p.Name == name {
88-
return p, true
89-
}
90-
}
91-
return nil, false
92-
}
93-
94-
type PathParameterOld struct {
95-
RefName string
96-
Name string
97-
Description string
98-
Schema Ref[Schema]
99-
}
100-
101-
type QueryParameterOld struct {
102-
RefName string
103-
Name string
104-
Description string
105-
Required bool
106-
Schema Ref[Schema]
107-
}
108-
109-
type HeaderParameterOld struct {
110-
RefName string
111-
Name string
112-
Description string
113-
Required bool
114-
Schema Ref[Schema]
115-
}
116-
11783
type Schema struct {
11884
NoRef[Schema]
11985

0 commit comments

Comments
 (0)