Open dapperdandev opened 3 years ago
Sure, go on! 🚀
The more features this plugin wraps, the better!
Awesome! I'm pretty swamped between work and school at the moment, so it might be a couple of months, but I'll build this out once things slow down a little.
When using
opencli-generator-cli
manually, I'm able to pass a flag to specify a folder that contains template overrides. I'd love to have this available in this tool.In my case, I'm using
typescript-angular
and the defaultapi.service.mustache
template adds a lot of bloat I don't want. I copied the .mustache file from https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/typescript-angular, modified it to my liking, then added it to a folder in my project namedcustom
. This allows me to run:openapi-generator generate -i spec.yaml -g typescript-angular -t ./custom/ -o ./output/
The tool is smart enough to use custom templates if available, and use the default generator's templates otherwise.
https://openapi-generator.tech/docs/templating#modifying-templates
I'm happy to build this feature if you find it useful. :)