For example, the following code
AddVoucherResult:
oneOf:
- $ref: '#/components/schemas/AddVoucherSuccess'
- $ref: '#/components/schemas/AddVoucherFailure'
discriminator:
propertyName: valid
mapping:
true: '#/components/schemas/AddVoucherSuccess'
false: '#/components/schemas/AddVoucherFailure'
AddVoucherFailure:
type: object
required:
- valid
properties:
valid:
type: boolean
reasonForFailure:
type: string
VoucherValidationResult:
type: object
required:
- valid
properties:
valid:
type: boolean
reasonForFailure:
Yields the following:
discriminator:
propertyName: valid
mapping:
"true": /Users/sholto/Development/taxicharge-pass/api/frag/voucher.yml#/components/schemas/AddVoucherSuccess
"false": /Users/sholto/Development/taxicharge-pass/api/frag/voucher.yml#/components/schemas/AddVoucherFailure
As can be seen, the path is the full path location rather than the relative one that is used elsewhere.
For example, the following code
Yields the following:
As can be seen, the path is the full path location rather than the relative one that is used elsewhere.