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

Function Deprecated

dsl/method.go:53–60  ·  view source on GitHub ↗

Deprecated marks HTTP routes as deprecated in the generated OpenAPI specifications. Deprecated must appear in a Method HTTP expression. Deprecated takes no argument. Example: Method("add", func() { HTTP(func() { GET("/") Deprecated() }) })

()

Source from the content-addressed store, hash-verified

51// })
52// })
53func Deprecated() {
54 _, ok := eval.Current().(*expr.HTTPEndpointExpr)
55 if !ok {
56 eval.IncompatibleDSL()
57 return
58 }
59 Meta("openapi:deprecated", "true")
60}

Callers 1

operations.goFile · 0.85

Calls 3

CurrentFunction · 0.92
IncompatibleDSLFunction · 0.92
MetaFunction · 0.85

Tested by

no test coverage detected