forked from stoplightio/prism
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly lookup the properties in lowercase (stoplightio#1268)
* do not loweracse * make createJsonSchemaFromParams pure * lowercase on property lookup in the schema * add harness * changelog: add line * auto get the correct version * release beta * Update CHANGELOG.md Co-authored-by: Karol Maciaszek <karol@maciaszek.pl> * Update packages/http/src/validator/validators/params.ts Co-authored-by: Karol Maciaszek <karol@maciaszek.pl> Co-authored-by: Karol Maciaszek <karol@maciaszek.pl>
- Loading branch information
1 parent
8a40326
commit e5aa564
Showing
5 changed files
with
57 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
test-harness/specs/validate-query-params/query-param-upper-case.oas2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
====test==== | ||
When I send a request to an operation | ||
And the operation has a query param specified in mixed between lowercase and uppercase | ||
And in the request I sent that param is present in a different casing | ||
It should still pass the validation | ||
====spec==== | ||
swagger: '2.0' | ||
produces: | ||
- application/json | ||
paths: | ||
"/v1/test": | ||
get: | ||
parameters: | ||
- collectionFormat: csv | ||
in: query | ||
items: | ||
format: uuid | ||
type: string | ||
name: filter[somethingId] | ||
required: false | ||
type: array | ||
responses: | ||
'200': | ||
description: OK | ||
examples: | ||
error: false | ||
====server==== | ||
mock -p 4010 ${document} | ||
====command==== | ||
curl -sIXGET http://127.0.0.1:4010/v1/test?somethingid=04fc0172-1943-4c38-8e0f-36935e05b8dd | ||
====expect==== | ||
HTTP/1.1 200 OK |