Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Related Issue / discussion
We promised the simple proposal already some time ago #1802, sorry for the delay.
Here it is. I try to showcase it with the landing page. The idea is pretty simple. We encapsulate all preparation into the
fcm
dictionary in a separate method calledlanding_page_prerender
. We keep the original method and its signiture. This method then applies the rendering to thefcm
dictionary as defined by the passed format. This would be done for all api-methods of course. This is just a showcase.Why is that useful: Think of the possibilities here. We might want to add custom links to other resources in the webapplication via code of that web application. We want to completely omit pygeoapi rendering and take the
fcm
dictionary into custom responibiltiy to render it ourself.In general have 2 architectural questions here:
fcm
dictionary as proposed: The next logical step would be nice typing through e.g. dataclasses to make handling straigt forward. I refer to Use Protocol interfaces and static duck typing design pattern #1547, what is the status here? Still happy to support work on that topic.Additional information
Dependency policy (RFC2)
Updates to public demo
Contributions and licensing
(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)