feat: add initial v1 contracts
This commit is contained in:
@@ -4,3 +4,5 @@ Shared versioned HTTP and authenticated WebSocket contracts for `trixie-server`
|
||||
|
||||
This repository contains schemas, shared enums, error codes, compatibility fixtures, contract tests, and API documentation only.
|
||||
|
||||
The first contract slice is under `contracts/v1/` and `fixtures/v1/`. It covers server readiness and health so the client and server can be developed and tested together before Twitch integration.
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://trixie.invalid/contracts/v1/health.json",
|
||||
"title": "Trixie Health",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["status"],
|
||||
"properties": {
|
||||
"status": { "type": "string", "enum": ["ok"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://trixie.invalid/contracts/v1/server-info.json",
|
||||
"title": "Trixie Server Info",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["api_version", "server_version", "status"],
|
||||
"properties": {
|
||||
"api_version": { "type": "string", "const": "v1" },
|
||||
"server_version": { "type": "string", "minLength": 1 },
|
||||
"status": { "type": "string", "enum": ["ready"] }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"api_version": "v1",
|
||||
"server_version": "0.1.0-dev",
|
||||
"status": "ready"
|
||||
}
|
||||
Reference in New Issue
Block a user