# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-drf-yasg VERSION= 1.21.11 KEYWORDS= python VARIANTS= v13 v14 SDESC[v13]= Django Swagger/OpenAPI spec generator (3.13) SDESC[v14]= Django Swagger/OpenAPI spec generator (3.14) HOMEPAGE= https://github.com/axnsan12/drf-yasg CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/68/ea/c94362b34f3d81ac2cf5e3e955773f7d6c3813866bdc3869480c230827b7 DISTFILE[1]= drf_yasg-1.21.11-py3-none-any.whl:main DIST_SUBDIR= python-src DF_INDEX= 1 SPKGS[v13]= single SPKGS[v14]= single OPTIONS_AVAILABLE= PY313 PY314 OPTIONS_STANDARD= none VOPTS[v13]= PY313=ON PY314=OFF VOPTS[v14]= PY313=OFF PY314=ON DISTNAME= drf_yasg-1.21.11.dist-info GENERATED= yes [PY313].RUN_DEPENDS_ON= python-Django:single:v13 python-djangorestframework:single:v13 python-inflection:single:v13 python-packaging:single:v13 python-pytz:single:v13 python-PyYAML:single:v13 python-uritemplate:single:v13 [PY313].USES_ON= python:v13,wheel [PY314].RUN_DEPENDS_ON= python-Django:single:v14 python-djangorestframework:single:v14 python-inflection:single:v14 python-packaging:single:v14 python-pytz:single:v14 python-PyYAML:single:v14 python-uritemplate:single:v14 [PY314].USES_ON= python:v14,wheel [FILE:2829:descriptions/desc.single] :alt: Live Demo **************** OpenAPI 3.0 note **************** If you are looking to add Swagger/OpenAPI support to a new project you might want to take a look at `drf-spectacular `_, which is an actively maintained new library that shares most of the goals of this project, while working with OpenAPI 3.0 schemas. OpenAPI 3.0 provides a lot more flexibility than 2.0 in the types of API that can be described. ``drf-yasg`` is unlikely to soon, if ever, get support for OpenAPI 3.0. ******** Features ******** - full support for nested Serializers and Schemas - response schemas and descriptions - model definitions compatible with codegen tools - customization hooks at all points in the spec generation process - JSON and YAML format for spec - bundles latest version of `swagger-ui `_ and [redoc] for viewing the generated documentation - schema view is cacheable out of the box - generated Swagger schema can be automatically validated by `swagger-spec-validator `_ - supports Django REST Framework API versioning with URLPathVersioning and NamespaceVersioning; other DRF or custom versioning schemes are not currently supported :alt: GitHub Workflow Status :alt: Codecov :alt: PyPI :alt: Gitter :alt: ReadTheDocs .. |nbsp| unicode:: 0xA0 :trim: drf-extra-fields ================= Integration with `drf-extra-fields `_ has a problem with Base64 fields. The drf-yasg will generate Base64 file or image fields as Readonly and not required. Here is a workaround code for display the Base64 fields correctly. .. code:: python class PDFBase64FileField(Base64FileField): ALLOWED_TYPES = ['pdf'] class Meta: swagger_schema_fields = { 'type': 'string', 'title': 'File Content', 'description': 'Content of the file base64 encoded', 'read_only': False # <-- FIX } def get_file_extension(self, filename, decoded_file): try: PyPDF2.PdfFileReader(io.BytesIO(decoded_file)) except PyPDF2.utils.PdfReadError as e: logger.warning(e) else: return 'pdf' ************ Contributing ************ See https://drf-yasg.readthedocs.io/en/stable/contributing.html for details. This repository adheres to semantic versioning standards. For more information on semantic versioning visit [SemVer]. To keep our process simple we merge pull requests into the master branch we use git tags for releases. We use labels to mark which issues are intended for each version. For example: .. figure:: ./docs/images/flow.png :width: 70% :figwidth: image [FILE:123:distinfo] ec741f313b3b5f0b5fc8c1e1b6ed323c34f1f492a41fe7cc7421d8c6de9753e4 4291885 python-src/drf_yasg-1.21.11-py3-none-any.whl