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
^ Apologies if this isn't valid, modified to obscure details.
Describe the bug you're encountering
Swagger definitions that have required header fields always fail validation even values are present. It may be related to default header values being provided initially, but changing their values manually doesn't fix the problem.
I have confirmed that required query params work fine.
To reproduce...
Unfortunately I'm unable to provide a quick test for this as I'm only involved in the UI portion. If required, I can spend time setting up a concrete sample.
Expected behavior
Required fields (with pre-populated defaults) should Execute without error (given the values are valid).
Screenshots
Additional context or thoughts
I saw this related issue: #4745
However, it looked like the resolution was to use swagger-ui-react which doesn't apply here. If I missed something relevant, apologies.
The text was updated successfully, but these errors were encountered:
pwan001-dev
changed the title
[swagger-ui-react] Required fields fail validation (with values)
[swagger-ui-react] Required headers fail validation (with values)
Aug 8, 2019
Your definition is not valid, you need to replace "type": "String" with "type": "string" (note the lowercase "s"). "Try it out" should work fine after this fix.
On an unrelated note, the Content-Type and Accept headers should be defined by the consumes and produces keywords rather than header parameters:
operationId: somethingconsumes:
- application/json # This is the request's "Content-Type"produces:
- application/json # This is the request's "Accept" header and the response's "Content-Type"
Ahh sorry for the noob mistake, I'll forward this on. On the UI side, we just switched to swagger-ui-react from an old swagger implementation where these errors in swagger definitions didn't manifest.
Q&A (please complete the following information)
Example Swagger/OpenAPI definition:
^ Apologies if this isn't valid, modified to obscure details.
Describe the bug you're encountering
Swagger definitions that have required header fields always fail validation even values are present. It may be related to default header values being provided initially, but changing their values manually doesn't fix the problem.
I have confirmed that required query params work fine.
To reproduce...
Unfortunately I'm unable to provide a quick test for this as I'm only involved in the UI portion. If required, I can spend time setting up a concrete sample.
Expected behavior
Required fields (with pre-populated defaults) should Execute without error (given the values are valid).
Screenshots
Additional context or thoughts
I saw this related issue: #4745
However, it looked like the resolution was to use
swagger-ui-react
which doesn't apply here. If I missed something relevant, apologies.The text was updated successfully, but these errors were encountered: