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
  • #20
Closed
Open
Issue created May 13, 2018 by Administrator@rootContributor

Code clean-up: refactor CodegenResponse, CodegenProperty and CodegenParameter

Created by: jmini

CodegenResponse, CodegenProperty and CodegenParameter are very similar, but for the moment they to not share nothing.

With OAS2 specification, it made sense to have three objects because every of these concepts was different in the spec. Now with OAS3, everything is Schema based. But in our methods fromModel(..), fromProperty(..) and fromResponse(..) reimplement everything three times…

The first step will be to identify what is common between CodegenResponse, CodegenProperty and CodegenParameter. A new abstract Codegen should be created: AbstractSchemaBasedCodegen (or something like that). It contains the common stuff and it is derived from the schema.

Then we will be able to remove the redundancy in DefaultCodegen and we will have something that works the same way for consumers of CodegenResponse, CodegenProperty and CodegenParameter.

Assignee
Assign to
Time tracking