You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Committee, when raising an error, raises the following error for this request:
Committee::InvalidRequest:
#/paths/... missing required parameters: Role
This is because Rack mutates all http headers, and Role becomes HTTP_ROLE.
This would seem unrelated to this gem, except that it is designed as Rack middleware, so it seems odd that it wouldn't work with rack conventions.
I'm not too familiar with the gem yet, but a first idea for a solution might be to cast all swagger-defined headers into HTTP_x formats before passing to validation.
The text was updated successfully, but these errors were encountered:
HTTP_ Variables
Variables corresponding to the client-supplied HTTP request headers (i.e., variables whose names begin with HTTP_). The presence or absence of these variables should correspond with the presence or absence of the appropriate HTTP header in the request. See RFC3875 section 4.1.18 for specific behavior.
OK we need remove HTTP_ prefix before validating header.
Given an OpenApi3 swagger yaml definition for a header:
And given a valid request:
curl ... -H "Role: A"
Committee, when raising an error, raises the following error for this request:
This is because Rack mutates all http headers, and
Role
becomesHTTP_ROLE
.This would seem unrelated to this gem, except that it is designed as Rack middleware, so it seems odd that it wouldn't work with rack conventions.
I'm not too familiar with the gem yet, but a first idea for a solution might be to cast all swagger-defined headers into
HTTP_x
formats before passing to validation.The text was updated successfully, but these errors were encountered: