Created by: sakari
(this is fairly work in progress but I would like to get feedback if this is at all sensible approach to this before going much further)
Fixes https://github.com/OpenAPITools/openapi-generator/issues/2011
For Models openAPITypes map the idea is to encode oneOf values as string
oneOf[type1, .., typeN]
in the property dataType template variable
For Models that consist of a oneOf block like
model:
oneOf:
- $ref: modelA
- type: array
items: string
We generate a new template variable oneOfTypes containing the list of
options which in turn get used to generate a new method Model::oneOf
which return a list
['\fully\qualified\name\modelA', 'string[]']
@jebentier @dkarlovi @mandrean @jfastnacht @ackintosh @ybelenko @renepardon @wing328