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

Use duration instead of time-delta type for timedelta on JSON schema #5864

Merged
merged 1 commit into from
May 25, 2023

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented May 25, 2023

Change Summary

Replaces {"type": "time-delta"} by {"type": "duration"} for timedelta objects, as described on the spec.

Related issue number

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

selected review: @dmontagu

Selected Reviewer: @lig

@Kludex Kludex requested a review from dmontagu May 25, 2023 11:04
@cloudflare-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 56c6ced
Status: ✅  Deploy successful!
Preview URL: https://d4c43efb.pydantic-docs2.pages.dev
Branch Preview URL: https://fix-timedelta-json-schema.pydantic-docs2.pages.dev

View logs

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

LGTM, @dmontagu please review.

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

oops

@dmontagu dmontagu merged commit 91caede into main May 25, 2023
53 checks passed
@dmontagu dmontagu deleted the fix/timedelta-json-schema branch May 25, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON schema for timedelta type (along with validation/serialization behavior)
4 participants