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
  • #7113
Closed
Open
Issue created Aug 02, 2020 by Administrator@rootContributor

[REQ] Pair of server and storage codegens

Created by: ybelenko

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

I would like to generate both server stubs and MySQL schema for my project, but it's complicated to connect them right now. For instance, php-slim4 codegen doesn't know database table/field names whilemysql-schema generator cannot access model property names. With current implementation it's very hard to use ORM(Object-Relational Mapping) engines with Active Record patterns.

Describe the solution you'd like

I was the first person who said that standalone MySQL generator without server framework makes no sense. However @wing328 convinced me to create it anyway and I did. As a result, we have server and storage codegens which cannot communicate with each other. I'm not saying mysql-schema is completely useless right now, but it close to it.

  1. The first thing that comes to mind is to create new mixed generator like php-slim4-mysql-schema, but it feels like a bad move.

  2. Add option storage=mysql to current php-slim4 codegen sounds right, but I think it's very hard to implement, because then I need to merge all MySQL generator features completely into server codegen. Also it requires to wrap all MySQL codegen variables with new variable like {{#mysql-schema-codegen}}{{/mysql-schema-codegen}}. Maybe I'm overreacting and it's not so difficult.

Describe alternatives you've considered

I'm submitting this with discussion label because I would like to hear any suggestions from community.

cc @OpenAPITools/generator-core-team

Assignee
Assign to
Time tracking