I have a type in raml1.0 with 4 properties and I need to implement this case: Two properties out of the four exist only exclusively, so if one of them exists the other should not exist and if they both occur a propper error message is thrown to the user.
For example:
types:
TypeOne:
description: "Need the first two properties exist only mutually exclusively"
type: object
additionalProperties: false
properties:
Prop1:
description: "This is the first property"
type: string
required: true
Prop2:
description: "This should not exist if Prop1 exist"
type: String
required: true (only if Prop1 does not exist)
Prop3:
description: "This is optional if Prop1 exists"
type: string
required: false
Prop4:
description: "This is optional if Prop2 exists"
type: string
required: false
Any help is highly appreciated. BTW, each of these types is a complex object. I only simplified it here just for presentation.