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
User story.
As a Prism user, I can OAS3 body parameter encoding to allow reserved characters, so that I can handle more real life corner cases.
Additional context
Note that this test should already exist in the source code. At the time of writing this issue up it exited on a feature branch under test-harness/specs/validate-body-params/form-data-allow-reserved-fail.oas3.txt.unsupported
====test====
Send reserved characters in body and expect to fail validation.
====spec====
openapi: '3.0.1'
paths:
/path:
post:
responses:
200:
content:
text/plain:
example: ok
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
reserved:
type: string
encoding:
reserved:
contentType: text/plain
allowReserved: false
style: form
====server====
mock -p 4010
====command====
curl -i -X POST http://localhost:4010/path -H "Content-Type: application/x-www-form-urlencoded" --data "reserved=:/?#[]@!$&'()*+,;"
====expect====
HTTP/1.1 422 Unprocessable Entity
content-type: application/problem+json
Connection: keep-alive
{ "to-be": "done" }
The text was updated successfully, but these errors were encountered:
User story.
As a Prism user, I can OAS3 body parameter encoding to allow reserved characters, so that I can handle more real life corner cases.
Additional context
Note that this test should already exist in the source code. At the time of writing this issue up it exited on a feature branch under
test-harness/specs/validate-body-params/form-data-allow-reserved-fail.oas3.txt.unsupported
====test====
Send reserved characters in body and expect to fail validation.
====spec====
openapi: '3.0.1'
paths:
/path:
post:
responses:
200:
content:
text/plain:
example: ok
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
reserved:
type: string
encoding:
reserved:
contentType: text/plain
allowReserved: false
style: form
====server====
mock -p 4010
====command====
curl -i -X POST http://localhost:4010/path -H "Content-Type: application/x-www-form-urlencoded" --data "reserved=:/?#[]@!$&'()*+,;"
====expect====
HTTP/1.1 422 Unprocessable Entity
content-type: application/problem+json
Connection: keep-alive
{ "to-be": "done" }
The text was updated successfully, but these errors were encountered: