-
-
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-rxjs] runtime and api cleanup #3316
[typescript-rxjs] runtime and api cleanup #3316
Conversation
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
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.
the changes are not backwards-compatible. so this should go to the 5.x
branch or we should prefer the current interfaces. what do you think?
@@ -184,12 +171,11 @@ export const throwIfRequired = (params: {[key: string]: any}, key: string, nickn | |||
} | |||
} | |||
|
|||
export interface RequestContext extends RequestArgs {} | |||
export interface ResponseContext extends RequestArgs { |
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.
this isnt backwards compatible, so I would not delete ResponseContext
map((response) => { | ||
if (postMiddlewares) { | ||
postMiddlewares.forEach((mw) => (response = mw.post!({ ...params, response }))); |
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.
this isn't backwards-compatible so I would revert it
cc @akehir |
according to https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches it should be ok to merge this into |
|
@macjohnny, during the release, the 4.1.0 branch would be merged into master, and future 4.1.x patch releases would be branched of master (unexpectedly containing the breaking change). Merging to master seems to violate the merge direction description of the git branches wiki entry. How are breaking changes documented in order to help people experiencing the breakage to be able to fix this easily? I understand that simplifying the template is a good idea, however, I would be reluctant to introduce unexpected breaking changes (especially since whoever doesn't like the template can easily override it in the local project), if it cannot be communicated properly. |
I kind of had the same thoughts as @akehir. |
now that |
@macjohnny migration steps are in the description with before and after? Or what do you mean? |
I think the description in the PR should be enough, but maybe it might be worth adding an additional line explaining explicitly which signature changed. |
…ded, improve formatting
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master
,4.1.x
,5.0.x
. Default:master
.Description of the PR
This PR simplifies models
RequestArgs
andResponseArgs
and makes them an alias for{ AjaxRequest, AjaxResponse } from 'rxjs/ajax';
. Also parameter names make more sense now and unneeded checks are removed.For people that have previously applied any middlewares this is breaking due to the model changes but it is quite easy to fix. Docs where also extended.
Middleware Before
Middleware After
@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10)