generator: emit REST-style aliases (.create / .update / .register) for .set #25
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_rpc#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The OSIS generator (
crates/generator/src/rust/rust_osis.rs:736-768) emits method names using only:UI developers and REST-trained clients naturally reach for
contact.create,context.register,task.update, etc. These fail with-32601 Method not found, which is confusing because the CRUD operation does exist under.set.Real example: hero_osis issue #24 — hero_os UI sends
context.registerandtask.create; both fail even thoughcontext.setandtask.setare registered.Proposal
Have the generator emit REST-style aliases alongside the existing names:
{type}.set(no existing SID){type}.create{type}.set(existing SID){type}.update{type}.new{type}.delete{type}.remove(optional)Each alias is a thin match arm that dispatches to the same handler. Zero new logic in the handlers themselves.
Why not rename callers instead
Three reasons:
.setsemantically covers both create and update. Splitting to.create/.updateat the API surface is clearer for clients.Scope
rust_osis.rsto emit alias match arms inhandle_rpcto_openrpcto list both canonical and alias nameshero_osisfirst)Related
context.*/task.*RPC methods (user-facing symptom)