From nobody Fri Jun 2 16:19:46 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QXp9t2cC5z4YxmP; Fri, 2 Jun 2023 16:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QXp9t24clz3JB6; Fri, 2 Jun 2023 16:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685722786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iDpaAaOMV0HYdCbjEcgfuKfH5+4IZbkpkzxX2yDWQcU=; b=F7y6pWxFvGIbosohAldUX5abkwg0/hvCWKSvZqOt1W6KytslnYvTwLLVmevoj/r+Nfvhra ++g0vCoYzAtQYij2xvuA/rbkwTcHCWz8ePy9hKaYX4z/99VWUPOPgxWWtH9DIHpdj2NGEK D1z+9pD4L/MyYg+CJYVPSUwo2SO93TuFEj8F2OJ6pEYma4zKnC9fRH7xdexknATI3+PpWA 6O3UlwQ+QKScacnA+pF7amQrvj/DKWPjkAKENo2eZSKkvhz4+F00kK4Y6WaZnnQn8ID8gC azQMwrW0YHBfezeK/3+Oog3UexOJZDkGwzk+5yQYcCMKMMChoxcZrzF53cF3wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685722786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iDpaAaOMV0HYdCbjEcgfuKfH5+4IZbkpkzxX2yDWQcU=; b=L3UgP8YiwaHuJrvuhmvTa+7u/6w7LB8tyZs4/sbLoO7jBUTxGVL5RykRQr3XMbjIW4VAOJ +RK6xZ1QKkbLkqx//Doxq/OUAXdWZOnf9CTAXea/l4b/aX1yz3SmgZT107CxWhRQAWkH0B PgNmQdDhYBZo/CYEQD5xE6SBWAlFon8VvWS3Hgo3IuSgVS6X7TbIQVgmpb5e7+lxyuZcI6 xRtW4pmEgfm/ZPcPpzg0HKVOQudr9W39YJ2bt8V0Ddv8TVHf10O/HPISwOjzcraSP6IhzP Hk3y08yDN7+2m1qOklf9hfzrttqYO6WLqU9HezcHpDHXpBp2ZSA4DCV0MyXG4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685722786; a=rsa-sha256; cv=none; b=JiQkYzZNs2/IbCqSz6G1pk6PpkOtIT3ohP20wncYSL6kahAVXwyKguSZAvhIWwWtkqNXl5 GjfXzpOtczfaGKymPQ4A5ImQ5EKWPVBjc2+OMxOce1haKUj9BYXEze/1VvApiYeVhO4R7l 7N8Uw514EKqgaKzOuxpFyfQvgoGfhy/J/tRYOwgQb2QHMxlxNC5ruOgwxHQCvp4Yhes/ga BhGNNtcVrQtNondbFevEkk6wPv8INH737viB2cKlJFFb1Pn/2f/Zu8Op1rNABPnusBiTXG iBCpzxSP4WB90M2z7+YbsPViXU1O4uLYrSZhhF93baPSQ+Y4bb+lKl/6tzAEIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QXp9t0n8Qz14sS; Fri, 2 Jun 2023 16:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 352GJk1p060006; Fri, 2 Jun 2023 16:19:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 352GJkO9060005; Fri, 2 Jun 2023 16:19:46 GMT (envelope-from git) Date: Fri, 2 Jun 2023 16:19:46 GMT Message-Id: <202306021619.352GJkO9060005@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kai Knoblich Subject: git: fb7fd0b40f7e - main - www/py-dj41-drf-spectacular: New port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kai X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb7fd0b40f7e953086a9aa54b167da7c2a677c2d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kai: URL: https://cgit.FreeBSD.org/ports/commit/?id=fb7fd0b40f7e953086a9aa54b167da7c2a677c2d commit fb7fd0b40f7e953086a9aa54b167da7c2a677c2d Author: Kai Knoblich AuthorDate: 2023-06-02 15:49:48 +0000 Commit: Kai Knoblich CommitDate: 2023-06-02 16:19:21 +0000 www/py-dj41-drf-spectacular: New port Note: Copied from www/py-drf-spectacular, required for NetBox 3.5. This project has 3 goals: * Extract as much schema information from DRF as possible. * Provide flexibility to make the schema usable in the real world (not only toy examples). * Generate a schema that works well with the most popular client generators. The code is a heavily modified fork of the DRF OpenAPI generator, which is/was lacking all of the below listed features: * Serializers modelled as components. (arbitrary nesting + recursion supported) * @extend_schema decorator for customization of APIView, Viewsets, function-based views, and @action * Authentication support (DRF natives included, easily extendable) * Custom serializer class support (easily extendable) * SerializerMethodField() type via type hinting or @extend_schema_field * i18n support, Tags extraction, Description extraction from docstrings * Request/response/parameter examples, Callback operations * Vendor specification extensions (x-*) in info, operations, parameters, components, and security schemes * Sane fallbacks and sane operation_id naming (based on path) * Schema serving with SpectacularAPIView (Redoc and Swagger-UI views are also available) * Optional input/output serializer component split --- www/Makefile | 1 + www/py-dj41-drf-spectacular/Makefile | 34 ++++++++++++++++++++++++++++++++++ www/py-dj41-drf-spectacular/distinfo | 3 +++ www/py-dj41-drf-spectacular/pkg-descr | 24 ++++++++++++++++++++++++ 4 files changed, 62 insertions(+) diff --git a/www/Makefile b/www/Makefile index 658769bfdbcf..d825eaa42de3 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1475,6 +1475,7 @@ SUBDIR += py-dj41-django-taggit SUBDIR += py-dj41-django-timezone-field SUBDIR += py-dj41-djangorestframework + SUBDIR += py-dj41-drf-spectacular SUBDIR += py-dj41-drf-yasg SUBDIR += py-django-admin-rangefilter SUBDIR += py-django-advanced-filters diff --git a/www/py-dj41-drf-spectacular/Makefile b/www/py-dj41-drf-spectacular/Makefile new file mode 100644 index 000000000000..63d92c8d0f5d --- /dev/null +++ b/www/py-dj41-drf-spectacular/Makefile @@ -0,0 +1,34 @@ +PORTNAME= drf-spectacular +DISTVERSION= 0.26.2 +CATEGORIES= www python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}dj41- + +MAINTAINER= kai@FreeBSD.org +COMMENT= Sane/flexible OpenAPI 3 schema generation for Django REST framework +WWW= https://github.com/tfranzel/drf-spectacular + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django41>=2.2:www/py-django41@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dj41-djangorestframework>=3.10.3:www/py-dj41-djangorestframework@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}inflection>=0.3.1:devel/py-inflection@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}jsonschema>=2.6.0:devel/py-jsonschema@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}uritemplate>=2.0.0:net/py-uritemplate@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>=5.1:devel/py-yaml@${PY_FLAVOR} + +USES= python:3.8+ +USE_PYTHON= autoplist distutils + +CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}*${PORTNAME} + +NO_ARCH= yes + +OPTIONS_DEFINE= SIDECAR +OPTIONS_DEFAULT= SIDECAR + +SIDECAR_DESC= Enable self-contained Swagger/Redoc UI installation +SIDECAR_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dj41-drf-spectacular-sidecar>0:www/py-dj41-drf-spectacular-sidecar@${PY_FLAVOR} + +.include diff --git a/www/py-dj41-drf-spectacular/distinfo b/www/py-dj41-drf-spectacular/distinfo new file mode 100644 index 000000000000..a186bafeb897 --- /dev/null +++ b/www/py-dj41-drf-spectacular/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1681883936 +SHA256 (drf-spectacular-0.26.2.tar.gz) = 005623d6bb9de37d2d0ec24ccd59c636e4a42f9af252f1470129ac32ccab38cb +SIZE (drf-spectacular-0.26.2.tar.gz) = 216281 diff --git a/www/py-dj41-drf-spectacular/pkg-descr b/www/py-dj41-drf-spectacular/pkg-descr new file mode 100644 index 000000000000..7f053d6244dc --- /dev/null +++ b/www/py-dj41-drf-spectacular/pkg-descr @@ -0,0 +1,24 @@ +This project has 3 goals: + +* Extract as much schema information from DRF as possible. +* Provide flexibility to make the schema usable in the real world (not only + toy examples). +* Generate a schema that works well with the most popular client generators. + +The code is a heavily modified fork of the DRF OpenAPI generator, which is/was +lacking all of the below listed features: + +* Serializers modelled as components. (arbitrary nesting + recursion supported) +* @extend_schema decorator for customization of APIView, Viewsets, + function-based views, and @action +* Authentication support (DRF natives included, easily extendable) +* Custom serializer class support (easily extendable) +* SerializerMethodField() type via type hinting or @extend_schema_field +* i18n support, Tags extraction, Description extraction from docstrings +* Request/response/parameter examples, Callback operations +* Vendor specification extensions (x-*) in info, operations, parameters, + components, and security schemes +* Sane fallbacks and sane operation_id naming (based on path) +* Schema serving with SpectacularAPIView (Redoc and Swagger-UI views are + also available) +* Optional input/output serializer component split