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