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

Function Params

dsl/http.go:658–670  ·  view source on GitHub ↗

Params groups a set of Param expressions. It makes it possible to list required parameters using the Required function. Params must appear in an API or Service HTTP expression to define the API or service base path and query string parameters. Params may also appear in an method HTTP expression to

(args any)

Source from the content-addressed store, hash-verified

656// })
657// })
658func Params(args any) {
659 p := params(eval.Current())
660 if p == nil {
661 eval.IncompatibleDSL()
662 return
663 }
664 fn, ok := args.(func())
665 if !ok {
666 eval.InvalidArgError("function", args)
667 return
668 }
669 eval.Execute(fn, p)
670}
671
672// Param describes a single HTTP request path or query string parameter.
673//

Callers 3

payload_dsls.goFile · 0.85
TestInvalidArgErrorFunction · 0.85

Calls 5

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92
InvalidArgErrorFunction · 0.92
ExecuteFunction · 0.92
paramsFunction · 0.85

Tested by 1

TestInvalidArgErrorFunction · 0.68