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

Update all curl documentation examples and references with new x-medusa-access-token header #6326

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

irab
Copy link
Contributor

@irab irab commented Feb 6, 2024

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?

@irab irab requested review from a team as code owners February 6, 2024 10:23
Copy link

vercel bot commented Feb 6, 2024

Someone is attempting to deploy a commit to the medusajs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

changeset-bot bot commented Feb 6, 2024

⚠️ No Changeset found

Latest commit: 3b57006

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@shahednasser shahednasser left a 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 the yarn 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.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@shahednasser shahednasser left a comment

Choose a reason for hiding this comment

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

LGTM

@kodiakhq kodiakhq bot merged commit 44470bf into medusajs:develop Feb 7, 2024
17 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants