MustGenerate returns true if the meta indicates that a OpenAPI specification should be generated, false otherwise.
(meta expr.MetaExpr)
| 609 | // MustGenerate returns true if the meta indicates that a OpenAPI specification should be |
| 610 | // generated, false otherwise. |
| 611 | func MustGenerate(meta expr.MetaExpr) bool { |
| 612 | m, ok := meta.Last("openapi:generate") |
| 613 | if !ok { |
| 614 | m, ok = meta.Last("swagger:generate") |
| 615 | } |
| 616 | if ok && m == "false" { |
| 617 | return false |
| 618 | } |
| 619 | return true |
| 620 | } |
| 621 | |
| 622 | // AdditionalPropertiesFromExpr extracts the OpenAPI additionalProperties. |
| 623 | func AdditionalPropertiesFromExpr(meta expr.MetaExpr) any { |
no test coverage detected