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

Datahub: fix some issues in query URL generation form #1106

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

jahow
Copy link
Member

@jahow jahow commented Jan 31, 2025

Description

This PR fixes #1067 to use the correct mime-type when generating an URL in the API form.

This also supports specifying a collection name alongside an OGC API link instead of having the URL already point to a specific collection.

Architectural changes

none

Screenshots

image

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Jan 31, 2025

Affected libs: ui-elements,
Affected apps: metadata-editor,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

@jahow jahow added this to the 2.4.0 milestone Jan 31, 2025
Copy link
Contributor

github-actions bot commented Jan 31, 2025

📷 Screenshots are here!

@jahow jahow force-pushed the fix-ogc-api-url-generation branch 2 times, most recently from 37290df to 9172df7 Compare January 31, 2025 10:52
@coveralls
Copy link

coveralls commented Jan 31, 2025

Coverage Status

coverage: 84.26% (-1.4%) from 85.69%
when pulling d6933a5 on fix-ogc-api-url-generation
into 513309b on main.

jahow added 2 commits January 31, 2025 12:20
If multiple collections are available in an endpoint then use the name in the
online resource instead of the first collection
@jahow jahow force-pushed the fix-ogc-api-url-generation branch from 9172df7 to d6933a5 Compare January 31, 2025 11:21
Copy link
Collaborator

@Angi-Kinas Angi-Kinas left a comment

Choose a reason for hiding this comment

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

@jahow thank you for implementing the fix!

When I tested the feature I was wondering if the changes in the url were only applied to the WFS endpoint. In the OGC API form I still see the old format:
image

Is that how it is supposed to be?

@jahow
Copy link
Member Author

jahow commented Feb 3, 2025

Thanks for the review! This change should be applied to all endpoints, whichever the protocol. Let me take a look

@jahow
Copy link
Member Author

jahow commented Feb 3, 2025

@Angi-Kinas so I think it's behaving as expected. If you look at: https://data.lillemetropole.fr/data/ogcapi/collections/environnement_energie:jour_collecte?f=json

The download link for the mimeType application/geo+json is: https://data.lillemetropole.fr/data/ogcapi/collections/environnement_energie:jour_collecte/items?f=geojson

image

Copy link
Collaborator

@Angi-Kinas Angi-Kinas left a comment

Choose a reason for hiding this comment

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

@jahow Thanks for the clarification. You can go ahead 🚀

@jahow jahow merged commit a2ff93f into main Feb 3, 2025
14 checks passed
@jahow jahow deleted the fix-ogc-api-url-generation branch February 3, 2025 15:06
jahow added a commit that referenced this pull request Feb 4, 2025
* feat(ui): use mimeTypes in API form query url generation

* feat(ui): use OGCAPI collection name if available

If multiple collections are available in an endpoint then use the name in the
online resource instead of the first collection
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.

datahub - incorrect query to OGC API Features
3 participants