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

include date and date-time format in coreapi schema generation #5511

merged 1 commit into from Oct 20, 2017


Copy link

@zbyte64 zbyte64 commented Oct 17, 2017

This adds the proper format when translating serializers.DateField & DateTimeField to coreapi/coreschema

Helps down the line with swagger:

Copy link

@carltongibson carltongibson left a comment

This seems reasonable yes.

@tomchristie Can I just ask you to comment on the format magic string values here? They seem reasonable but is there a canonical list of accepted values?

@carltongibson carltongibson requested a review from tomchristie Oct 19, 2017
Copy link
Contributor Author

zbyte64 commented Oct 19, 2017

The format is from OpenAPI v2:

Maybe also relevant; python-coreschema has format validating "email" & "uri":

@carltongibson carltongibson added this to the 3.7.2 milestone Oct 20, 2017
Copy link

carltongibson commented Oct 20, 2017

@zbyte64 Good follow-up. Exactly right.

Give the TODO on CoreSchema we'll take this as-is for now and revisit (hopefully with named constants or such) when that gets tightened up.

Thanks for the input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants