Forum Discussion

n4v4j0's avatar
n4v4j0
Occasional Visitor
6 years ago

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!

No RepliesBe the first to reply