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

Support json schema generation for Enum types with no cases. #7927

Merged
merged 3 commits into from Oct 25, 2023

Conversation

sydney-runkle
Copy link
Member

@sydney-runkle sydney-runkle commented Oct 25, 2023

Change Summary

Support json schema generation for Enum types with no cases (via the same json schema generation pattern as is used for Enum types with cases).

Related issue number

Fix #7896

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @samuelcolvin

@sydney-runkle
Copy link
Member Author

Please review

@cloudflare-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5d08d93
Status: ✅  Deploy successful!
Preview URL: https://6db28800.pydantic-docs2.pages.dev
Branch Preview URL: https://no-cases-enum-json-schema.pydantic-docs2.pages.dev

View logs

@sydney-runkle sydney-runkle added the relnotes-change Used for changes to existing functionality which don't have a better categorization. label Oct 25, 2023
@sydney-runkle sydney-runkle merged commit 026be6a into main Oct 25, 2023
60 of 62 checks passed
@sydney-runkle sydney-runkle deleted the no-cases-enum-json-schema branch October 25, 2023 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review relnotes-change Used for changes to existing functionality which don't have a better categorization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

model_json_schema fails with empty enum
3 participants