MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / GetParametersImports

Function GetParametersImports

pkg/codegen/codegen.go:1459–1472  ·  view source on GitHub ↗
(params map[string]*openapi3.ParameterRef)

Source from the content-addressed store, hash-verified

1457}
1458
1459func 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
1474func SetGlobalStateSpec(spec *openapi3.T) {
1475 globalState.spec = spec

Callers 1

Calls 1

GoSchemaImportsFunction · 0.85

Tested by

no test coverage detected