Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implied discriminator mappings in oneOf schemas. #1479

Merged
merged 3 commits into from
Dec 27, 2024

Conversation

StarKhan6368
Copy link
Collaborator

@StarKhan6368 StarKhan6368 commented Dec 16, 2024

What: Implied discriminator mappings in oneOf schemas.

Why: Implied discriminator mappings are currently not inferred and require the user to explicitly define them when using oneOf schemas. Please refer to OpenAPI specification documentation.

How: Discriminator mappings will be automatically picked from reference schema names within oneOf schemas, without overriding any mappings defined by the user.

Checklist:

StarKhan6368 and others added 2 commits December 16, 2024 16:32
- Discriminator mappings will be implicitly picked from ref schema names
  from oneOf schemas without overriding any user defined mappings.
…riminator mappings, dataType, target schema, etc.) as per OAS Documentation

- Simplified test schema to only have oneOf with discriminator in request
@harikrishnan83 harikrishnan83 changed the title Implicit discriminator mappings in oneOf schemas. Implied discriminator mappings in oneOf schemas. Dec 27, 2024
@harikrishnan83 harikrishnan83 self-requested a review December 27, 2024 10:44
Copy link
Member

@harikrishnan83 harikrishnan83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@harikrishnan83 harikrishnan83 merged commit 2bdead4 into main Dec 27, 2024
2 checks passed
@harikrishnan83 harikrishnan83 deleted the implicit-discriminator-mapping branch December 27, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants