Skip to content

Conversation

@tomkralidis
Copy link
Member

Overview

This PR enables pygeoapi, by default, to ignore extra query parameters for features/records queries.

An added provider level include_extra_query_parameters directive (true|false, default false) can control whether to enable provider support.

The update in #1673 results in all query parameters being passed and evaluated. pygeoapi's OpenAPI definition declares additionalProperties: true for all .../items endpoints by default, which allows us to evaluate extra query parameters as desired.

As a result, extra query parameters are always ignored unless set in provider config.

Related Issue / discussion

#1673

Additional information

Some CITE config fixes and removal of leftover print statements are also included in this PR.

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

@tomkralidis tomkralidis added this to the 0.21.0 milestone Jul 27, 2025
@tomkralidis tomkralidis added OGC API - Features OGC API - Features OGC API - Records OGC API - Records labels Jul 27, 2025
@tomkralidis tomkralidis changed the title [WIP] make support for features/records extra query parameters configurable make support for features/records extra query parameters configurable Aug 1, 2025
@tomkralidis tomkralidis requested a review from a team August 1, 2025 14:24
Copy link
Contributor

@doublebyte1 doublebyte1 left a comment

Choose a reason for hiding this comment

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

+1 for making the extra parameters functionality more tightly integrated in the code. If there are any providers where enabling this is particularly important for supporting a particular behaviour, I think that should be mentioned in the documentation.

add_param = True

if add_param:
LOGGER.debug(f'Adding property filter {k}={v}')
Copy link
Contributor

Choose a reason for hiding this comment

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

In the case of add_param=True because of p.include_extra_query_parameters is not really a property filter, is it? I find this comment to be a bit misleading

@tomkralidis tomkralidis merged commit 57df549 into geopython:master Aug 3, 2025
4 checks passed
@tomkralidis tomkralidis deleted the additional-properties branch August 3, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OGC API - Features OGC API - Features OGC API - Records OGC API - Records

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants