-
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
docs: update decorator documentation for url-encoded query params #4621
Conversation
81e455f
to
72f2dc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my grammar related comments and incorporated as you find appropriate. Thanks.
One of the parameter decorator types, `@param.query.object` is applied to | ||
generate an OpenAPI definition for query parameters with JSON values. | ||
|
||
The generated definition supports the `url-encoded` style specified in Open-API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open-API
-> OpenAPI
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
The generated definition supports the `url-encoded` style specified in Open-API. | ||
This style supports receiving url-encoded payload for json query parameters. | ||
|
||
For instance, to filter api results from the GET '/todo-list' endpoint in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment in #4620, maybe just to filter the results...
(without api
) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
// filter={where: {completed: 'false'}} | ||
``` | ||
|
||
LoopBack has switched definition of json query params from the `exploded`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change:
LoopBack has switched the definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
|
||
LoopBack has switched definition of json query params from the `exploded`, | ||
`deep-object` style to the `url-encoded` style definition in Open-API spec, in a | ||
recent release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in a recent release.
This may not be relevant because the "recent" release may become not that recent soon. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add a note like:
{% include note.html content="
LoopBack has switched definition of json query params from the .....
" %}
``` | ||
|
||
LoopBack has switched definition of json query params from the `exploded`, | ||
`deep-object` style to the `url-encoded` style definition in Open-API spec, in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open-API
-> OpenAPI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
72f2dc1
to
7402ffc
Compare
// filter={where: {completed: 'false'}} | ||
``` | ||
|
||
LoopBack has switched the definition of json query params from the `exploded`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this sentence to the beginning of this section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed
One of the parameter decorator types, `@param.query.object` is applied to | ||
generate an OpenAPI definition for query parameters with JSON values. | ||
|
||
The generated definition supports the `url-encoded` style specified in Open API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
supports the
url-encoded
style specified in OpenAPI.
Could you explain more about what does "url-encoded style specified in OpenAPI mean"? IIUC that style describes the syntax of an URL, but has nothing to do with OpenAPI spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, Open API does not openly state an url-encoded style , but it defines a certain specification that allows url-encoded payload for query params. I will explain more about this.
838ba21
to
30f185f
Compare
30f185f
to
84f97b1
Compare
84f97b1
to
60b6905
Compare
issue: #2208
Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated👉 Check out how to submit a PR 👈