MCPcopy Create free account
hub / github.com/goadesign/goa / ExtensionsFromExpr

Function ExtensionsFromExpr

http/codegen/openapi/extensions.go:13–24  ·  view source on GitHub ↗

ExtensionsFromExpr generates openapi extensions from the given meta expression.

(mdata expr.MetaExpr)

Source from the content-addressed store, hash-verified

11// ExtensionsFromExpr generates openapi extensions from the given meta
12// expression.
13func ExtensionsFromExpr(mdata expr.MetaExpr) map[string]any {
14 swag := extensionsFromExprWithPrefix(mdata, "swagger:extension:")
15 open := extensionsFromExprWithPrefix(mdata, "openapi:extension:")
16 if swag == nil {
17 return open
18 }
19 if open == nil {
20 return swag
21 }
22 maps.Copy(swag, open)
23 return swag
24}
25
26// extensionsFromExprWithPrefix generates openapi extensions from
27// the given meta expression with keys starting the given prefix.

Callers 15

NewV2Function · 0.92
securitySpecFromExprFunction · 0.92
paramForFunction · 0.92
responseSpecFromExprFunction · 0.92
buildPathFromFileServerFunction · 0.92
buildPathFromExprFunction · 0.92
schemafyMethod · 0.92
buildInfoFunction · 0.92
buildPathsFunction · 0.92
buildOperationFunction · 0.92
buildFileServerOperationFunction · 0.92
buildSecuritySchemeFunction · 0.92

Calls 1

Tested by

no test coverage detected