Closed BradCrumb closed 6 years ago
Yes, this was done on purpose to prevent the code generator to overwrite your code and lose it. What might makes more sense is to add a flag so you can specify that you want files to be overwritten. Would you like to create a PR?
Just analyzed the code. We have todo a lot of refactoring because of copyRecursive doesn't support an overwrite option. I think we have to extend this method with our own implementation.
@BradCrumb sorry for the late response. I'm not going to maintain this package for so long anymore. You might want to try out this package https://github.com/fmvilas/openapi3-generator. It should suit your needs and doesn't perform a copyRecursive
anymore.
Usage example:
og -o ./my-api openapi.yaml express
When I update my openapi.json (or yml) with for example an extra endpoint the codegen fails on existing files.
In my opinion the library has to overwrite existing files and has to ignore files according to an ignore file.
The library now simply fails with an error: