Fix export types for typescript client (#6805)#19616
Conversation
|
@macjohnny Looking at 598b509 I think this would actually make sense. It would help any post-processing of the TS when bundling, etc. - is there a reason we only do this for Deno? |
|
relates to #19484 |
macjohnny
left a comment
There was a problem hiding this comment.
thanks for your contribution
| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| | ||
| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| | ||
| |sourceFolder|source folder for generated code| |OpenAPI/src| | ||
| |sourceFolder|source folder for generated code| |OpenAPI\src| |
There was a problem hiding this comment.
please manually revert to /, as this is the standard for linux-based systems
IIRC this was because it was introduced with TypeScript 3.8 https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html, so to have a lower version requirement for non-deno code? |
That would make sense. What is the guidance for our support of TS versions? 3.8 was released on 20 February 2020. 4+ years is a long time ;) |
yeah, looking at , it seems we now require at least typescript 4.0 |
Blame says 3.x support was dropped about 2 years ago already in 8c57b66, so I think this pull request is a go? |
yes, after the paths are fixed we can merge |
| .travis.yml | ||
| DESCRIPTION | ||
| NAMESPACE | ||
| README.md |
There was a problem hiding this comment.
seems like the sort ordering is not kept stable across systems for this one
There was a problem hiding this comment.
yes, probably because the samples were generated on a windows machine
There was a problem hiding this comment.
Yes, the problem lies here:
There is some code to make the output platform-independent, however the sorting happens BEFORE, on the original paths with \, which then affects the sorting. We can't just sort after, because sorting a list of relative paths is not straightforward, as the nesting information gets lost.
There was a problem hiding this comment.
trying already. Always tricky to do non-platform specific things with platform-specific objects :)
|
#19725 has the changes and commits from here + latest master + regenerated samples. |
Your fix works and the slashes are correct now. But the line Endings will be converted on Windows: |
|
Thank you for checking @Drago92 - I didn't fix the first or last image, that is a separate codepath. I didn't touch the line-endings, they are FILES text eol=lfwhich should then keep them as |
Yeah it will help :) |



PR checklist
Commit all changed files.
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*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming 7.6.0 minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)