-
-
Notifications
You must be signed in to change notification settings - Fork 416
feat(namedParameters): Add global named parameters option #914
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
Merged
anymaniax
merged 26 commits into
orval-labs:master
from
Marcel-G:feat/named-parameters-global
Sep 11, 2023
Merged
feat(namedParameters): Add global named parameters option #914
anymaniax
merged 26 commits into
orval-labs:master
from
Marcel-G:feat/named-parameters-global
Sep 11, 2023
Conversation
This file contains hidden or 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
Someone is attempting to deploy a commit to a Personal Account owned by @anymaniax on Vercel. @anymaniax first needs to authorize it. |
04f0aad
to
3abc99c
Compare
Marcel-G
commented
Aug 17, 2023
03ffe00
to
f242e0b
Compare
@Marcel-G thanks for the work! |
This was referenced Sep 22, 2023
3 tasks
queryParams ? ', ...(params ? [params]: [])' : '' | ||
}${body.implementation ? `, ${body.implementation}` : ''}] as const;`; | ||
const queryKeyFn = `export const ${queryKeyFnName} = (${queryKeyProps}) => { | ||
${isVue(outputClient) ? vueUnRefParams(props) : ''} |
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.
@Marcel-G is there any good reason why this was added? Please see #931 (comment) for context
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Status
READY
Description
Often times routes have many path parameters. As the number grows, type-safety is less effective as arguments (commonly string or number types) can easily get used in the wrong order.
Using named parameters helps this, as you get the added safety of needing to specify the appropriate name for the parameter.
This PR adds a global
useNamedParameters
option which creates path parameters as a single object.Related PRs
Supersedes previous implementations:
Todos
Steps to Test or Reproduce
Outline the steps to test or reproduce the PR here.
View the
named-parameters
builds under each client intests/generated