Service Bus contracts

These contracts are published as JSON documents and JSON Schema so they can be consumed from any client platform. This keeps the integration guidance usable for .NET, Java, JavaScript, Python, integration platforms, and other client types.

How to use the contracts

  1. Open the catalog for the domain or product you are integrating with.
  2. Find the event name, contract version, and schema link for the message you want to consume or publish.
  3. Use the JSON Schema to validate the payload, generate client models, or drive your own mapping code.
  4. Keep your integration aligned to the version listed in the catalog.

CloudEvents compatibility

These contracts are packaged inside a CloudEvent. The CloudEvent envelope carries the event metadata, and the dataschema attribute points to the payload schema for that event version.

Official CloudEvents references:

For clients, this makes the integration straightforward:

Example integrations by client type

The CloudEvents project provides official SDKs for multiple languages. The examples below focus on the documented access pattern after the CloudEvent has already been decoded by the language SDK; the exact decode helper varies by SDK and transport.

.NET

using CloudNative.CloudEvents;

    CloudEvent cloudEvent = receivedEvent; // decoded by the CloudEvents SDK
    var schemaUrl = cloudEvent.DataSchema?.ToString();
    var eventType = cloudEvent.Type;
    var payload = cloudEvent.Data;

    Console.WriteLine($"{eventType} -> {schemaUrl}");

JavaScript

import { HTTP } from "cloudevents";

    const event = HTTP.toEvent({ headers, body });
    const schemaUrl = event.dataschema;
    const eventType = event.type;
    const payload = event.data;

    console.log({ eventType, schemaUrl, payload });

Python

from cloudevents.http import from_http

    cloud_event = from_http(headers, body)
    schema_url = cloud_event.get("dataschema")
    event_type = cloud_event.get("type")
    payload = cloud_event.data

    print(event_type, schema_url, payload)

Java

import io.cloudevents.CloudEvent;

    CloudEvent event = receivedEvent; // decoded by the CloudEvents SDK
    URI schemaUrl = event.getDataSchema();
    String eventType = event.getType();
    byte[] payload = event.getData().toBytes();

Integration flow

  1. Receive the CloudEvent using your language's CloudEvents SDK.
  2. Read type and dataschema from the envelope.
  3. Load the referenced schema if you need validation or model generation.
  4. Parse data using your platform's JSON tooling.
  5. Map the validated payload into your local domain model.

Useful references for SDKs and specification details:

Discovery flow

The schema catalog is exposed as JSON and can be queried directly:

A typical client flow is:

Parsing events from the schema URL

Some clients can work directly from the JSON schema URL instead of generating strongly typed classes first. In that flow, the client downloads the schema, reads the event metadata, and parses the event payload as JSON at runtime.

This is useful when you want to:

Using JSON keeps the contract portable and avoids coupling consumers to a specific runtime or build toolchain.

Versioning guidance

Available contracts

The section below lists the published contract catalog for available domains. Use it to browse available events, compare schema versions, and open the payload schema linked to each CloudEvent.