You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 2.2.3 and below, the typescript-fetch generator accepted method parameters in an object, but 2.3.0 has regressed/made a very breaking change so that all parameters have to be passed individually:
The 2.2.3 behaviour for typescript-fetch was inconsistent with the behaviour for typescript-angular, so there is an existing issue saying that typescript-angular should accept params in an object
Suggest a fix/enhancement
Restore method signature to 2.2.3 form.
The text was updated successfully, but these errors were encountered:
Depending on the position of arguments means a changed order could easily break the generated API
Another problem: our API uses an "options" parameter. Because the typescript-fetchgenerator appends it's own "options?: any", there is a name collision:
Failed to compile.
Module parse failed: Argument name clash (5251:89)
You may need an appropriate loader to handle this file type.
| * @throws {RequiredError}
| */
| findEntity: function (name, options, options) {
Description
In 2.2.3 and below, the
typescript-fetch
generator accepted method parameters in an object, but 2.3.0 has regressed/made a very breaking change so that all parameters have to be passed individually:e.g.,
I couldn't find any reference to this as a deliberate change in any of the release notes
Swagger-codegen version
2.3.0 (regressed since 2.2.3)
Steps to reproduce
Generate any operation with parameters using
typescript-fetch
.Related issues/PRs
I eventually managed to track the regression down to #6130, as
api.mustache
was completely rewritten when it was "copied" from here to here. Here is a diff of the changes which were made in #6130 to api.mustache, as Git/GitHub didn't detect a rename and show a useful diff (due to the number of changes).The 2.2.3 behaviour for
typescript-fetch
was inconsistent with the behaviour fortypescript-angular
, so there is an existing issue saying thattypescript-angular
should accept params in an objectSuggest a fix/enhancement
Restore method signature to 2.2.3 form.
The text was updated successfully, but these errors were encountered: