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

Function AttributeTypeSchemaWithPrefix

http/codegen/openapi/json_schema.go:408–412  ·  view source on GitHub ↗

AttributeTypeSchemaWithPrefix produces the JSON schema corresponding to the given attribute and adds the provided prefix to the type name

(api *expr.APIExpr, at *expr.AttributeExpr, prefix string)

Source from the content-addressed store, hash-verified

406// AttributeTypeSchemaWithPrefix produces the JSON schema corresponding to the given attribute
407// and adds the provided prefix to the type name
408func AttributeTypeSchemaWithPrefix(api *expr.APIExpr, at *expr.AttributeExpr, prefix string) *Schema {
409 s := TypeSchemaWithPrefix(api, at.Type, prefix)
410 initAttributeValidation(s, at)
411 return s
412}
413
414// ToString returns the string representation of the given type.
415func ToString(val any) string {

Callers 4

responseSpecFromExprFunction · 0.92
buildPathFromExprFunction · 0.92
TypeSchemaWithPrefixFunction · 0.85
AttributeTypeSchemaFunction · 0.85

Calls 2

TypeSchemaWithPrefixFunction · 0.85
initAttributeValidationFunction · 0.85

Tested by

no test coverage detected