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

Function hasJSONRPCIDField

expr/http_endpoint.go:1188–1190  ·  view source on GitHub ↗

hasJSONRPCIDField returns true if an attribute or any of its nested attributes has the "jsonrpc:id" meta tag, indicating it's designated as the JSON-RPC ID field.

(attr *AttributeExpr)

Source from the content-addressed store, hash-verified

1186// hasJSONRPCIDField returns true if an attribute or any of its nested attributes
1187// has the "jsonrpc:id" meta tag, indicating it's designated as the JSON-RPC ID field.
1188func hasJSONRPCIDField(attr *AttributeExpr) bool {
1189 return hasJSONRPCIDFieldRec(attr, make(map[*AttributeExpr]struct{}), make(map[string]struct{}))
1190}
1191
1192// hasJSONRPCIDFieldRec walks the attribute graph looking for the jsonrpc:id meta
1193// while guarding against cycles that may occur with recursive user types.

Callers 1

ValidateMethod · 0.85

Calls 1

hasJSONRPCIDFieldRecFunction · 0.85

Tested by

no test coverage detected