Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed validation for path parameters and query parameters #113

Merged
merged 3 commits into from
Feb 4, 2019

Conversation

jiachen1120
Copy link
Contributor

@NicholasAzar @stevehu Since the RequestValidator is built on json-schema-validator. There is another PR related to this issue can be found in networknt/light-rest-4j repo. These changes in different repo contributions to the same issue.

RFC which specifies the details of fix can be found here: https://github.com/networknt/light-rfcs/blob/master/light-rest-4j/0001-openapi-validator-bug-fix.md

The following schema can work properly now
- minimum
- maximum
- enum
- pattern
- maxItems
- minItems
@jiachen1120 jiachen1120 changed the title Fixed validators for path parameter and query parameter Fixed validation for path parameters and query parameters Jan 17, 2019
@DSchrupert DSchrupert self-requested a review January 17, 2019 19:27
…LooseContainsInEnum and add comments to it, in addition, typeLoose check is been taken out from the method.

- Reconstruct the isNumber check, now all the type check will be done by typeValidator, and minimumValidator and maximumValidator will reuse the isNumber() method provided by typeValidator.
- Add typeLoose config into JsonSchemaTest and adding test cases in enum, minimum and maximum.
@DSchrupert DSchrupert requested a review from stevehu February 4, 2019 17:34
@DSchrupert
Copy link
Member

@stevehu This is a dependency to the linked PR

@stevehu stevehu merged commit 3aafcd9 into networknt:develop Feb 4, 2019
@ddobrin ddobrin mentioned this pull request Sep 8, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants