Skip to content
New issue

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

fix(rest): make sure OpenAPI parameters with simple types are validated by AJV #6285

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

raymondfeng
Copy link
Contributor

@raymondfeng raymondfeng commented Sep 6, 2020

Fixes #6247

Signed-off-by: Raymond Feng [email protected]

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

@raymondfeng raymondfeng self-assigned this Sep 7, 2020
@raymondfeng raymondfeng requested a review from jannyHou September 7, 2020 20:25
@raymondfeng raymondfeng added REST Issues related to @loopback/rest package and REST transport in general bug Validation labels Sep 7, 2020
@raymondfeng
Copy link
Contributor Author

@jannyHou Please review.

Copy link
Contributor

@jannyHou jannyHou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you @raymondfeng looks great.

debug(`Value from ${options.source} passed AJV validation.`);
return;
}
debug(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: I remember checking the null value to pass some test, but if the check is not needed, please also remove the comment above.

@raymondfeng raymondfeng merged commit 987c103 into master Sep 9, 2020
@raymondfeng raymondfeng deleted the fix-6247 branch September 9, 2020 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug REST Issues related to @loopback/rest package and REST transport in general Validation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enum in path is not respected in validation
3 participants