oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

Generate names with initialisms

Open wtertius opened this issue 2 years ago • 1 comments

Adding support of two naming styles:

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

By the steps of https://github.com/deepmap/oapi-codegen/pull/715.

wtertius avatar Sep 12 '22 09:09 wtertius

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.

deepmap-marcinr avatar Oct 07 '22 03:10 deepmap-marcinr

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

Jleagle avatar Oct 13 '22 14:10 Jleagle

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

deepmap-marcinr avatar Oct 22 '22 15:10 deepmap-marcinr

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).

deepmap-marcinr avatar Oct 22 '22 15:10 deepmap-marcinr