Skip to main content
The Schemas API provides a local schema registry for Devset. You register a schema once — either as a JSON Schema document or a Protobuf definition — and Devset uses it to validate message payloads and deserialize broker messages during workflow simulation and execution. All endpoints are relative to http://localhost:8082.

POST /schemas

Create a new schema. Devset supports two schema types: json for JSON Schema documents and protobuf for Protocol Buffer definitions.
id
string
required
A unique identifier for this schema, such as order-created or payment-processed.
version
integer
A numeric version for this schema, such as 1 or 2.
type
string
required
The schema format. Accepted values: json, protobuf.
schema
object | string
required
The schema definition. For json, provide a JSON Schema object. For protobuf, provide the raw .proto file content as a string.
descriptor
string
Protobuf only. A Base64-encoded FileDescriptorSet binary. Provide this when your .proto file imports other files and you want Devset to resolve them offline.
protobufRootMessage
string
Protobuf only. The fully-qualified name of the root message type to use for deserialization, such as com.example.OrderCreated.
Request example
{
  "id": "order-created",
  "version": 1,
  "type": "json",
  "schema": {
    "type": "object",
    "properties": {
      "id": { "type": "string" },
      "amount": { "type": "number" },
      "status": { "type": "string" }
    },
    "required": ["id", "amount", "status"]
  }
}
Response — 201 Created
{
  "id": "order-created",
  "version": 1,
  "type": "json",
  "schema": {
    "type": "object",
    "properties": {
      "id": { "type": "string" },
      "amount": { "type": "number" },
      "status": { "type": "string" }
    },
    "required": ["id", "amount", "status"]
  }
}
id
string
The identifier of the newly created schema.
version
integer
The version number that was stored.
type
string
The schema format: json or protobuf.
schema
object | string
The stored schema definition.

GET /schemas

List all schemas registered in Devset. The response contains summary information for each schema, including its full definition. Response — 200 OK
[
  {
    "id": "order-created",
    "version": 1,
    "type": "json",
    "schema": {
      "type": "object",
      "properties": {
        "id": { "type": "string" }
      }
    }
  },
  {
    "id": "order-created-proto",
    "version": 1,
    "type": "protobuf",
    "schema": "syntax = \"proto3\"; ...",
    "protobufRootMessage": "com.example.OrderCreated"
  },
  {
    "id": "payment-processed",
    "version": 2,
    "type": "json",
    "schema": {}
  }
]
id
string
The unique schema identifier.
version
integer
The version number for this schema.
type
string
The schema format: json or protobuf.
schema
object | string
The schema definition.
descriptor
string | null
Protobuf only. The Base64-encoded FileDescriptorSet, if one was provided.
protobufRootMessage
string | null
Protobuf only. The fully-qualified root message name, if one was provided.

PUT /schemas/

Replace an existing schema entirely. You must provide the full schema body — partial updates are not supported. Devset overwrites the stored definition and returns the updated schema. Path parameters
schemaId
string
required
The id of the schema to replace.
id
string
required
Must match the schemaId path parameter.
version
integer
The updated version number.
type
string
required
The schema format: json or protobuf.
schema
object | string
required
The updated schema definition.
descriptor
string
Protobuf only. Updated Base64-encoded FileDescriptorSet.
protobufRootMessage
string
Protobuf only. Updated root message type name.
Request example
{
  "id": "order-created",
  "version": 2,
  "type": "json",
  "schema": {
    "type": "object",
    "properties": {
      "id": { "type": "string" },
      "amount": { "type": "number" },
      "status": { "type": "string" },
      "currency": { "type": "string" }
    },
    "required": ["id", "amount", "status", "currency"]
  }
}
Response — 200 OK
{
  "id": "order-created",
  "version": 2,
  "type": "json",
  "schema": {
    "type": "object",
    "properties": {
      "id": { "type": "string" },
      "amount": { "type": "number" },
      "status": { "type": "string" },
      "currency": { "type": "string" }
    },
    "required": ["id", "amount", "status", "currency"]
  }
}

DELETE /schemas/

Permanently delete a schema. This cannot be undone. Path parameters
schemaId
string
required
The id of the schema to delete.
Response — 204 No Content An empty 204 No Content response confirms successful deletion.
Deleting a schema that is actively referenced by a workflow stage may cause validation errors the next time that workflow runs. Remove schema references from your workflows before deleting the schema.