Skip to content

Field in schema with DateTimeField isn't generated as date-time type. #6091

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
6 tasks done
NN--- opened this issue Jul 23, 2018 · 2 comments
Closed
6 tasks done

Field in schema with DateTimeField isn't generated as date-time type. #6091

NN--- opened this issue Jul 23, 2018 · 2 comments

Comments

@NN---
Copy link

NN--- commented Jul 23, 2018

Checklist

  • I have verified that that issue exists against the master branch of Django REST framework.
  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • This is not a usage question. (Those should be directed to the discussion group instead.)
  • This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
  • I have reduced the issue to the simplest possible case.
  • I have included a failing test as a pull request. (If you are unable to do so we can still accept the issue.)

Steps to reproduce

Add DateTimeField to REST API.

Expected behavior

myurl/schema should provide JSON with field saying it is date-time and not just any string.

Actual behavior

       "name": "myDate",
                    "required": true,
                    "location": "form",
                    "schema": {
                        "_type": "string",
                        "title": "MyDate",
                        "description": ""
                    }
@carltongibson
Copy link
Collaborator

carltongibson commented Jul 24, 2018

Duplicate of #5511

This was already addressed to the extent that's possible with CoreAPI as it stands.
Should improve with upcoming changes.

@NN---
Copy link
Author

NN--- commented Jul 24, 2018

Are there any expectations when this will be working with django release ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants