Skip to content

Conversation

@yht0827
Copy link

@yht0827 yht0827 commented Jan 17, 2026

Pull Request

Thank you for contributing to swagger-core!

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


Description

Change Schema.required field type from List<String> to Set<String> to prevent duplicate required properties.

  • Change internal storage from List to Set
  • Use TreeSet to maintain alphabetical ordering
  • Keep public API compatible (getRequired() still returns List)
  • Remove duplicates when adding required items
  • Add unit tests for duplicate handling and sorting

Fixes: #5027

Type of Change

  • ✨ New feature
  • ♻️ Refactor (non-breaking change)
  • 🧪 Tests

Checklist

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

Screenshots / Additional Context

스크린샷 2026-01-17 12 09 13
  - Change internal storage from List<String> to Set<String>
  - Use TreeSet to maintain alphabetical ordering
  - Keep public API compatible (getRequired() still returns List)
  - Remove duplicates when adding required items
  - Add unit tests for duplicate handling and sorting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant