docs: add link to manage metadata section in OAS and API reference (#13102)
This commit is contained in:
@@ -72,7 +72,7 @@ For example, if you want to re-use brands across different products, it's better
|
||||
|
||||
### How Medusa Updates JSON Properties
|
||||
|
||||
Consider a Brand Module with a `Brand` data model as shown [in the previous section](#what-are-json-properties). The [module's service](../../modules/page.mdx#2-create-service) will extend `MedusaService`, which generates methods like [updateBrands](!resources!/service-factory-reference/methods/update) to update a brand.
|
||||
Consider a Brand Module with a `Brand` data model as shown [in the previous section](#what-is-a-json-property). The [module's service](../../modules/page.mdx#2-create-service) will extend `MedusaService`, which generates methods like [updateBrands](!resources!/service-factory-reference/methods/update) to update a brand.
|
||||
|
||||
When you pass a JSON property in the `updateBrands` method, Medusa will merge the provided JSON object with the existing one in the database. So, only the properties you pass will be updated, and the rest will remain unchanged.
|
||||
|
||||
@@ -235,3 +235,9 @@ The brand record will now have the `metadata` property updated to remove the `is
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Manage JSON Properties in API Routes
|
||||
|
||||
The instructions above also apply when managing JSON properties in API routes, since they typically use a service's `update` method under the hood.
|
||||
|
||||
Refer to the [API reference](!api!/store#manage-metadata) to learn more about managing JSON properties, such as `metadata`, in API routes.
|
||||
|
||||
Reference in New Issue
Block a user