Skip to content

Conversation

@IgorMaj
Copy link

@IgorMaj IgorMaj commented Nov 13, 2025

Pull Request

Thank you for contributing to swagger-parser!

Please fill out the following checklist to help us review your PR efficiently.


Description

Fixes the issue described in #2222 . Namely, when resolving references inside ExternalRefProcessor.java discriminator key and value were getting mixed up resulting in DuplicateKeyError.

As the result of that, it was not possible to map different discriminator values to the same entity.

Fixes:

Type of Change

  • [ x] 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor (non-breaking change)
  • 🧪 Tests
  • 📝 Documentation
  • 🧹 Chore (build or tooling)

Checklist

  • I have added/updated tests as needed
  • I have added/updated documentation where applicable
  • The PR title is descriptive
  • The code builds and passes tests locally
  • I have linked related issues (if any)

Screenshots / Additional Context

@IgorMaj IgorMaj changed the title Fixed #2222 by switching key and value in map and extended the test Fixed #2222 (Not being able to have different discriminator values map to the same entity) by switching key and value in map Nov 13, 2025
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.

1 participant