docs: revise main docs outline (#10502)

This commit is contained in:
Shahed Nasser
2024-12-09 13:54:42 +02:00
committed by GitHub
parent c8cb9b5c1a
commit 0ae98c51eb
141 changed files with 814 additions and 1181 deletions
@@ -27,7 +27,7 @@ You create an API route in a `route.{ts,js}` file under a sub-directory of the `
<Note>
Learn more about API routes [in this guide](../../../basics/api-routes/page.mdx).
Learn more about API routes [in this guide](../../../fundamentals/api-routes/page.mdx).
</Note>
@@ -63,7 +63,7 @@ export const POST = async (
You export a route handler function with its name (`POST`) being the HTTP method of the API route you're exposing.
The function receives two parameters: a `MedusaRequest` object to access request details, and `MedusaResponse` object to return or manipulate the response. The `MedusaRequest` object's `scope` property is the [Medusa container](../../../basics/medusa-container/page.mdx) that holds framework tools and custom and core modules' services.
The function receives two parameters: a `MedusaRequest` object to access request details, and `MedusaResponse` object to return or manipulate the response. The `MedusaRequest` object's `scope` property is the [Medusa container](../../../fundamentals/medusa-container/page.mdx) that holds framework tools and custom and core modules' services.
<Note title="Tip">
@@ -85,7 +85,7 @@ Medusa uses [Zod](https://zod.dev/) to create validation schemas. These schemas
<Note>
Learn more about API route validation in [this chapter](../../../advanced-development/api-routes/validation/page.mdx).
Learn more about API route validation in [this chapter](../../../fundamentals/api-routes/validation/page.mdx).
</Note>
@@ -123,7 +123,7 @@ A middleware is a function executed before the route handler when a request is s
<Note>
Learn more about middlewares in [this chapter](../../../advanced-development/api-routes/middlewares/page.mdx).
Learn more about middlewares in [this chapter](../../../fundamentals/api-routes/middlewares/page.mdx).
</Note>