-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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 isBodyAllow to return true in case of DELETE method #10751
Conversation
for delete method Add method isMethodPutOrPatchOrPost
to be compatible with previous versions, lubrary mainterners should decide if want to use isBodyAllowed
Change angular typescript to support delete with body if angular version is >= 12.1 update default ngVersion to be latest 12.2.12
revert my changes
cc @OpenAPITools/generator-core-team as the change covers CodegenOperation.java |
LGTM |
This reverts commit edb88d9.
Hey, I'm using openapi-generator-cli to generate my Angular code. Right now I'm strugging with DELETE not containing my body. Seams like this was pretty muched discussed - but implemented? What am I doing wrong? Isn't this fix included in the cli, yet? docker run openapitools/openapi-generator-cli generate -i swagger.json -g typescript-angular -p=useSingleRequestParameter=true -o ./out --skip-validate-spec |
@macjohnny do you maybe remember the reason |
@angelaki unfortunately I dont remember, but maybe you can find some previous PRs where this was discussed. |
fix
#7557
#10448
fix isBodyAllow to return true in case of DELETE method
add new method isMethodPutOrPatchOrPost
fix angular typescript client to allow delete with body
if angular version allow it use isBodyAllow in template
otherwise use isMethodPutOrPatchOrPost
angular fix client in version12.1
change default angular version to be latest
in this moment 12.2.12
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(5.3.0),6.0.x
technical committee:
@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02)
Hi @wing328 if you have time can check this (with other maintainers) because
I change templates in other libs
however tried not to break anything