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() }) })
()
| 51 | // }) |
| 52 | // }) |
| 53 | func Deprecated() { |
| 54 | _, ok := eval.Current().(*expr.HTTPEndpointExpr) |
| 55 | if !ok { |
| 56 | eval.IncompatibleDSL() |
| 57 | return |
| 58 | } |
| 59 | Meta("openapi:deprecated", "true") |
| 60 | } |
no test coverage detected