docs: add line highlight validation (#14380)
* docs: add line highlight validation * add to all projects * fixes * fixes * fix * fixes
This commit is contained in:
@@ -56,7 +56,7 @@ Learn how to create a middleware in the [Middlewares](../middlewares/page.mdx) c
|
||||
</Note>
|
||||
|
||||
export const highlights = [
|
||||
["10", "req.allowed", "Modify the allowed fields and relations to be retrieved"],
|
||||
["9", "req.allowed", "Modify the allowed fields and relations to be retrieved"],
|
||||
]
|
||||
|
||||
```ts title="src/api/middlewares.ts" highlights={highlights}
|
||||
|
||||
@@ -49,8 +49,8 @@ When you create a record of a data model that has one of another, pass the ID of
|
||||
For example, assuming you have the [User and Email data models from the previous chapter](../relationships/page.mdx#one-to-one-relationship), set a user's email ID as follows:
|
||||
|
||||
export const hasOneHighlights = [
|
||||
["4", "email_id", "The ID of the email that the user has."],
|
||||
["11", "email_id", "The ID of the email that the user has."]
|
||||
["4", "email", "The ID of the email that the user has."],
|
||||
["11", "email", "The ID of the email that the user has."]
|
||||
]
|
||||
|
||||
```ts highlights={hasOneHighlights}
|
||||
|
||||
@@ -576,7 +576,7 @@ You can also create a `listAndCount` method to retrieve the posts with paginatio
|
||||
Now, you can use Query to retrieve a product and its linked post from the CMS:
|
||||
|
||||
export const queryHighlights = [
|
||||
["3", `"cms_post"`, "The `alias` of the virtual data model in the link configuration."]
|
||||
["3", `"cms_post.*"`, "The `alias` of the virtual data model in the link configuration."]
|
||||
]
|
||||
|
||||
```ts highlights={queryHighlights}
|
||||
|
||||
@@ -81,7 +81,7 @@ You define a service in a `service.ts` or `service.js` file at the root of your
|
||||
|
||||
export const highlights = [
|
||||
["4", "MedusaService", "The service factory function."],
|
||||
["5", "MyCustom", "The data models to generate data-management methods for."]
|
||||
["5", "Post", "The data models to generate data-management methods for."]
|
||||
]
|
||||
|
||||
```ts title="src/modules/blog/service.ts" highlights={highlights}
|
||||
|
||||
Reference in New Issue
Block a user