Array map elements type definition
For define an array that is, lets take as example:
The best way to solve this could be:
type: array items: allOf: - type: integer - $ref: '#/components/schemas/RsGxsId' minItems: 2 maxItems: 2
allOf I tried to force that the items items (that must be 2), have the two required types, so one of each. The problem is that with this schema I get the following error:
[main] WARN o.o.codegen.DefaultCodegen - allOf with multiple schemas defined. Using only the first one: integer. To fully utilize allOf, please use $ref instead of inline schema definition
So is not well formed for the yaml parsing process.
A solution could be to create a class that reference a primitive class for each one needed (ex: string, array, integer...) and use only
IntReference: type: integer
For the moment I'll change the
allOf annotation for
anyOf that not cause any warning.