-
-
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-angular: add providedIn for Angular 9+ #8324
Conversation
technical committee for typescript |
Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors. Let me know if you need help fixing it. |
d2b1df8
to
ab5cb4d
Compare
Adding new option, providedIn, for generator typescript-angular Keep providedInRoot for backward compatibility but mark as deprecated for Angular 9+ fix: OpenAPITools#6432
infos about providedIn Mark providedInRoot as deprecated
using typescript-angular-v9-provided-in-any.yaml
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 providers
array should also be adapted according the the selected providedIn
option:
Lines 15 to 17 in ab5cb4d
providers: [{{^providedInRoot}} | |
{{#apiInfo}}{{#apis}}{{classname}}{{^-last}}, | |
{{/-last}}{{/apis}}{{/apiInfo}} {{/providedInRoot}}] |
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
@UnleashSpirit thanks for your contribution! |
Hmm ok, now I guess I need some explanation. |
simply run
|
Ok I figured out why, I'm on windows and newline are a mix of LF & CRLF currently. |
commit all changed files with WSL |
Ok so I changed my mind, I clone again my repo with WLS so only LF newline. May be add |
Adding new option, providedIn, for generator typescript-angular
Keep providedInRoot for backward compatibility but mark as deprecated for Angular 9+
fix: #6432
PR checklist
./bin/generate-samples.sh
to update all Petstore samples related to your fix. 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.1.x
,6.0.x