1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00

New port: www/py-drf-yasg

Generate real Swagger/OpenAPI 2.0 specifications from a Django Rest
Framework API.

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 or flex
- supports Django REST Framework API versioning with URLPathVersioning
  and NamespaceVersioning (other DRF or custom versioning schemes are
  not currently supported)

WWW: https://github.com/axnsan12/drf-yasg

PR:		227344
Submitted by:	Kai <freebsd_ports@k-worx.org>
This commit is contained in:
Kurt Jaeger 2018-04-17 20:18:05 +00:00
parent fb1da81342
commit dddf2b5f39
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=467653
4 changed files with 62 additions and 0 deletions

View File

@ -1627,6 +1627,7 @@
SUBDIR += py-djangorestframework-xml
SUBDIR += py-djangotoolbox
SUBDIR += py-dojango
SUBDIR += py-drf-yasg
SUBDIR += py-dtflickr
SUBDIR += py-evernote
SUBDIR += py-falcon

38
www/py-drf-yasg/Makefile Normal file
View File

@ -0,0 +1,38 @@
# $FreeBSD$
PORTNAME= drf-yasg
DISTVERSION= 1.6.1
CATEGORIES= www python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= freebsd_ports@k-worx.org
COMMENT= Yet Another Swagger Generator
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.rst
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django111>0:www/py-django111@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}djangorestframework>=3.7.7:www/py-djangorestframework@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}coreapi>0:devel/py-coreapi@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}coreschema>0:devel/py-coreschema@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}flex>0:devel/py-flex@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}inflection>0:devel/py-inflection@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}openapi-codec>0:devel/py-openapi-codec@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}ruamel.yaml>0:devel/py-ruamel.yaml@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}swagger-spec-validator>0:devel/py-swagger-spec-validator@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}uritemplate>0:net/py-uritemplate@${PY_FLAVOR}
USES= python
USE_PYTHON= distutils autoplist
NO_ARCH= yes
post-patch:
# Unpin fixed versioning for py-setuptools_scm
@${REINPLACE_CMD} -e 's|==|>=|' ${WRKSRC}/requirements/setup.txt
.include <bsd.port.mk>

3
www/py-drf-yasg/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1522878417
SHA256 (drf-yasg-1.6.1.tar.gz) = 9da6d4fa16565f2e8ced27f0c543f60aadd032cb28223b9b43cc44d3262f526d
SIZE (drf-yasg-1.6.1.tar.gz) = 1020368

20
www/py-drf-yasg/pkg-descr Normal file
View File

@ -0,0 +1,20 @@
Generate real Swagger/OpenAPI 2.0 specifications from a Django Rest
Framework API.
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 or flex
- supports Django REST Framework API versioning with URLPathVersioning
and NamespaceVersioning (other DRF or custom versioning schemes are
not currently supported)
WWW: https://github.com/axnsan12/drf-yasg