-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Update all curl documentation examples and references with new x-medusa-access-token header #6326
Conversation
Someone is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
|
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.
Thanks for your contribution! A couple of things to note:
- This header is only used for admin API Routes. No changes should be done to store API Routes. So, please revert the changes under the
packages/medusa/src/api/routes/store
directory. - Files under the
www/apps/api-reference/specs
directory are generated automatically, so make sure to revert those changes as well. Instead, you can run theyarn openapi:generate
command in the root of the monorepository and commit the generated changes. Make sure to do this after you revert the changes mentioned in the first point.
I also added a comment below.
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.
Those API routes are store routes so please revert the changes.
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.
Done
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.
LGTM
What
This is to update incorrect documentation in regards to authentication to the Admin API - raised in #6264.
Why
Because the current documentation has been incorrect since the September 2023 release of v1.17.0, which had breaking changes to API token usage.
How
Simple search and replace. I was asked to replace occurrences under
www/apps/docs/content/
but there were also additional places where I thought references should also be updated:packages/medusa/src/api/
www/apps/api-reference/
Feel free to revert them as needed.
There is also some inconsistency between the format shown in examples e.g.
<API_TOKEN>
vs{api_token}
vs{access_token}
.I have kept the format the same in all cases as the original, as surrounding documentation text would not have format updated as well. I suggest maybe reviewing the documentation and keeping to a consistent format e.g.
<API_TOKEN>
.Testing
I have not tested these changes. I would assume the
packages/medusa/src/api/
changes may need more thorough testing?