Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/connect/schemas/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"schemas": {
"app_manifest": "./mdbase-app.schema.json",
"data_contract": "./data-contract.schema.json",
"event_action_interop": "./interop/v0.1/profile.schema.json",
"connect_protocol": "./connect-protocol.v1.schema.json",
"encrypted_relay": "./encrypted-relay.v1.schema.json",
"notification_webhook": "./notification-webhook.v1.schema.json",
Expand Down
3 changes: 2 additions & 1 deletion public/connect/schemas/connect-protocol.v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,9 @@
"collectionContract": {
"type": "object",
"additionalProperties": false,
"required": ["id", "version", "digest", "schema", "implementations"],
"required": ["contract_type", "id", "version", "digest", "schema", "implementations"],
"properties": {
"contract_type": { "const": "record" },
"id": { "type": "string", "minLength": 1 },
"version": { "$ref": "#/$defs/semanticVersion" },
"digest": { "$ref": "#/$defs/digest" },
Expand Down
129 changes: 117 additions & 12 deletions public/connect/schemas/data-contract.schema.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,107 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://mdbase.dev/schemas/v0.3/data-contract.schema.json",
"title": "mdbase v0.3 data contract frontmatter",
"title": "mdbase v0.3 contract frontmatter",
"type": "object",
"required": ["kind", "id", "version", "schema"],
"required": ["kind", "contract_type", "id", "version"],
"properties": {
"kind": { "const": "mdbase.contract" },
"id": { "$ref": "#/$defs/contractId" },
"version": { "$ref": "#/$defs/semanticVersion" },
"name": { "type": "string", "minLength": 1 },
"description": { "type": "string" },
"schema": { "$ref": "#/$defs/schemaWrapper" },
"binding_schema": { "$ref": "#/$defs/schemaWrapper" }
"kind": {
"const": "mdbase.contract"
},
"contract_type": {
"enum": ["record", "event", "action"]
},
"id": {
"$ref": "#/$defs/contractId"
},
"version": {
"$ref": "#/$defs/semanticVersion"
},
"name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"record_schema": {
"$ref": "#/$defs/schemaWrapper"
},
"binding_schema": {
"$ref": "#/$defs/schemaWrapper"
},
"data_schema": {
"$ref": "#/$defs/schemaWrapper"
},
"source_schema": {
"$ref": "#/$defs/schemaWrapper"
},
"input_schema": {
"$ref": "#/$defs/schemaWrapper"
},
"output_schema": {
"$ref": "#/$defs/schemaWrapper"
},
"error_schema": {
"$ref": "#/$defs/schemaWrapper"
},
"provider_schema": {
"$ref": "#/$defs/schemaWrapper"
},
"behavior": {
"$ref": "#/$defs/actionBehavior"
}
},
"patternProperties": {
"^x-[A-Za-z][A-Za-z0-9._:-]{0,127}$": true
},
"oneOf": [
{
"properties": {
"contract_type": { "const": "record" },
"record_schema": true,
"binding_schema": true,
"data_schema": false,
"source_schema": false,
"input_schema": false,
"output_schema": false,
"error_schema": false,
"provider_schema": false,
"behavior": false
},
"required": ["record_schema"]
},
{
"properties": {
"contract_type": { "const": "event" },
"record_schema": false,
"binding_schema": false,
"data_schema": true,
"source_schema": true,
"input_schema": false,
"output_schema": false,
"error_schema": false,
"provider_schema": false,
"behavior": false
},
"required": ["data_schema"]
},
{
"properties": {
"contract_type": { "const": "action" },
"record_schema": false,
"binding_schema": false,
"data_schema": false,
"source_schema": false,
"input_schema": true,
"output_schema": true,
"error_schema": true,
"provider_schema": true,
"behavior": true
},
"required": ["input_schema"]
}
],
"additionalProperties": false,
"$defs": {
"contractId": {
Expand All @@ -32,9 +118,16 @@
"type": "object",
"required": ["dialect"],
"properties": {
"dialect": { "const": "json-schema-2020-12" },
"value": { "type": "object" },
"ref": { "type": "string", "minLength": 1 }
"dialect": {
"const": "json-schema-2020-12"
},
"value": {
"type": "object"
},
"ref": {
"type": "string",
"minLength": 1
}
},
"oneOf": [
{
Expand All @@ -53,6 +146,18 @@
}
],
"additionalProperties": false
},
"actionBehavior": {
"type": "object",
"properties": {
"idempotency": {
"enum": ["none", "optional", "required"]
},
"cancellation": {
"enum": ["none", "cooperative"]
}
},
"additionalProperties": false
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://mdbase.dev/schemas/interop/v0.1/action-cancellation.schema.json",
"title": "mdbase action cancellation request",
"$ref": "profile.schema.json#/$defs/actionCancellation"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://mdbase.dev/schemas/interop/v0.1/action-invocation.schema.json",
"title": "mdbase admitted action invocation",
"$ref": "profile.schema.json#/$defs/actionInvocation"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://mdbase.dev/schemas/interop/v0.1/action-outcome.schema.json",
"title": "mdbase action outcome",
"$ref": "profile.schema.json#/$defs/actionOutcome"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://mdbase.dev/schemas/interop/v0.1/action-provider-declaration.schema.json",
"title": "mdbase action-provider declaration",
"$ref": "profile.schema.json#/$defs/actionProviderDeclaration"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://mdbase.dev/schemas/interop/v0.1/action-request.schema.json",
"title": "mdbase action request",
"$ref": "profile.schema.json#/$defs/actionRequest"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://mdbase.dev/schemas/interop/v0.1/conformance-claim.schema.json",
"title": "mdbase interoperability conformance claim",
"$ref": "profile.schema.json#/$defs/conformanceClaim"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://mdbase.dev/schemas/interop/v0.1/event-source-declaration.schema.json",
"title": "mdbase event-source declaration",
"$ref": "profile.schema.json#/$defs/eventSourceDeclaration"
}
6 changes: 6 additions & 0 deletions public/connect/schemas/interop/v0.1/event.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://mdbase.dev/schemas/interop/v0.1/event.schema.json",
"title": "mdbase CloudEvents event envelope",
"$ref": "profile.schema.json#/$defs/event"
}
Loading