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

Function itemsFromExpr

http/codegen/openapi/v2/builder.go:332–343  ·  view source on GitHub ↗
(at *expr.AttributeExpr)

Source from the content-addressed store, hash-verified

330}
331
332func itemsFromExpr(at *expr.AttributeExpr) *Items {
333 itemType, itemFormat := openAPITypeFormat(at)
334 items := &Items{
335 Type: itemType,
336 Format: itemFormat,
337 }
338 initAttributeValidations(at, items)
339 if expr.IsArray(at.Type) {
340 items.Items = itemsFromExpr(expr.AsArray(at.Type).ElemType)
341 }
342 return items
343}
344
345func responseSpecFromExpr(_ *V2, root *expr.RootExpr, r *expr.HTTPResponseExpr, typeNamePrefix string) *Response {
346 var schema *openapi.Schema

Callers 2

paramForFunction · 0.85
headersFromExprFunction · 0.85

Calls 4

IsArrayFunction · 0.92
AsArrayFunction · 0.92
openAPITypeFormatFunction · 0.85
initAttributeValidationsFunction · 0.85

Tested by

no test coverage detected