Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestHandlerDelegate.contentTypes and RequestHandler.links #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rldhont
Copy link
Contributor

@rldhont rldhont commented Sep 3, 2021

To provide self and alternate links the RequestHandlerDelegate.contentTypes and RequestHandler.links have been implemented because QgsServerOgcApiHandler::contentTypes and QgsServerOgcApiHandler::links are not available in Python bindings.

QgsServerOgcApiHandler::contentTypes not available in Python bindings

Add RequestHandlerDelegate.contentTypes to return the list of content types this handler can serve, default to JSON and HTML.
QgsServerOgcApiHandler::links not available in Python bindings

Add RequestHandler.links to get the self and alternate links for the given request
@rldhont rldhont added the enhancement New feature or request label Sep 3, 2021
@rldhont rldhont requested review from Gustry and dmarteau September 3, 2021 15:53
Copy link
Member

@dmarteau dmarteau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Links depends It really depends on the structure of the API and I do net really understand the benefits of generating links this way

@@ -191,15 +206,25 @@ def __init__(self, path: str, handler: Type[RequestHandler],
kwargs: Dict={}):

super().__init__()
# Defined default content types because
# QgsServerOgcApiHandler::contentTypes not available in Python bindings
self._content_types = [QgsServerOgcApi.JSON, QgsServerOgcApi.HTML]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no HTML files in the api so this is not apppropriate to pretend that there is HMTL links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants