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
  • #5054
Closed
Open
Issue created Jan 20, 2020 by Administrator@rootContributor

[REQ][Slim4] Add package name and version to composer.json

Created by: nschilling

Is your feature request related to a problem? Please describe.

I'm using php-slim4 to generate server code for our API. I want to integrate the generated package in our project with composer using a custom repository of type "path". Unfortunately the composer.json generated by php-slim4 is missing the required keys name and version.

Describe the solution you'd like

name and version should be added to modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache like is is in modules/openapi-generator/src/main/resources/php/composer.mustache. That would solve the problem.

{
    "name": "{{gitUserId}}/{{gitRepoId}}",
    {{#artifactVersion}}
    "version": "{{artifactVersion}}",
    {{/artifactVersion}}

   ...
}

Describe alternatives you've considered

At the moment I use a custom composer.mustache when generating the server code. It is just a copy of the repository version with the above lines added. Unfortunately I'll will have to update the file manually every time php-slim4 changes dependencies.

Additional context

The same problem applies when using php-silex and maybe other php-* generators. It would be nice to have more uniform composer.json files among the those generators.

Assignee
Assign to
Time tracking