Skip to content

Commit 6c00982

Browse files
committed
Remove deprecated coreapi and coreschema #313
Signed-off-by: tdruez <[email protected]>
1 parent 04a9e62 commit 6c00982

11 files changed

+4
-114
lines changed

component_catalog/api.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@
1111
from django.db import transaction
1212
from django.forms.widgets import HiddenInput
1313

14-
import coreapi
15-
import coreschema
1614
import django_filters
1715
from packageurl.contrib import url2purl
1816
from packageurl.contrib.django.filters import PackageURLFilter
1917
from rest_framework import serializers
2018
from rest_framework.decorators import action
2119
from rest_framework.fields import ListField
2220
from rest_framework.response import Response
23-
from rest_framework.schemas import AutoSchema
2421

2522
from component_catalog.admin import ComponentAdmin
2623
from component_catalog.admin import PackageAdmin
@@ -922,24 +919,7 @@ def about(self, request, uuid):
922919
package = self.get_object()
923920
return Response({"about_data": package.as_about_yaml()})
924921

925-
download_url_description = (
926-
"A single, or list of, Download URL(s).<br><br>"
927-
'<b>cURL style</b>: <code>-d "download_url=url1&download_url=url2"</code><br><br>'
928-
'<b>Python</b>: <code>data = {"download_url": ["url1", "url2"]}</code>'
929-
)
930-
931-
add_action_schema = AutoSchema(
932-
manual_fields=[
933-
coreapi.Field(
934-
"download_url",
935-
required=True,
936-
location="body",
937-
schema=coreschema.String(description=download_url_description),
938-
),
939-
]
940-
)
941-
942-
@action(detail=False, methods=["post"], name="Package Add", schema=add_action_schema)
922+
@action(detail=False, methods=["post"], name="Package Add")
943923
def add(self, request):
944924
"""
945925
Alternative way to add a package providing only its `download_url`.

setup.cfg

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,9 @@ install_requires =
7272
djangorestframework==3.16.0
7373
# API documentation
7474
drf-yasg==1.21.10
75+
uritemplate==4.1.1
7576
inflection==0.5.1
7677
pytz==2025.2
77-
# Old API documentation, `coreapi` and its requirements:
78-
coreapi==2.3.3
79-
MarkupSafe==3.0.2
80-
coreschema==0.0.4
81-
itypes==1.2.0
82-
Jinja2==3.1.6
83-
uritemplate==4.1.1
8478
# Track failed login attempts
8579
django-axes==8.0.0
8680
# Multi-factor authentication
@@ -154,6 +148,8 @@ install_requires =
154148
# AboutCode Toolkit
155149
aboutcode_toolkit==11.1.1
156150
click==8.2.1
151+
Jinja2==3.1.6
152+
MarkupSafe==3.0.2
157153
saneyaml==0.6.1
158154
openpyxl==3.1.5
159155
et-xmlfile==2.0.0
-25 KB
Binary file not shown.

thirdparty/dist/coreapi-2.3.3-py2.py3-none-any.whl.ABOUT

Lines changed: 0 additions & 20 deletions
This file was deleted.

thirdparty/dist/coreapi-2.3.3-py2.py3-none-any.whl.NOTICE

Lines changed: 0 additions & 8 deletions
This file was deleted.
-10.7 KB
Binary file not shown.

thirdparty/dist/coreschema-0.0.4.tar.gz.ABOUT

Lines changed: 0 additions & 22 deletions
This file was deleted.

thirdparty/dist/coreschema-0.0.4.tar.gz.NOTICE

Lines changed: 0 additions & 8 deletions
This file was deleted.
-4.64 KB
Binary file not shown.

thirdparty/dist/itypes-1.2.0-py2.py3-none-any.whl.ABOUT

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)