(params map[string]*openapi3.ParameterRef)
| 1457 | } |
| 1458 | |
| 1459 | func GetParametersImports(params map[string]*openapi3.ParameterRef) (map[string]goImport, error) { |
| 1460 | res := map[string]goImport{} |
| 1461 | for _, param := range params { |
| 1462 | if param.Value == nil { |
| 1463 | continue |
| 1464 | } |
| 1465 | imprts, err := GoSchemaImports(param.Value.Schema) |
| 1466 | if err != nil { |
| 1467 | return nil, err |
| 1468 | } |
| 1469 | maps.Copy(res, imprts) |
| 1470 | } |
| 1471 | return res, nil |
| 1472 | } |
| 1473 | |
| 1474 | func SetGlobalStateSpec(spec *openapi3.T) { |
| 1475 | globalState.spec = spec |
no test coverage detected