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

Improve root path lookup for OGC API endpoint #36

Merged
merged 3 commits into from
Apr 23, 2024

Conversation

jahow
Copy link
Member

@jahow jahow commented Apr 23, 2024

When using the OgcApiEndpoint ogc-client will look for the root path of the endpoint by going up one level in the URL until it finds a JSON document that looks like the root path.

This PR:

  • clarifies the error given back by the library when encountering an issue during the root path lookup: either a 404 was received, invalid JSON was received, missing rel types etc.
  • makes adaptations to have the library work for another implementation of the standard (geOrchestra Data Api)
  • makes it so that ogc-client will add a trailing slash when querying the root path of an endpoint; this is because in some cases (e.g. a webapp deployed on a context) not including a trailing slash might result in a 404

Tests and fixtures were added for all this.

Copy link
Contributor

@cmoinier cmoinier left a comment

Choose a reason for hiding this comment

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

Thanks for these changes 🌠 Works well !

@jahow jahow merged commit 69b7c0b into main Apr 23, 2024
1 check passed
@jahow jahow deleted the ogc-api-better-root-search branch April 23, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants