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

Function makeHTTPType

http/codegen/service_data.go:1024–1030  ·  view source on GitHub ↗

makeHTTPType traverses the attribute recursively and performs these actions: * removes aliased user type by replacing them with the underlying type. * changes unions into structs with Type and Value fields.

(att *expr.AttributeExpr)

Source from the content-addressed store, hash-verified

1022// * removes aliased user type by replacing them with the underlying type.
1023// * changes unions into structs with Type and Value fields.
1024func makeHTTPType(att *expr.AttributeExpr) *expr.AttributeExpr {
1025 if att == nil {
1026 return nil
1027 }
1028 att = expr.DupAtt(att)
1029 return makeHTTPTypeRecursive(att, make(map[string]struct{}))
1030}
1031
1032func makeHTTPTypeRecursive(att *expr.AttributeExpr, seen map[string]struct{}) *expr.AttributeExpr {
1033 switch dt := att.Type.(type) {

Callers 9

analyzeMethod · 0.85
buildPayloadDataMethod · 0.85
buildResponsesMethod · 0.85
buildErrorsDataMethod · 0.85
extractPathParamsMethod · 0.85
extractQueryParamsMethod · 0.85
extractHeadersMethod · 0.85
extractCookiesMethod · 0.85
initWebSocketDataMethod · 0.85

Calls 2

DupAttFunction · 0.92
makeHTTPTypeRecursiveFunction · 0.85

Tested by

no test coverage detected