Skip to content

Comments

feat(maps): set propertyNames for string map keys and support oneOf#495

Open
davidkna wants to merge 1 commit intoGREsau:masterfrom
davidkna:enum-propertyNames
Open

feat(maps): set propertyNames for string map keys and support oneOf#495
davidkna wants to merge 1 commit intoGREsau:masterfrom
davidkna:enum-propertyNames

Conversation

@davidkna
Copy link
Contributor

This PR:

  1. Implements the propertyNames field for map schemas (similar to feat: add enum map key #384), but with validation logic to only add it for string-typed keys. This avoids validator confusion (as in the test suite) with non-string key types.
  2. Adds support for oneOf in addition to anyOf (added via Added better map support #452) when analyzing map key schemas. This enables proper handling of enums with documentation comments, which generate oneOf schemas instead of anyOf.

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