diff --git a/pygeoapi/api/__init__.py b/pygeoapi/api/__init__.py index 8439d215d..bff268812 100644 --- a/pygeoapi/api/__init__.py +++ b/pygeoapi/api/__init__.py @@ -781,12 +781,12 @@ def landing_page(api: API, 'rel': 'service-desc', 'type': 'application/vnd.oai.openapi+json;version=3.0', 'title': l10n.translate('The OpenAPI definition as JSON', request.locale), # noqa - 'href': f"{api.base_url}/openapi" + 'href': f"{api.base_url}/api" }, { 'rel': 'service-doc', 'type': FORMAT_TYPES[F_HTML], 'title': l10n.translate('The OpenAPI definition as HTML', request.locale), # noqa - 'href': f"{api.base_url}/openapi?f={F_HTML}", + 'href': f"{api.base_url}/api?f={F_HTML}", 'hreflang': api.default_locale }, { 'rel': 'conformance', @@ -865,7 +865,7 @@ def openapi_(api: API, request: APIRequest) -> Tuple[dict, int, str]: if request._args.get('ui') == 'redoc': template = 'openapi/redoc.html' - path = f'{api.base_url}/openapi' + path = f'{api.base_url}/api' data = { 'openapi-document-path': path } diff --git a/pygeoapi/flask_app.py b/pygeoapi/flask_app.py index ac9f0caac..edeb4a62c 100644 --- a/pygeoapi/flask_app.py +++ b/pygeoapi/flask_app.py @@ -170,7 +170,7 @@ def landing_page(): return execute_from_flask(core_api.landing_page, request) -@BLUEPRINT.route('/openapi') +@BLUEPRINT.route('/api') def openapi(): """ OpenAPI endpoint diff --git a/pygeoapi/openapi.py b/pygeoapi/openapi.py index 62105813f..fc630b33b 100644 --- a/pygeoapi/openapi.py +++ b/pygeoapi/openapi.py @@ -286,7 +286,7 @@ def get_oas_30(cfg: dict, fail_on_invalid_collection: bool = True) -> dict: } } - paths['/openapi'] = { + paths['/api'] = { 'get': { 'summary': 'This document', 'description': 'This document', diff --git a/pygeoapi/starlette_app.py b/pygeoapi/starlette_app.py index 29b7feaf5..2df697d57 100644 --- a/pygeoapi/starlette_app.py +++ b/pygeoapi/starlette_app.py @@ -650,7 +650,7 @@ async def __call__(self, scope: Scope, api_routes = [ Route('/', landing_page), - Route('/openapi', openapi), + Route('/api', openapi), Route('/conformance', conformance), Route('/TileMatrixSets/{tileMatrixSetId}', get_tilematrix_set), Route('/TileMatrixSets', get_tilematrix_sets), diff --git a/pygeoapi/templates/landing_page.html b/pygeoapi/templates/landing_page.html index 8995e88a5..03ea4890f 100644 --- a/pygeoapi/templates/landing_page.html +++ b/pygeoapi/templates/landing_page.html @@ -85,10 +85,10 @@
- {% trans %}Documentation{% endtrans %}: {% trans %}Swagger UI{% endtrans %} {% trans %}ReDoc{% endtrans %} + {% trans %}Documentation{% endtrans %}: {% trans %}Swagger UI{% endtrans %} {% trans %}ReDoc{% endtrans %}
- {% trans %}OpenAPI Document{% endtrans %} + {% trans %}OpenAPI Document{% endtrans %}