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

Function MustGenerate

http/codegen/openapi/json_schema.go:611–620  ·  view source on GitHub ↗

MustGenerate returns true if the meta indicates that a OpenAPI specification should be generated, false otherwise.

(meta expr.MetaExpr)

Source from the content-addressed store, hash-verified

609// MustGenerate returns true if the meta indicates that a OpenAPI specification should be
610// generated, false otherwise.
611func 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.
623func AdditionalPropertiesFromExpr(meta expr.MetaExpr) any {

Callers 10

NewV2Function · 0.92
hasAbsoluteRoutesFunction · 0.92
buildBodyTypesFunction · 0.92
schemafyMethod · 0.92
hashAttributeFunction · 0.92
buildPathsFunction · 0.92
buildServersFunction · 0.92
buildTagsFunction · 0.92
TypeSchemaWithPrefixFunction · 0.85
initAttributeValidationFunction · 0.85

Calls 1

LastMethod · 0.80

Tested by

no test coverage detected