diff options
author | pi <pi@FreeBSD.org> | 2018-04-18 04:18:05 +0800 |
---|---|---|
committer | pi <pi@FreeBSD.org> | 2018-04-18 04:18:05 +0800 |
commit | 1fca3ef8c2ce3b294223ffc075005683c3b684ac (patch) | |
tree | 23a5834e91ae51ce771a9c7217cebb29185c06f1 /www | |
parent | 50e2b55b41cec97f97fe107f723d3ce8ea4ba3bc (diff) | |
download | freebsd-ports-gnome-1fca3ef8c2ce3b294223ffc075005683c3b684ac.tar.gz freebsd-ports-gnome-1fca3ef8c2ce3b294223ffc075005683c3b684ac.tar.zst freebsd-ports-gnome-1fca3ef8c2ce3b294223ffc075005683c3b684ac.zip |
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>
Diffstat (limited to 'www')
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/py-drf-yasg/Makefile | 38 | ||||
-rw-r--r-- | www/py-drf-yasg/distinfo | 3 | ||||
-rw-r--r-- | www/py-drf-yasg/pkg-descr | 20 |
4 files changed, 62 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index f55f61c93e98..dc61d4b6f839 100644 --- a/www/Makefile +++ b/www/Makefile @@ -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 diff --git a/www/py-drf-yasg/Makefile b/www/py-drf-yasg/Makefile new file mode 100644 index 000000000000..3f1dec4617be --- /dev/null +++ b/www/py-drf-yasg/Makefile @@ -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> diff --git a/www/py-drf-yasg/distinfo b/www/py-drf-yasg/distinfo new file mode 100644 index 000000000000..ab9ac5e8383e --- /dev/null +++ b/www/py-drf-yasg/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1522878417 +SHA256 (drf-yasg-1.6.1.tar.gz) = 9da6d4fa16565f2e8ced27f0c543f60aadd032cb28223b9b43cc44d3262f526d +SIZE (drf-yasg-1.6.1.tar.gz) = 1020368 diff --git a/www/py-drf-yasg/pkg-descr b/www/py-drf-yasg/pkg-descr new file mode 100644 index 000000000000..e9ddcdf2d62c --- /dev/null +++ b/www/py-drf-yasg/pkg-descr @@ -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 |