Skip to content

Commit

Permalink
fixed docs links for datasets with a number (#836)
Browse files Browse the repository at this point in the history
* fixed docs links for datasets with a number

* removed import for to_snake_case

---------

Co-authored-by: Barry Daniels <mail@barrydaniels.nl>
  • Loading branch information
barrydaniels-nl and gurustacks authored Jun 11, 2024
1 parent 0e96b87 commit 58deec4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dso_api/dynamic_api/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -127,7 +126,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",
)
},
}
Expand Down

0 comments on commit 58deec4

Please sign in to comment.