OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.97k stars 6.59k forks source link

Question - Is it possible to remove the Api suffix #20113

Closed carlosmmatos closed 1 week ago

carlosmmatos commented 1 week ago

I could just be doing something wrong, but I don't see how you can tell the generator (Ruby in my case) to NOT add the Api suffix. I know there is this:

        --api-name-suffix <api name suffix>
            Suffix that will be appended to all API names ('tags'). Default:
            Api. e.g. Pet => PetApi. Note: Only ruby, python, jaxrs generators
            support this feature at the moment.

But I can't pass an empty string in there to remove it. Any guidance is much appreciated!

wing328 commented 1 week ago

likely that will result in name collision, .e.g renaming PetApi to just Pet will result in compilation errors with the model Pet.

carlosmmatos commented 1 week ago

Okay - I will continue doing this post-processing then, thanks.