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

[dart-jaguar] Adds option to customise the generated API client name #3234

Merged
merged 5 commits into from
Jul 13, 2019

Conversation

josh-burton
Copy link
Contributor

@josh-burton josh-burton commented Jun 27, 2019

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.
  • Filed the PR against the correct branch: master, 4.1.x, 5.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Derives the generated API class name from the pub name, rather than the generic JaguarApiGen name.

CC @ircecho @swipesight @jaumard

Sorry, something went wrong.

@wing328
Copy link
Member

wing328 commented Jun 28, 2019

@athornz thanks for the PR. Quick question about the client name. Is that related to the pubName setting somehow?

        pubName
            Name in generated pubspec

If yes, shall we reuse pubName instead?

(disclosure: no expert in Dart)

@josh-burton
Copy link
Contributor Author

It could make sense to reuse it, but the naming convention for dart packages is snake_case which is likely not what the user would want for the class name.

@wing328
Copy link
Member

wing328 commented Jun 28, 2019

dart packages is snake_case which is likely not what the user would want for the class name.

We can use camelize, etc string utility function to convert pubName into proper format for {{clientName}} in the generator

@josh-burton
Copy link
Contributor Author

Sure that seems like a good option 👍

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…ient name from pub name
@wing328 wing328 changed the base branch from master to 4.1.x July 2, 2019 08:59
@wing328
Copy link
Member

wing328 commented Jul 2, 2019

The CircleCI error is not related to this PR.

Since it's a breaking change with fallback, I've retargeted this PR to 4.1.x branch.

@wing328 wing328 added this to the 4.1.0 milestone Jul 12, 2019
@wing328 wing328 changed the base branch from 4.1.x to master July 12, 2019 16:20
@wing328 wing328 merged commit f04ef76 into OpenAPITools:master Jul 13, 2019
@josh-burton josh-burton deleted the dart-jaguar-client-name branch July 13, 2019 04:33
@josh-burton
Copy link
Contributor Author

Thanks!

@wing328
Copy link
Member

wing328 commented Jul 13, 2019

@athornz have a nice weekend

@wing328
Copy link
Member

wing328 commented Aug 10, 2019

@athornz thanks for the PR, which has been included in the 4.1.0 release: https://twitter.com/oas_generator/status/1160000504455319553

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.

None yet

2 participants