n4v4j0
6 years agoOccasional Visitor
Swagger-Editor: Conditional definition of attribute
Hi,
I am trying to figure out how to model following scenario in Swagger-Editor:
I have 2 objects of type 'XDocument' and 'YDocument'.
Both have an attribute customer of type: 'Customer'.
'Customer' has attribute refNr of type: Integer.
In case of 'XDocument' customer.refNr is a constant -> customer.refNr = 1
In case of 'YDocument' customer.refNr can be one of the numbers from {1,2,3}.
In my yml-File, I would like to model Customer and respectively its argument refNr according to given scenario.
Is that possible and if yes, how can I do that?
Thanks in advance!