[REQ] Pre generation scripts
Created by: ybelenko
Is your feature request related to a problem? Please describe.
Current php-lumen
server generator contains 30 files where 2 files are dynamic and 28 files are static. We can wipe off 28 files because following command from Lumen documentation generates them for us:
$ composer create-project --prefer-dist laravel/lumen lib
Creating a "laravel/lumen" project at "./lib"
[InvalidArgumentException]
Project directory "/Users/ybelenko/Sites/openapi-generator/samples/server/petstore/php-lumen/lib" is not empty.
But, this script refuses to generate project in non-empty directory.
Describe the solution you'd like
Somehow I need to clean output directory(maybe with a warning of data loss) then run composer create-project
and only after that run generation to overwrite dynamic files. It feels like I need PRE PROCESS script or something like that.
Describe alternatives you've considered
Keep storing 28 static files like we did before.
Or we can describe in readme that user needs to generate files, then move them in different folder, run create project
script then move files back. In this scenario I guess that samples build will not pass CI because of missed files.