Skip to content

Add implementedBy example#8

Open
BelfordZ wants to merge 1 commit intomasterfrom
fix/add-example-spec-extension-for-implementedby
Open

Add implementedBy example#8
BelfordZ wants to merge 1 commit intomasterfrom
fix/add-example-spec-extension-for-implementedby

Conversation

@BelfordZ
Copy link
Copy Markdown
Member

@BelfordZ BelfordZ commented Feb 11, 2026

Summary

Add a new OpenRPC specification extension: implementedBy.

This extension allows a Method Object to explicitly declare which logical participant(s) are responsible for handling a method. It enables clear modeling of bidirectional JSON-RPC APIs where both peers may receive requests or notifications.

The field is an array of role identifiers (e.g. ["server"], ["client"]).
If omitted, tooling SHOULD assume ["server"] for backward compatibility.


Motivation

OpenRPC currently assumes a mostly server-handled API surface. In practice, many real-world JSON-RPC systems are bidirectional:

  • servers call clients (callbacks)
  • notifications flow both directions
  • pubsub patterns are common

Without an explicit ownership signal, tooling must guess:

  • which methods to route inbound
  • which methods are callbacks
  • which methods to mock or emit

This leads to ambiguity and inconsistent behavior across generators, mock servers, and documentation tools.

implementedBy makes method ownership explicit while remaining transport-agnostic and minimal.


Design

  • Added as a Method Object extension
  • Type: string[] (free-form role labels)
  • Common conventions: server, client
  • No enums or hardcoded vocabulary
  • No transport or lifecycle semantics introduced

Tooling can deterministically:

  • accept inbound calls only for methods it implements
  • expose outbound helpers for methods implemented by other participants
  • group methods in documentation
  • support bidirectional mocks

Scope

This change strictly defines method ownership only.

It intentionally does not introduce:

  • transport semantics
  • routing rules
  • pubsub lifecycle modeling
  • new protocol behavior

Those concerns remain outside the scope of this extension.

@BelfordZ BelfordZ changed the title Codex-generated pull request Add implementedBy example Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant