The model wrote "extends": "base_cart" on our cart schema. The upload succeeded, but the resolved schema has none of the base's fields.
Generated schema extends a base but inherits nothing
Common question, written up by the Supero team.
1 answer
Qualify the reference. Platform bases are named "<service>:base_<name>", for example "cart:base_cart". An unqualified extends is looked up in the schema's own namespace first and then by bare name, and a bare name that exists in two or more namespaces is marked ambiguous and never resolves. The extending schema comes back unmerged.
{"name": "cart", "extends": "cart:base_cart", "attributes": [ ... ]}The other common cause is where extends sits. It has to be inside the schema's content. A top-level extends on the wrapper around it is stripped, and the schema uploads with no inheritance and no error.
Both are worth stating in the prompt that writes your schemas: always use the qualified name, and keep extends inside the schema body.
Your answer
Know the answer? Sign in to post it. It takes an email address and a 6-digit code.
Sign in to answer