Module op_list
Expand description
The one list of ops a schema exposes (cratestack#1123, EXT-14).
Which verbs a model has, and how an op is keyed, used to be derived
separately by the RPC descriptors, the REST descriptors, the axum router,
RPC dispatch and every client generator, each by asking
model_internal_actions and adding its
own list of verb names. A contract digest is keyed by op, so those copies
must not be able to disagree. They all ask model_verbs now, and
crate::client_contract’s op list is built from it.
A generator may still expose fewer verbs than this list (the TypeScript
client omits create for a model with no create policy): that is a
client-side choice on top of this list, never a verb beyond it.
Structs§
- Model
OpIds - The five RPC op ids of a model, for a generator’s template context, so a
template never spells
"model.<Name>.list"itself. A verb@@internalsuppresses still has an id here: the template only reads the ones its ownallows_*gate admits.
Enums§
- Model
Verb - What an op does to its model.
Functions§
- detail_
route_ of - The detail route of the collection route
list_route, for a caller that holds the route and not the model name. - model_
detail_ route - The detail route of a model on REST:
/widgets/{id}. - model_
list_ route - The collection route of a model on REST:
/widgets. - model_
op_ key - The op key of a model verb: the RPC op id, or
"<METHOD> <route>"on REST.Nonefor a verb REST does not have. - model_
subscribe_ route - The subscription route of a model on REST:
/widgets/$subscribe. - model_
verbs - The verbs
modelexposes, inModelVerb::CRUDorder withSubscribelast: every CRUD verb@@internaldoes not suppress, plusSubscribefor an@@subscribemodel. - procedure_
op_ key - The op key of a procedure:
procedure.<name>on RPC,POST <path>on REST (the path carries@api_version). - subscription_
procedure_ op_ key - The op key of a
subscription procedure(slice S4):procedure.<name>on RPC, as a unary procedure;GET <path>on REST, its stream served over SSE at the path a unary procedure wouldPOSTto.