8000 Breaking Change: Fix JSON Schema generation for constrained dates by Viicos · Pull Request #10185 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@Viicos
Copy link
Member
@Viicos Viicos commented Aug 20, 2024

This is technically a breaking change, but the previously generated JSON Schema was:

  • not valid JSON
  • not a valid JSON Schema

So I think we should document the breaking change but not do any deprecation process.

Change Summary

Related issue number

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

`(exclusive)Minimum/Maximum` is not applicable
@github-actions github-actions bot added the relnotes-fix Used for bugfixes. label Aug 20, 2024
@cloudflare-workers-and-pages
Copy link

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 061ce39
Status: ✅  Deploy successful!
Preview URL: https://8bd2c11c.pydantic-docs.pages.dev
Branch Preview URL: https://json-schema-date.pydantic-docs.pages.dev

View logs

@codspeed-hq
Copy link
codspeed-hq bot commented Aug 20, 2024

CodSpeed Performance Report

Merging #10185 will not alter performance

Comparing json-schema-date (061ce39) with main (f6f1264)

Summary

✅ 17 untouched benchmarks

@github-actions
Copy link
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic
  json_schema.py
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Contributor
@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! I've changed the title of the PR to reflect the breaking nature to make sure we document this in the release notes.

@sydney-runkle sydney-runkle added relnotes-change Used for changes to existing functionality which don't have a better categorization. and removed relnotes-fix Used for bugfixes. labels Aug 20, 2024
@sydney-runkle sydney-runkle changed the title Fix JSON Schema generation for constrained dates Breaking Change: Fix JSON Schema generation for constrained dates Aug 20, 2024
@sydney-runkle
Copy link
Contributor

@Viicos, is there any other way to express these constraints for datetime / similar schemas that is valid according to the json schema spec?

@Viicos
Copy link
Member Author
Viicos commented Aug 20, 2024

What we need is json-schema-org/json-schema-spec#116, seems like it isn't going to happen unfortunately.

@Viicos Viicos merged commit dfe8415 into main Aug 20, 2024
@Viicos Viicos deleted the json-schema-date branch August 20, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants

0