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

feat: additional tweaks to json schema mixed type handling #761

Merged
merged 1 commit into from
May 4, 2023

Conversation

erunion
Copy link
Member

@erunion erunion commented May 4, 2023

🧰 Changes

This reworks some of the work I did in #760.

  • { type: ['string', 'number'] } is no longer transformed into a oneOf.
  • { type: ['string', 'null'] } is no longer transformed into { type: 'string', nullable: true }.
  • type: null is now being converted to type: 'null'.
  • If a mixed type contains an array or object that non-primitive is now moved into an oneOf.
  • Added unit tests for const support.

@erunion erunion added enhancement New feature or request refactor Issues about tackling technical debt labels May 4, 2023
@erunion erunion merged commit 57d4442 into main May 4, 2023
@erunion erunion deleted the fix/json-schema-mixed-type-tweaks branch May 4, 2023 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Issues about tackling technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant