Multi-domain openrpc.json — aggregate at docs/openrpc.json + per-domain at docs/<domain>/openrpc.json #82
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#82
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?
Context
Follow-up from #73 (which moved the spec to
docs/openrpc.json). That implementation emits a single file with all domains merged, but per-domain specs are still useful (SDK generation for a single domain, OpenAPI tooling that wants a focused spec, embedded<hero-api-docs>filtered to one domain).Desired output
When a service has multiple OSchema domains, the generator should produce:
For single-domain services the per-domain file is still emitted (no special case).
What to do
crates/generator/src/generate/openrpc.rsafter #59) to emit per-domain files in addition to the aggregate.docs/openrpc.jsonkeeps itsinfo.title= service name, methods union all domains.docs/<domain>/openrpc.jsonhasinfo.title=<service>:<domain>(or similar — pick one in a comment), methods = just that domain._admintemplate to load whichever spec makes sense (probably the aggregate; per-domain stays a static asset for clients).recipe_serverexample output. Updatehero_servicetemplate (one domain — both files should appear).hero_service_scaffold.mdskill to document both outputs.Acceptance
docs/openrpc.json+ N ×docs/<domain>/openrpc.json.<hero-api-docs>in scaffolded_adminstill resolves.recipe_server+hero_servicerebuild cleanly with the new layout.Related
PR opened: #84
info.titlewithout colon (openrpc_client!macro rejects it) #91