-
-
Notifications
You must be signed in to change notification settings - Fork 358
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(core): capitalize http verb patch #905
Conversation
I never had that issue. In which case do have that? An what http client do you use and if it’s a dependency which version? |
When using JavaScript's fetch. Another person described the problem here in the issues as well: |
Someone is attempting to deploy a commit to a Personal Account owned by @anymaniax on Vercel. @anymaniax first needs to authorize it. |
@hkfi the problem it's that currently done like that It would be a breaking change and you can uppercase all method in your custom instance. Would be better to create a fetch client no? |
@anymaniax I think the generated strings should be aligned with the HTTP verb standards anyway and should by default all be uppercase. If for whatever reason, generating 'PATCH' instead of a 'patch' results in a break in their PATCH requests, that should be a mistake in how the user sets up their client or sending requests rather than a mistake in the code generated by Orval. Right now, the code that is generated is wrong and unusable without customizing the client to account for this, which shouldn't be the expectation. The generated code should work out of the box. |
Then would be better to pass everything to uppercase no? |
The only verb where uppercase is required is PATCH, so it doesn't need to be every verb updated as part of this PR, but yes it could be every verb |
It should be every verb. They all should be uppercase |
Looks like this is failing the ZOD compilation because |
Superseded by PR: #1043 |
Status
READY
Description
Changed the HTTP verb 'patch' to 'PATCH'.
PATCH is the only HTTP method that is case sensitive. It needs to be capitalized to work.
Related PRs
List related PRs against other branches:
None
Todos