openapi-merge
openapi-merge copied to clipboard
When working with disputes, a discriminator's mappings are not prefixed.
While working with a specification which has a discriminator with a mapping inside of a oneOf, for example: yaml
components:
schemas:
TestSchema:
oneOf:
- $ref: '#/components/schemas/TestSchema1'
- $ref: '#/components/schemas/TestSchema2'
discriminator:
propertyName: type
mapping:
t1: '#/components/schemas/TestSchema1'
t2: '#/components/schemas/TestSchema2'
The oneOf is successfully transformed, however the mapping is left as is.
For example, if I was using prefix: Disputed
the result would be:
components:
schemas:
TestSchema:
oneOf:
- $ref: '#/components/schemas/DisputedTestSchema1'
- $ref: '#/components/schemas/DisputedTestSchema2'
discriminator:
propertyName: type
mapping:
t1: '#/components/schemas/TestSchema1'
t2: '#/components/schemas/TestSchema2'
The mapping references should also be replaced.