#342 - introduce standalone flag#345
Open
mumenthalers wants to merge 3 commits intocyclosproject:masterfrom
Open
#342 - introduce standalone flag#345mumenthalers wants to merge 3 commits intocyclosproject:masterfrom
mumenthalers wants to merge 3 commits intocyclosproject:masterfrom
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? |
Contributor
Author
|
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. 🤞 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #342
changes:
standaloneoption addedstandaloneis setprovideApiConfiguration(accepting value or factory)