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
  • #2076
Closed
Open
Issue created Feb 06, 2019 by Administrator@rootContributor

[BUG] allOf to generate a model

Created by: jaumard

I'm using this definition to simulate genericity of paging result:

responses:
        200:
          description: 'List of products for the shop'
          content:
            application/json:
              schema:
                title: ‘ProductList',
                allOf:
                  - $ref: '#/components/schemas/PaginateResults'
                  - type: object
                    properties:
                      results: 
                        type: array
                        items: 
                          $ref: '#/components/schemas/Product'

I'm expecting this to generate a ProductList model that contains PaginateResults and the additional one. Problem is that it doesn't generate ProductList at all only PaginateResults and Product. And the generated method return only a PaginateResults which is incorrect.

I checked under DefaultCodegen::getSchemaType and it return only the first allOf it found, I manage to check and return the title if it's set, but that's solve only half the problem as ProductList is still not generated :/ only the method definition is correct now

Any idea ?

Assignee
Assign to
Time tracking