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

Update REST API schema to use open standards #274

Open
jathanism opened this issue May 11, 2017 · 4 comments
Open

Update REST API schema to use open standards #274

jathanism opened this issue May 11, 2017 · 4 comments
Assignees
Milestone

Comments

@jathanism
Copy link
Contributor

The release of Django REST Framework 3.5.x introduced support for multiple open API standards including OpenAPI/Swagger and CoreAPI.

See: http://www.django-rest-framework.org/api-guide/schemas/

Swagger, especially, facilitates the ability to do client code generation. This can lay the groundwork for simplifying the ability to create NSoT clients in other languages. At the very least, the new schema definitions are more robust and will provide a means for better programmatic enumeration of API endpoints for clients.

@jathanism
Copy link
Contributor Author

It appears we may want to wait until DRF 3.6.4 which should be adding support for the generation of response schemas. See: encode/django-rest-framework#4502

@jathanism jathanism self-assigned this Aug 31, 2017
@jathanism
Copy link
Contributor Author

DRF 3.6.4 is out!

For additional context, one of the primary use-cases for a standardized schema is generating a Golang client using go-swagger.

I've started experimenting with using a project called drf_openapi which allows for explicitly setting request AND response serializers to define the schemas for each. This is necessary for any client code generation for strongly-typed languages (such as Go).

@jathanism jathanism added this to the NSoT 2.0 milestone Aug 31, 2017
@tyler-8
Copy link

tyler-8 commented Apr 18, 2018

drf_openapi has been deprecated in favor of https://github.com/axnsan12/drf-yasg/

@jathanism
Copy link
Contributor Author

Ah yes. I knew that just didn't update the ticket. Thank you!

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

No branches or pull requests

2 participants