-
Notifications
You must be signed in to change notification settings - Fork 535
Open
Labels
Description
Question
Hello, I'm using your library as part of the following component (openapi-generator), and I've already posted an issue here. In the snippet below, you can see what I'm trying to do. I'm trying to map different discriminator property values to the same entity. However, it results in an error.
Affected Version
2.0.30 (at least), seems to be introduced here.
I'm using 2.0.30
Context
responses:
'200':
description: "List of all the objects."
content:
application/json:
schema:
type: array
items:
oneOf:
- $ref: '#/components/schemas/TypeA'
- $ref: '#/components/schemas/TypeB'
discriminator:
propertyName: discriminatorProperty
mapping:
ONE: '#/components/schemas/TypeA'
TWO: '#/components/schemas/TypeB'
THREE: '#/components/schemas/TypeB'
FOUR: '#/components/schemas/TypeB'
FIVE: '#/components/schemas/TypeB'
Additional Details
This is the error:
java.lang.IllegalStateException: Duplicate key #/components/schemas/TypeB (attempted merging values TWO and THREE)
Checklist
- [ y] I have searched the existing issues and documentation before asking.
- [ y] I have provided enough information for others to understand my question.
ivan-mladenovic