We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given following openapi definition:
{ "openapi": "3.0.0", "info": { "description": "Test", "version": "1.0.0", "title": "Test API" }, "tags": [], "paths": { "/test": { "post": { "tags": [], "summary": "POST test", "description": "A POST test", "requestBody": { "description": "A test body", "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "foo" ], "properties": { "foo": { "type": "string" } } } } } }, "responses": {}, "security": [] } } }, "components": { "requestBodies": {}, "securitySchemes": {}, "schemas": {} } }
I would expect sway to validate that a POST request to /test must have the key foo in it's body.
POST
/test
foo
In non-strict mode I get no errors, in strict mode I get:
{ errors: [ { code: 'REQUEST_ADDITIONAL_FORM_DATA', message: 'Additional form data field not allowed: foo', path: [] } ], warnings: [] }
Thanks!
The text was updated successfully, but these errors were encountered:
[email protected] isn't supported yet, and is tracked in #128.
[email protected]
Sorry, something went wrong.
No branches or pull requests
Given following openapi definition:
I would expect sway to validate that a
POST
request to/test
must have the keyfoo
in it's body.In non-strict mode I get no errors, in strict mode I get:
Thanks!
The text was updated successfully, but these errors were encountered: