(components *openapi3.Components)
| 131 | } |
| 132 | |
| 133 | func gatherComponentSchemas(components *openapi3.Components) []*GatheredSchema { |
| 134 | var result []*GatheredSchema |
| 135 | for _, name := range SortedSchemaKeys(components.Schemas) { |
| 136 | schemaRef := components.Schemas[name] |
| 137 | if schemaRef == nil || schemaRef.Value == nil { |
| 138 | continue |
| 139 | } |
| 140 | var goNameOverride string |
| 141 | if schemaRef.Ref == "" { |
| 142 | goNameOverride = extractGoNameOverride(schemaRef.Value.Extensions) |
| 143 | } |
| 144 | result = append(result, &GatheredSchema{ |
| 145 | Path: SchemaPath{"components", "schemas", name}, |
| 146 | Context: ContextComponentSchema, |
| 147 | Ref: schemaRef.Ref, |
| 148 | Schema: schemaRef.Value, |
| 149 | ComponentName: name, |
| 150 | GoNameOverride: goNameOverride, |
| 151 | }) |
| 152 | } |
| 153 | return result |
| 154 | } |
| 155 | |
| 156 | func gatherComponentParameters(components *openapi3.Components) []*GatheredSchema { |
| 157 | var result []*GatheredSchema |
no test coverage detected