Skip to content
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] Fix generated README when using apiModulePrefix #7725

Conversation

sorohan
Copy link
Contributor

@sorohan sorohan commented Oct 15, 2020

fixes #7722

@sorohan sorohan force-pushed the bugfix/typescript-angular-docs-with-module-prefix branch 2 times, most recently from d3349a5 to 06d17ef Compare October 15, 2020 15:28
import { ApiModule } from 'my-api-path';
import { ApiModule as OtherApiModule } from 'my-other-api-path';
import { {{apiModuleClassName}} } from 'my-api-path';
import { OtherApiModule } from 'my-other-api-path';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please keep the alias example with as, see #7722 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

This is to ensure that all services are treated as singletons.

#### Using multiple OpenAPI files / APIs / ApiModules
In order to use multiple `ApiModules` generated from different OpenAPI files,
you can create an alias name when importing the modules
in order to avoid naming conflicts:
you can avoid naming conflicts by configuring `apiModulePrefix` when generating other modules.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please reword to include the case when the prefix cannot be set:
#7722 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just reverted the wording (but changed it to use {{apiModuleClassName}}). I think it's best like this. Now only the sample for with-prefixed-module-name has changed.

@macjohnny macjohnny added this to the 5.0.0 milestone Oct 15, 2020
@macjohnny
Copy link
Member

@sorohan thanks for your contribution

@sorohan sorohan force-pushed the bugfix/typescript-angular-docs-with-module-prefix branch 2 times, most recently from 2a7b741 to db16c02 Compare October 15, 2020 17:54
@macjohnny
Copy link
Member

@sorohan please rebase onto the current master and update the readme for the customized configuration class name

@sorohan sorohan force-pushed the bugfix/typescript-angular-docs-with-module-prefix branch from db16c02 to 48e69e5 Compare October 16, 2020 14:23
@sorohan
Copy link
Contributor Author

sorohan commented Oct 16, 2020

@macjohnny I've rebased it now. I'm not sure what update to the readme you mean. Can you clarify?

Copy link
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@macjohnny macjohnny merged commit 34d2e25 into OpenAPITools:master Oct 16, 2020
jimschubert added a commit that referenced this pull request Oct 17, 2020
* master: (66 commits)
  [Typescript][Angular] Fix generated README when using apiModulePrefix (#7725)
  remove outdated scala files (#7723)
  [FEAT][TYPESCRIPT-ANGULAR] Add configurationPrefix option to allow generating unique configuration token (#7731)
  [bug] Fix FILES sort and path provider issue (#7729)
  better csharp tests (#7727)
  [go] Improve examples generation (#7576)
  Fixes #7635: typescript-inversify generator wrongly handles array type parameters (#7636)
  [Java] Fix import mapping for arrays with reference items of type string (#7182)
  [Java][Native] Support oneOf/anyOf schemas (#7263)
  [BUG][Ada] Incorrect client Ada code generated (#7719)
  add cake, sbt integration (#7713)
  Use 3.0 spec in documentations, update docs  (#7710)
  remove github.com/antihax/optional from go.sum (#7692)
  Update junit to newer version (4.13.1) (#7690)
  [Fix/Dart2] Resolve an exception with status 204 and no body. (#7647)
  [typescript-angular] pass array as a single JSON string to url query when queryParamObjectFormat=json (fix #7620) (#7649)
  Add back HttpSigningConfiguration.cs
  remove HTTPSigningConfiguration.cs
  add AnyType support to Swift generators (#7644)
  fix warning, remove trailing spaces (#7659)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG][TYPESCRIPT-ANGULAR] client generated README with apiModulePrefix
2 participants