#Extend product creation service throw "invalid_data"

2 messages · Page 1 of 1 (latest)

stone scarab
#

Hi team, I add new column called "condition" to Product entity, I followed the doc, I completed extending ProductRepository and register the type in index.d.ts. Now I want to add 1 more column into API. My understanding is I have to extend the service. But after a few tries, I got this

{
    "type": "invalid_data",
    "message": "property condition should not exist, property size should not exist"
}

What did I miss?

patent tendon
#

Extending the entity and repo is one thing, the api is another thing and is protected by the validators. You have to allow the validator to accept more data or creating a custom end point. Here is a discussion around validators https://github.com/medusajs/medusa/discussions/3965

GitHub

Hello everyone, I have been reading the Extend entity docs. It is working amazingly, I can create fields and retrieve them. But, what if we want to implement it using our admin? Example: curl --loc...