[BUG][typescript-fetch] Fixed TypeScript code generation for oneOf using arrays#22780
[BUG][typescript-fetch] Fixed TypeScript code generation for oneOf using arrays#22780macjohnny merged 1 commit intoOpenAPITools:masterfrom
Conversation
There was a problem hiding this comment.
No issues found across 1 file
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
|
i add some tests via #22870 and incorporate your changes in this PR but there's no change in samples (TypeScript Fetch output) and the CI tests still failed. can you please take a look when you've time? |
|
cc @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) @davidgamero (2022/03) @mkusaka (2022/04) @joscha (2024/10) for review as well |
|
@psegalen given that it's now merged. can you please test the latest master to see if it's working for your use cases? |
|
@psegalen you can test with the snapshot version published to central maven repo e.g. https://central.sonatype.com/repository/maven-snapshots/org/openapitools/openapi-generator-cli/7.20.0-SNAPSHOT/openapi-generator-cli-7.20.0-20260204.115301-105.jar we will cut a release next week. just want to make sure the your fix works for your use cases as expected otherwise, we can consider reverting the change. |
This PR just fixes the syntax of the generated code, no opinionated new code, no change of any nature to anything, just some syntax fix.
It fixes issue #22779
Fix is only about balancing unbalanced parentheses and using the correct variables, nothing else.
Again, as this doesn't change anything about anything already functional and being in a kind of a hurry, I haven't walked through the PR checklist, sorry.
Summary by cubic
Fixed TypeScript code generation for oneOf arrays so Date and DateTime arrays parse and serialize correctly. This corrects variable usage and missing parentheses in the template.
Written for commit 785ecb4. Summary will update on new commits.