-
Notifications
You must be signed in to change notification settings - Fork 154
#342 - introduce standalone flag #345
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
base: master
Are you sure you want to change the base?
#342 - introduce standalone flag #345
Conversation
|
Will this work in case of multiple schemas? I for example have 2 BE services (schemas) and I have to generate 2 different configs, which generate 2 different modules. Example: ChatApiModule and UserApiModule Which i then import: importProvidersFrom([
UserApiModule.forRoot({ rootUrl: USER_SERVICE_ENDPOINT_PREFIX }),
ChatApiModule.forRoot({ rootUrl: CHAT_SERVICE_ENDPOINT_PREFIX }),
]),Will your solution work in this use case? |
|
yes - it works the same way as {
"$schema": "../node_modules/ng-openapi-gen/ng-openapi-gen-schema.json",
"input": "user-api.yaml",
"module": false,
"configuration": "UserApiConfiguration"
}{
"$schema": "../node_modules/ng-openapi-gen/ng-openapi-gen-schema.json",
"input": "chat-api.yaml",
"module": false,
"configuration": "ChatApiConfiguration"
}then you can use it like bootstrapApplication(AppComponent, {
providers: [
provideUserApiConfiguration({ rootUrl: USER_SERVICE_ENDPOINT_PREFIX }),
provideChatApiConfiguration({ rootUrl: CHAT_SERVICE_ENDPOINT_PREFIX }),
]
}) |
|
@luisfpg, is there anything I can do to help expedite this PR? We're very much looking forward to seeing this option being implemented. |
|
Any updates? |
|
I've tested this. Looks great! |
|
@mumenthalers I see there are some conflicts to resolve now. I hope this can be merged soon. 🤞 |
closes #342
changes:
standaloneoption addedstandaloneis setprovideApiConfiguration(accepting value or factory)