Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Utilities to generate OpenAPI-compatible schema from API made with Django Rest Framework
.. image:: https://img.shields.io/pypi/v/drf_openapi.svg :target: https://pypi.python.org/pypi/drf_openapi
.. image:: https://img.shields.io/travis/limdauto/drf_openapi.svg :target: https://travis-ci.org/limdauto/drf_openapi
.. image:: https://readthedocs.org/projects/drf-openapi/badge/?version=latest :target: https://drf-openapi.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
.. image:: https://pyup.io/repos/github/limdauto/drf_openapi/shield.svg :target: https://pyup.io/repos/github/limdauto/drf_openapi/ :alt: Updates
.. image:: https://badges.gitter.im/drf_openapi/Lobby.svg :target: https://gitter.im/drf_openapi/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge :alt: Join the chat at https://gitter.im/drf_openapi/Lobby
Generates OpenAPI-compatible schema from API made with Django Rest Framework. Use ReDoc <https://github.com/Rebilly/ReDoc>
_ as default interface instead of Swagger.
First-class support for API versioning changelog & method-specific schema definition.
.. figure:: https://raw.githubusercontent.com/limdauto/drf_openapi/master/images/screenshot.png :scale: 80%
.. contents::
Django Rest Framework has an API schema generation/declaration mechanism <http://www.django-rest-framework.org/api-guide/schemas/>
_ provided by
coreapi <http://www.coreapi.org/>
_ standard. There are a couple of problems with the current ecosystem:
OpenAPI <https://www.openapis.org/>
_ which is a much more popular API standard with superior tooling support, i.e. Swagger et. al.This project was born to bridge the gap between DRF and OpenAPI. The high-level requirements are as followed:
>1.0, <=2.0
200
It's important to stress the non-intrusiveness requirement, not least because I want to minimize what I will have to change when DRF itself decides to support OpenAPI officially, if at all.
serializers <http://www.django-rest-framework.org/api-guide/serializers/>
_
schema
and :code:serializer
are used interchangablyVersionedSerializers
.view_config
decorator.Meta
classview_config(response_serializer=FooSerializer, validate_response=True)
Currently DRF OpenAPI only supports DRF project that has versioning <http://www.django-rest-framework.org/api-guide/versioning/#urlpathversioning>
_ enabled.
I have only tested URLPathVersioning <http://www.django-rest-framework.org/api-guide/versioning/#urlpathversioning>
_ but I intend to suppor the full range of
versioning scheme supported by DRF.
Please read the docs <https://drf-openapi.readthedocs.io>
_ for a quickstart.
Also I have recreated the example in DRF tutorial <http://www.django-rest-framework.org/tutorial/quickstart/>
_ with OpenAPI schema enabled
in <examples/>
_.
MIT
VersionedSerializer
view_config
VersionedSerializer
into :code:VersionedSerializers
Issue 27 <https://github.com/limdauto/drf_openapi/issues/27>
_)tuffnatty <https://github.com/limdauto/drf_openapi/pull/35>
_)tuffnatty <https://github.com/limdauto/drf_openapi/pull/36>
_)Issue 28 <https://github.com/limdauto/drf_openapi/issues/28>
_)Issue 31 <https://github.com/limdauto/drf_openapi/issues/31>
_)Issue 28 <https://github.com/limdauto/drf_openapi/issues/28>
_)werwty <https://github.com/werwty>
_) as a maintainerIssue 84 <https://github.com/limdauto/drf_openapi/issues/84>
) and (Issue 92 <https://github.com/limdauto/drf_openapi/issues/92>
)Issue 57 <https://github.com/limdauto/drf_openapi/issues/57>
_)FAQs
Utilities to generate OpenAPI-compatible schema from API made with Django Rest Framework
We found that drf-openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.