(components *openapi3.Components)
| 154 | } |
| 155 | |
| 156 | func gatherComponentParameters(components *openapi3.Components) []*GatheredSchema { |
| 157 | var result []*GatheredSchema |
| 158 | for _, name := range SortedMapKeys(components.Parameters) { |
| 159 | paramRef := components.Parameters[name] |
| 160 | if paramRef == nil || paramRef.Value == nil { |
| 161 | continue |
| 162 | } |
| 163 | param := paramRef.Value |
| 164 | if param.Schema != nil && param.Schema.Value != nil { |
| 165 | var goNameOverride string |
| 166 | if paramRef.Ref == "" { |
| 167 | goNameOverride = extractGoNameOverride(param.Extensions) |
| 168 | } |
| 169 | result = append(result, &GatheredSchema{ |
| 170 | Path: SchemaPath{"components", "parameters", name}, |
| 171 | Context: ContextComponentParameter, |
| 172 | Ref: paramRef.Ref, |
| 173 | Schema: param.Schema.Value, |
| 174 | ComponentName: name, |
| 175 | GoNameOverride: goNameOverride, |
| 176 | }) |
| 177 | } |
| 178 | } |
| 179 | return result |
| 180 | } |
| 181 | |
| 182 | func gatherComponentResponses(components *openapi3.Components) []*GatheredSchema { |
| 183 | var result []*GatheredSchema |
no test coverage detected