-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Validate parameter values against their schema #1573
Comments
@bajtos, need to create another |
Possibly. I think we should refactor the code in |
@bajtos is there more information you can share in regards to how we can reproduce the issue described above. |
I think PR #2059 is relevant. |
Awesome! I am looking forward to see your contribution. Let me know if you need any help. I think it will be best if you can open a pull request early on, even while the changes are not complete & finished yet.
Yes please. Re-posting #1573 (comment):
|
Hello @bajtos, according to my understanding this is rather a feature and not a minor bug therefore will need a solution design. Do you think this is a good stage to perform the pull request ? or should i do that only after the deign is complete? |
Makes sense, I updated the issue labels accordingly 👍
I think the most important the design work has been already done while implementing request-body validation. @YaelGit Please go ahead and open a pull request. Feel free to open it early, even before the implementation and tests are complete. That way we can provide you with early feedback and you can save time by keeping possible reworks smaller in scope. |
Hi Bajtos, After going through the validate request body implementation I would like to verify we are on same page before actually performing my first Pull Request. Moreover, I think we can be able to transform the available body validation method into a generic validation method – which will receive one more parameter – type (to represent body/query type) |
@YaelGit I find it difficult to discuss the changes this way, without seeing any code. Please try to make some changes showing the direction you would like to take and open a pull request. It's ok to send a pull request that's not complete. |
openapi spec allows developers to provide additional restrictions on input parameters via parameter schema. For example, pageSize can include schema restrictions fix loopbackio#1573
openapi spec allows developers to provide additional restrictions on input parameters via parameter schema. For example, pageSize can include schema restrictions fix loopbackio#1573
openapi spec allows developers to provide additional restrictions on input parameters via parameter schema. For example, pageSize can include schema restrictions fix loopbackio#1573
openapi spec allows developers to provide additional restrictions on input parameters via parameter schema. For example, pageSize can include schema restrictions fix loopbackio#1573
openapi spec allows developers to provide additional restrictions on input parameters via parameter schema. For example, pageSize can include schema restrictions fix loopbackio#1573
openapi spec allows developers to provide additional restrictions on input parameters via parameter schema. For example, pageSize can include schema restrictions fix loopbackio#1573
openapi spec allows developers to provide additional restrictions on input parameters via parameter schema. For example, pageSize can include schema restrictions fix loopbackio#1573
openapi spec allows developers to provide additional restrictions on input parameters via parameter schema. For example, pageSize can include schema restrictions fix loopbackio#1573
Closing as done. |
OpenAPI spec allows developers to provide additional restrictions on input parameters via parameter schema.
For example, a
pageSize
parameter can be defined as follows:At the moment,
@loopback/rest
's sequence actionparseParams
validates parameter values against their schema forin: body
arguments only.We should modify
parseParams
to validate all parameter values against their schema. Leverage AJV to perform the actual validation.The text was updated successfully, but these errors were encountered: