-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(medusa-oas-cli): fix download url for public OAS #8763
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
|
@@ -161,7 +161,7 @@ async function getOASFromCodebase( | |||
async function getPublicOas( | |||
apiType: ApiType, | |||
) { | |||
const url = `https://docs.medusajs.com/v2/api/download/${apiType}` | |||
const url = `https://docs.medusajs.com/v2/api/api/download/${apiType}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: why is it /api/api
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to how the API reference is built, we have to use a base path /v2/api
to have routes like /v2/api/store
and /v2/api/admin
, which means actual APIs in the project are under /v2/api/api
.
This setup wasn't in the v1 API reference because it was the main proxy project (i.e. no other projects redirecting to it based on the page's path). For the v2 API reference, using just a /v2
base path causes redirect and 404 errors when trying to fetch its static files (CSS, js, etc...) through the proxy (as it tries to fetch these files from other doc projects). So, it has to be under a /v2/api
base path.
Closes #8762