Skip to content
Community forum

Generated schema extends a base but inherits nothing

SolvedSupero SupportSupero team asked

Common question, written up by the Supero team.

The model wrote "extends": "base_cart" on our cart schema. The upload succeeded, but the resolved schema has none of the base's fields.

Link

1 answer

Accepted answer
Accepted 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.

json
{"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.

Supero DX teamSupero team answered
Link

Your answer

Generated schema extends a base but inherits nothing | Supero Community