- Added new documentation page for Medusa Worker.
- Updated Railway deployment guide with details on Medusa Worker.
- Small adjustments to the `worker_mode` option's TSDocs.
This PR includes documentation that preps for v2 docs (but doesn't introduce new docs).
_Note: The number of file changes in the PR is due to find-and-replace within the `references` which is unavoidable. Let me know if I should move it to another PR._
## Changes
- Change Medusa version in base OAS used for v2.
- Fix to docblock generator related to not catching all path parameters.
- Added typedoc plugin that generates ER Diagrams, which will be used specifically for data model references in commerce modules.
- Changed OAS tool to output references in `www/apps/api-reference/specs-v2` directory when the `--v2` option is used.
- Added a version switcher to the API reference to switch between V1 and V2. This switcher is enabled by an environment variable, so it won't be visible/usable at the moment.
- Upgraded docusaurus to v3.0.1
- Added new Vale rules to ensure correct spelling of Medusa Admin and module names.
- Added new components to the `docs-ui` package that will be used in future documentation changes.
* docs: add missing widget props for collections injection zones
Adds missing widget props for the `product_collection.details.before` and `product_collection.details.after` injection zones.
* fix lint error
- Fixed CORS middleware to account for routes of a single path (for example, `/custom` and not just `/custom/test`).
- Added a troubleshooting guide for admin webpack errors (see issue #6375)
## What
This is to update incorrect documentation in regards to authentication to the Admin API - raised in https://github.com/medusajs/medusa/issues/6264.
## Why
Because the current documentation has been incorrect since the September 2023 release of [v1.17.0](https://github.com/medusajs/medusa/releases/tag/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?
- Added anchor links to items in parameter components
- Added sectionTitle prop in markdown theme
Note: Due to the second point, the change requires generating references to see the anchor links, which would result in a big diff in this PR. Instead, next time the references are generated for a release, this feature will available for use.
- Add a new deployment overview page giving a general overview of how a Medusa project is deployed
- Add a new section in all backend deployment guides related to the Medusa admin.
- Add a general deployment guide for the medusa admin.
- Add a general deployment guide for the Next.js starter
- Move the admin plugin's options to the Admin Configuration documentation.
- Add a section on how to change the backend URL for both development and production.
- Fix the troubleshooting section related to port forwarding.
- General fixes.