-
-
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
[BUG][TYPESCRIPT-ANGULAR] client generated README with apiModulePrefix #7722
Comments
@sorohan a PR would be appreciated. to |
No, that's not quite right, and that's why this section is a bit strange. Then you would have:
With the PR it will be
or
With the implication that you used But I'm open for suggestions on how to make that more clear :) Edit: I've opened the PR and tried to improve the wording, so we can discuss it there. |
@sorohan the line in question |
Description
When specifying the
apiModulePrefix
the generated README still says to importApiModule
.If you specify a prefix (eg
PetStore
) the generated README should say to importPetStoreApiModule
.openapi-generator version
4.3.0 (also checked on master)
OpenAPI declaration file content or url
The petstore YAML is sufficient to reproduce it.
Command line used for generation
You can generate using the samples, as the generated code contains the bug.
You can use the
typescript-angular-with-prefixed-module-name-v8
sample:Steps to reproduce
mvn clean package
)sh bin/generate-samples.sh bin/configs/typescript-angular-with-prefixed-module-name-v8.yaml
Expected result:
Sample readme (
samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/README.md
) should containPetStoreApiModule
.Actual result:
Sample readme contains
ApiModule
.See the general usage generated for the sample.
Suggest a fix/enhancement
I have a branch with the fix, and I can make a PR if you agree. See: https://github.com/OpenAPITools/openapi-generator/compare/master...sorohan:bugfix/typescript-angular-docs-with-module-prefix?expand=1
The thing I'm least sure about is updating the section on "Using multiple OpenAPI files / APIs / ApiModules". The advice given currently is to use:
But I think it would be better to just recommend people to use the
apiModulePrefix
option, as I assume that's what it's there for.The text was updated successfully, but these errors were encountered: