example.event
Publish a new version
version 1.0 ▾
- Canonical URL
- https://schematalog.com/api/schemas/example.event/versions/1.0 (opens in a new tab)
- Published
- 22 August 2026 23:11
Properties
| Parameter | Description | Type | Required | Nullable | Default | Example |
|---|---|---|---|---|---|---|
actor |
Object | Optional | ||||
id |
UUID | Required | ||||
occurred_at |
ISO 8601 Timestamp | Required | ||||
priority |
Integer | Optional | ||||
tags |
List of String | Optional | ||||
type |
The kind of event. | String | Required |
Definition
{ "type": "object", "$schema": "https://json-schema.org/draft/2020-12/schema", "required": [ "id", "type", "occurred_at" ], "properties": { "id": { "type": "string", "format": "uuid" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "enum": [ "created", "updated", "deleted" ], "type": "string", "description": "The kind of event." }, "actor": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" } } }, "priority": { "type": "integer", "maximum": 9, "minimum": 0 }, "occurred_at": { "type": "string", "format": "date-time" } }, "$id": "https://schematalog.com/api/schemas/example.event/versions/1.0", "title": "example.event" }
$id: https://schematalog.com/api/schemas/example.event/versions/1.0 $schema: https://json-schema.org/draft/2020-12/schema properties: actor: properties: id: format: uuid type: string name: type: string type: object id: format: uuid type: string occurred_at: format: date-time type: string priority: maximum: 9 minimum: 0 type: integer tags: items: type: string type: array type: description: The kind of event. enum: - created - updated - deleted type: string required: - id - type - occurred_at title: example.event type: object
from __future__ import annotations from enum import Enum from typing import List, Optional from uuid import UUID from pydantic import AwareDatetime, BaseModel, Field, conint class Type(Enum): created = 'created' updated = 'updated' deleted = 'deleted' class Actor(BaseModel): id: Optional[UUID] = None name: Optional[str] = None class ExampleEvent(BaseModel): id: UUID tags: Optional[List[str]] = None type: Type = Field(..., description='The kind of event.') actor: Optional[Actor] = None priority: Optional[conint(ge=0, le=9)] = None occurred_at: AwareDatetime
{ "type": "record", "name": "ExampleEvent", "fields": [ { "name": "id", "type": { "type": "string", "logicalType": "uuid" } }, { "name": "tags", "type": [ "null", { "type": "array", "items": "string" } ], "default": null }, { "name": "type", "type": { "type": "enum", "name": "Type", "symbols": [ "created", "updated", "deleted" ], "namespace": "example.event" }, "doc": "The kind of event." }, { "name": "actor", "type": [ "null", { "type": "record", "name": "Actor", "fields": [ { "name": "id", "type": [ "null", { "type": "string", "logicalType": "uuid" } ], "default": null }, { "name": "name", "type": [ "null", "string" ], "default": null } ], "namespace": "example.event" } ], "default": null }, { "name": "priority", "type": [ "null", "long" ], "default": null }, { "name": "occurred_at", "type": { "type": "long", "logicalType": "timestamp-millis" } } ], "namespace": "example.event" }