Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #6741
Closed
Open
Issue created Jun 22, 2020 by Administrator@rootContributor

[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.

Assignee
Assign to
Time tracking