karlvr/openapi-generator-plus

Ability to have all methods on a single DefaultApi

Opened this issue · 1 comments

Hi,

Thanks for the nice work.

For a simple use-case I would like a single api definition for all my methods. So

const api = new DefaultApi(...)

api.getPets(...)
api.getCars(...)

instead of

const petApi = new PetApi(...)
petApi.getPets(...)

const carApi = new CarApi(...)
carApi.getCars(...)

I've tried to achieve this with @openapi-generator-plus/typescript-fetch-client-generator2, but so far have no luck.

I understand everything should be possible with custom templates, but not sure I have time for that at the moment.

Any advice would be appreciated.

Thanks!

@cge-taal thanks for raising this issue. I think this can be achieved by setting the operationGroupingStrategy in the generator template and just put all of the operations into one group named "default".