docs: typos and examples fixes (#11954)

* docs: typos and examples fixes

* fix notification example
This commit is contained in:
Shahed Nasser
2025-03-24 09:33:22 +02:00
committed by GitHub
parent c6f2f444ed
commit 2ec59ddadc
18 changed files with 11639 additions and 11661 deletions
@@ -45,7 +45,7 @@ The `moduleIntegrationTestRunner` function accepts as a parameter an object with
- `moduleName`: The name of the module.
- `moduleModels`: An array of models in the module. Refer to [this section](#write-tests-for-modules-without-data-models) if your module doesn't have data models.
- `resolve`: The path to the model.
- `resolve`: The path to the module's directory.
- `testSuite`: A function that defines the tests to run.
The `testSuite` function accepts as a parameter an object having the `service` property, which is an instance of the module's main service.
@@ -8,7 +8,7 @@ In this chapter, you'll learn how to use environment variables in your admin cus
<Note>
To learn how envirnment variables are generally loaded in Medusa based on your application's environment, check out [this chapter](../../environment-variables/page.mdx).
To learn how environment variables are generally loaded in Medusa based on your application's environment, check out [this chapter](../../environment-variables/page.mdx).
</Note>
@@ -10,7 +10,7 @@ In this chapter, youll learn about middlewares and how to create them.
A middleware is a function executed when a request is sent to an API Route. It's executed before the route handler function.
Middlwares are used to guard API routes, parse request content types other than `application/json`, manipulate request data, and more.
Middlewares are used to guard API routes, parse request content types other than `application/json`, manipulate request data, and more.
<Note title="Tip">
@@ -133,7 +133,7 @@ For example, if you omit the `a` parameter, you'll receive a `400` response code
---
## How to Validate Request Query Paramters
## How to Validate Request Query Parameters
The steps to validate the request query parameters are the similar to that of [validating the body](#how-to-validate-request-body).
@@ -37,7 +37,7 @@ You can also write migrations manually. To do that, create a file in the `migrat
For example:
```ts title="src/modules/blog/migrations/Migration20240429.ts"
```ts title="src/modules/blog/migrations/Migration202507021059.ts"
import { Migration } from "@mikro-orm/migrations"
export class Migration202507021059 extends Migration {
@@ -545,7 +545,7 @@ The middleware transforms these parameters to configurations that you can pass t
<Note>
As of [Medusa v2.2.0](https://github.com/medusajs/medusa/releases/tag/v2.2.0), `remoteQueryConfig` has been depercated in favor of `queryConfig`. Their usage is still the same, only the property name has changed.
As of [Medusa v2.2.0](https://github.com/medusajs/medusa/releases/tag/v2.2.0), `remoteQueryConfig` has been deprecated in favor of `queryConfig`. Their usage is still the same, only the property name has changed.
</Note>
@@ -50,7 +50,7 @@ export default async function helloWorldLoader({
}: LoaderOptions) {
const logger = container.resolve("logger")
logger.info("[helloWorldLoader]: Hello, World!")
logger.info("[HELLO MODULE] Just started the Medusa application!")
}
```
@@ -46,7 +46,6 @@ const myWorkflow = createWorkflow(
attachProductToSalesChannelStep(product)
)
const id = product.id
const refetchedProduct = getProductStep(product.id)
return new WorkflowResponse(refetchedProduct)