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

Method validateJSONRPCWebSocketConstraints

expr/http_service.go:321–334  ·  view source on GitHub ↗

validateJSONRPCWebSocketConstraints validates constraints for JSON-RPC WebSocket endpoints

(verr *eval.ValidationErrors)

Source from the content-addressed store, hash-verified

319
320// validateJSONRPCWebSocketConstraints validates constraints for JSON-RPC WebSocket endpoints
321func (svc *HTTPServiceExpr) validateJSONRPCWebSocketConstraints(verr *eval.ValidationErrors) {
322 for _, e := range svc.HTTPEndpoints {
323 name := e.MethodExpr.Name
324 if !e.Headers.IsEmpty() {
325 verr.Add(e, "JSON-RPC endpoint %q using WebSocket cannot have header mappings", name)
326 }
327 if !e.Cookies.IsEmpty() {
328 verr.Add(e, "JSON-RPC endpoint %q using WebSocket cannot have cookie mappings", name)
329 }
330 if !e.Params.IsEmpty() {
331 verr.Add(e, "JSON-RPC endpoint %q using WebSocket cannot have parameter mappings", name)
332 }
333 }
334}
335
336// Finalize initializes the path if no path is set in design.
337func (svc *HTTPServiceExpr) Finalize() {

Callers 1

validateTransportsMethod · 0.95

Calls 2

IsEmptyMethod · 0.80
AddMethod · 0.80

Tested by

no test coverage detected