Skip to content

Generate names with initialisms#749

Merged
4 commits merged into
oapi-codegen:masterfrom
wtertius:generate_names_with_initialisms
Oct 22, 2022
Merged

Generate names with initialisms#749
4 commits merged into
oapi-codegen:masterfrom
wtertius:generate_names_with_initialisms

Conversation

@wtertius

Copy link
Copy Markdown
Contributor

Adding support of two naming styles:

  • new - with initialisms like MyHTTPHandlerForAPI
  • old - with simple camel case like MyHttpHandlerForApi

By the steps of #715.

@wtertius wtertius force-pushed the generate_names_with_initialisms branch from 664f246 to 74d13ef Compare September 12, 2022 09:16
@ghost

ghost commented Oct 7, 2022

Copy link
Copy Markdown

While it's nice to be consistent with initialisms, I generally feel it's not worth changing the code generation behavior for things like this, because lots of people will need to update their code once it breaks, or we need to flagify this fix to be optional.

@Jleagle

Jleagle commented Oct 13, 2022

Copy link
Copy Markdown
Contributor

Does it not default to the current behaviour, and only a config change will break things, which is expected?

@ghost ghost merged commit 56f7bee into oapi-codegen:master Oct 22, 2022
@ghost

ghost commented Oct 22, 2022

Copy link
Copy Markdown

Sorry, looked too fast. I resolved a bunch of conflicts (hopefully correctly). Thanks for the fix.

@ghost

ghost commented Oct 22, 2022

Copy link
Copy Markdown

Sorry, I had to revert, because some initialisms broke in the existing code, and I had compiler errors. I'm happy to merge this, once it doesn't break existing code (or maybe I merged conflicts improperly).

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants