-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[TypeScript Fetch] Default TypeScript fetch configuration to 3.6+ true #9974
[TypeScript Fetch] Default TypeScript fetch configuration to 3.6+ true #9974
Conversation
thanks for your contribution. |
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.
LGTM
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.
Thank you for the PR! Code looks good to me as well.
As mentioned by macjohnny please regenerate the samples or apply the below patch to your code (git apply copy_below_patch_into_this_file.patch
).
Patch based on your repository & mvn clean package; ./bin/utils/export_docs_generators.sh
diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md
index f8e9cd2328a..8a080239a01 100644
--- a/docs/generators/typescript-fetch.md
+++ b/docs/generators/typescript-fetch.md
@@ -26,7 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|supportsES6|Generate code that conforms to ES6.| |false|
-|typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |false|
+|typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |true|
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true|
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
|withoutRuntimeChecks|Setting this property to true will remove any runtime checks on the request and response payloads. Payloads will be casted to their expected types.| |false|
Thanks for reviewing this! @macjohnny yes I did run @TiFu I followed your instructions, but after running |
@szTheory I would suggest that you just manually edit the file/apply the patch, then commit & push (i.e. skip the mvn clean package stuff). As long as the edits are committed, the tests will pass. (If you feel like debugging this: what OS do you use? Are you using any IDE that might interfere? Are you running both clean package and export docs from a shell?) |
@TiFu Thanks I applied the patch and pushed the change but a few of the CI tests are still failing. Edit: I ran the commands (both clean package and export docs) directly from the terminal on Mac. |
All of the failures seem to be unrelated - I will close & reopen this PR to rerun the tests as it looks like there were some download issues on sonatype's side.
|
@wing328 Can you maybe chime in here? I am a bit unsure where the errors come from, e.g. the below (from maven plugin tests)
|
@szTheory can you please merge the most recent master into your branch? |
@macjohnny I've merged master and ran the commands to build the project and update samples: ./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh |
sorry for the inconvenience, but can you rebase your branch onto the most recent master? I guess you started off from the 5.3 branch |
@szTheory ping |
…#9974 (#11331) * Default TypeScript fetch configuration to 3.6+ true, as it's been out for a while now * TypeScript fetch update the three plus CLI option default to true * Apply doc generator patch * Build the project and update samples * remove VERSION * test ts fetch clients first * Revert "test ts fetch clients first" This reverts commit 590a7f2. Co-authored-by: szTheory <szTheory@users.noreply.github.com>
Closed via #11331 |
Related to issue #9973
Here is a PR that changes the default to
true
. There is one issue however. I'm not sure why it's not updating the value totrue
in the generated documentation atdocs/generators/typescript-fetch.md
as well. Any ideas?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.x
,6.0.x
Tagging the technical committee for review:
@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)