Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pygeoapi/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion pygeoapi/flask_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pygeoapi/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion pygeoapi/starlette_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions pygeoapi/templates/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ <h2>{% trans %}Jobs{% endtrans %}</h2>
<section id="openapi">
<h2>{% trans %}API Definition{% endtrans %}</h2>
<p>
{% trans %}Documentation{% endtrans %}: <a href="{{ config['server']['url'] }}/openapi?f=html">{% trans %}Swagger UI{% endtrans %}</a> <a href="{{ config['server']['url'] }}/openapi?f=html&ui=redoc">{% trans %}ReDoc{% endtrans %}</a>
{% trans %}Documentation{% endtrans %}: <a href="{{ config['server']['url'] }}/api?f=html">{% trans %}Swagger UI{% endtrans %}</a> <a href="{{ config['server']['url'] }}/api?f=html&ui=redoc">{% trans %}ReDoc{% endtrans %}</a>
</p>
<p>
<a href="{{ config['server']['url'] }}/openapi?f=json">{% trans %}OpenAPI Document{% endtrans %}</a>
<a href="{{ config['server']['url'] }}/api?f=json">{% trans %}OpenAPI Document{% endtrans %}</a>
</p>
</section>
<section id="conformance">
Expand Down