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

Fix Duplicate Prefix Issue in OpenAPI Schema #198

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

joshimai
Copy link
Contributor

@joshimai joshimai commented Apr 10, 2024

Description

This PR addresses an issue where API routes were getting duplicated prefixes in our OpenAPI documentation. Previously, we appended a root path to each path in the paths dictionary. However, since our schema already specifies a base URL in the servers section (e.g., {'url': '/stac'}), this led to the unintended duplication of the base path in the final URLs (stac/stac)

Fixes # (issue)
microsoft/PlanetaryComputer#332

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Deployed local server and test /stac/docs
image

Checklist:

Please delete options that are not relevant.

  • Unit tests pass locally (./scripts/test)
  • Code is linted and styled (./scripts/format)

Copy link
Member

@mmcfarland mmcfarland left a comment

Choose a reason for hiding this comment

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

Looks good!

@joshimai joshimai merged commit 5c50789 into main Apr 10, 2024
2 of 3 checks passed
@mmcfarland mmcfarland deleted the joshi/openapi-duplicate-prefix branch April 11, 2024 12: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.

2 participants