From d3f0d6ed704b444b50c900e3d1f074e3a5ea7d11 Mon Sep 17 00:00:00 2001 From: Barry Daniels Date: Tue, 11 Jun 2024 13:45:49 +0200 Subject: [PATCH 1/2] fixed docs links for datasets with a number --- src/dso_api/dynamic_api/openapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dso_api/dynamic_api/openapi.py b/src/dso_api/dynamic_api/openapi.py index 971b3ce15..b2bc03918 100644 --- a/src/dso_api/dynamic_api/openapi.py +++ b/src/dso_api/dynamic_api/openapi.py @@ -127,7 +127,7 @@ def get_openapi_json_view(dataset: Dataset): "externalDocs": { "url": urljoin( settings.DATAPUNT_API_URL, # to preserve hostname - f"/v1/docs/datasets/{to_snake_case(dataset_schema.id)}.html", + f"/v1/docs/datasets/{dataset.path}.html", ) }, } From 13c01c57e483b1f14422f659e0bf3836a6a99bd2 Mon Sep 17 00:00:00 2001 From: Barry Daniels Date: Tue, 11 Jun 2024 13:50:20 +0200 Subject: [PATCH 2/2] removed import for to_snake_case --- src/dso_api/dynamic_api/openapi.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/dso_api/dynamic_api/openapi.py b/src/dso_api/dynamic_api/openapi.py index b2bc03918..09b53769a 100644 --- a/src/dso_api/dynamic_api/openapi.py +++ b/src/dso_api/dynamic_api/openapi.py @@ -18,7 +18,6 @@ from rest_framework.schemas import get_schema_view from rest_framework.views import APIView from schematools.contrib.django.models import Dataset -from schematools.naming import to_snake_case from schematools.permissions import UserScopes from schematools.types import DatasetSchema