(s *Schema)
| 1275 | } |
| 1276 | |
| 1277 | func OperationSchemaImports(s *Schema) (map[string]goImport, error) { |
| 1278 | res := map[string]goImport{} |
| 1279 | |
| 1280 | for _, p := range s.Properties { |
| 1281 | imprts, err := GoSchemaImports(&openapi3.SchemaRef{Value: p.Schema.OAPISchema}) |
| 1282 | if err != nil { |
| 1283 | return nil, err |
| 1284 | } |
| 1285 | maps.Copy(res, imprts) |
| 1286 | } |
| 1287 | |
| 1288 | imprts, err := GoSchemaImports(&openapi3.SchemaRef{Value: s.OAPISchema}) |
| 1289 | if err != nil { |
| 1290 | return nil, err |
| 1291 | } |
| 1292 | maps.Copy(res, imprts) |
| 1293 | return res, nil |
| 1294 | } |
| 1295 | |
| 1296 | func OperationImports(ops []OperationDefinition) (map[string]goImport, error) { |
| 1297 | res := map[string]goImport{} |
no test coverage detected