Skip to main content

RPC and event formats

Not every API is described in OpenAPI. JSON-RPC services publish OpenRPC, event-driven systems keep their CloudEvents in an xRegistry, and many services are defined in a cross-language IDL such as Thrift, FlatBuffers or Cap'n Proto. Apiome imports each of them into the Catalog with its own importer, so you can search, version, diff, lint and convert them next to your REST APIs.

Use this page to find the right importer. Each one has its own page with the details.

What you can import​

SourceWhat it isImporterSteps
OpenRPCThe description of a JSON-RPC 2.0 service, common across web3openrpcImport an OpenRPC / JSON-RPC API
xRegistryThe CNCF CloudEvents catalog: schemas, message definitions and endpointsxregistryImport a CNCF xRegistry
CloudEventsA single CloudEvent (specversion, type, source, data)cloudeventsImport a CNCF xRegistry
Apache ThriftCross-language IDL and RPC (.thrift), one file or a set joined by includethriftImport an Apache Thrift API
FlatBuffersA zero-copy binary schema (.fbs)flatbuffersImport a FlatBuffers or Cap'n Proto schema
Cap'n ProtoA zero-copy binary schema with RPC interfaces (.capnp)capnprotoImport a FlatBuffers or Cap'n Proto schema
Connect RPCA Protobuf contract served the Connect way, with an HTTP/JSON route per methodconnectrpcImport a Connect-RPC service
JSON Type DefinitionA JTD schema (RFC 8927), imported as a data schemajtdJSON Type Definition

JSON:API, HAL, HAL-FORMS, JSON-LD and Hydra are not imported on their own: they are conventions an OpenAPI, Swagger or RAML document follows. Apiome recognizes them when you import that document. See REST hypermedia conventions.

How it works​

  1. Import the file. In Import to catalog, choose the format, or let Auto-detect find it, and upload, paste or link the document. From the CLI, use apiome import openrpc, apiome import thrift and so on. A Thrift IDL split across files, or a Buf module for Connect, goes in one archive (.zip, .tar.gz, .tar).
  2. Or read it from a running service. Some formats can be fetched live:
    • OpenRPC: apiome import openrpc --discover calls the service's rpc.discover method (Discover a live service).
    • Connect RPC: the contract is fetched over gRPC server reflection (Import it).
    • xRegistry: a running registry is crawled, one catalog item per schema, message group and endpoint (What you can import).
  3. It lands in the Catalog. Methods and messages become operations, and schemas, structs and tables become types. Each import is fingerprinted, so importing an unchanged document again does not create a new version.
  4. Compare versions by the format's own rules. Tick two versions on the catalog item's Versions tab. Each format grades its changes by what breaks its clients:
  5. Lint it. Each format has its own lint pack, on top of the checks every catalog item gets: OpenRPC, xRegistry, Thrift, FlatBuffers and Cap'n Proto, and the hypermedia conformance checks.
  6. Convert it when you're ready. Convert to OpenAPI turns the item into a publishable project and shows what the conversion keeps and loses before it creates anything (Convert to OpenAPI).

Find them in the catalog​

On Bring in → Catalog, narrow by Formats to list the items of one importer. Items imported from an OpenAPI, Swagger or RAML document that follows a hypermedia convention can also be filtered by that convention (Filter the catalog by convention).

Going the other way​

Every format on this page is also an export target: choose it from Export on a catalog item. OpenRPC, Thrift, FlatBuffers and Cap'n Proto can be written from an item of any format; see OpenRPC, Thrift, FlatBuffers and Cap'n Proto from any source. Supported formats lists the export support of the others.

Where next​