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

Add support for APIRouter prefix #429

Merged
merged 2 commits into from
Aug 1, 2022

Conversation

drnextgis
Copy link
Contributor

@drnextgis drnextgis commented Jul 24, 2022

Related Issue(s):

Description:

Add support for APIRouter prefix (pgstac backend only).

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

@drnextgis drnextgis force-pushed the router_prefix branch 5 times, most recently from 0b89b2e to bd9253d Compare July 24, 2022 19:55
@captaincoordinates
Copy link
Contributor

This PR was integrated into the issue's reproduction repo on a branch and testing indicates that the change is successful.


resp = await app_client.get(link_path)
resp = await app_client.get(link_path.rsplit("/", 1)[-1])
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain why this is necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

app_client is configured with base_url which already includes router prefix.

@geospatial-jeff
Copy link
Collaborator

geospatial-jeff commented Aug 1, 2022

Will get this merged because it does solve the immediate problem (thanks for throwing together that repo) but I do think we want to circle back and be more consistent with how APIRouters are used and how base_url is created throughout the project. I think it makes the most sense to do this work after #432 is finished.

@geospatial-jeff geospatial-jeff merged commit f27dc9a into stac-utils:master Aug 1, 2022
@drnextgis drnextgis deleted the router_prefix branch August 1, 2022 20:40
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.

3 participants