diff --git a/crates/wick/wick-config/definitions/json-schema.json.tpl b/crates/wick/wick-config/definitions/json-schema.json.tpl index cb4c97e5f..30788d6e5 100644 --- a/crates/wick/wick-config/definitions/json-schema.json.tpl +++ b/crates/wick/wick-config/definitions/json-schema.json.tpl @@ -4,11 +4,11 @@ "type": "object", "$defs": {}, "oneOf": [ - { "$ref": "#/$defs/v1/AppConfiguration" }, - { "$ref": "#/$defs/v1/ComponentConfiguration" }, - { "$ref": "#/$defs/v1/TypesConfiguration" }, - { "$ref": "#/$defs/v1/TestConfiguration" }, - { "$ref": "#/$defs/v1/LockdownConfiguration" }, - { "$ref": "#/$defs/v0/HostManifest" } + { "$ref": "#/$defs/v1.AppConfiguration" }, + { "$ref": "#/$defs/v1.ComponentConfiguration" }, + { "$ref": "#/$defs/v1.TypesConfiguration" }, + { "$ref": "#/$defs/v1.TestConfiguration" }, + { "$ref": "#/$defs/v1.LockdownConfiguration" }, + { "$ref": "#/$defs/v0.HostManifest" } ] } diff --git a/crates/wick/wick-config/definitions/json-schema.ts b/crates/wick/wick-config/definitions/json-schema.ts index 74d94c404..8aa34ad05 100644 --- a/crates/wick/wick-config/definitions/json-schema.ts +++ b/crates/wick/wick-config/definitions/json-schema.ts @@ -12,10 +12,10 @@ const inner_json = imports.map((path) => let template_json = JSON.parse(readFileSync(template_path, 'utf-8')); -for (const json of inner_json) { - for (const [key, value] of Object.entries(json)) { - template_json['$defs'][key] = value; - } +let entries = inner_json.flatMap((json) => Object.entries(json)); + +for (const [key, value] of entries) { + template_json['$defs'][key] = value; } console.log(JSON.stringify(template_json, null, 2)); diff --git a/crates/wick/wick-config/definitions/v0/manifest.apex b/crates/wick/wick-config/definitions/v0/manifest.apex index 6aa8d0787..c61c7e92e 100644 --- a/crates/wick/wick-config/definitions/v0/manifest.apex +++ b/crates/wick/wick-config/definitions/v0/manifest.apex @@ -84,9 +84,6 @@ type NetworkManifest { "The unique identifier for this Network." name: string?, - "The collection to use as the entrypoint when running as a standalone process." - triggers: EntrypointDefinition?, - "The links between capabilities and components." schematics: [SchematicManifest], @@ -94,18 +91,6 @@ type NetworkManifest { collections: [CollectionDefinition], } -"A collection definition for the main entrypoint." -type EntrypointDefinition { - "The reference/location of the collection." - reference: string, - - "The component to use as the entrypoint." - component: string, - - "Data or configuration used to initialize the collection." - data: {string: any}?, -} - "A collection definition." type CollectionDefinition { "The local namespace for the collection." diff --git a/crates/wick/wick-config/definitions/v0/templates/json-schema/manifest.hbs b/crates/wick/wick-config/definitions/v0/templates/json-schema/manifest.hbs index ad5e50f1f..de570fc52 100644 --- a/crates/wick/wick-config/definitions/v0/templates/json-schema/manifest.hbs +++ b/crates/wick/wick-config/definitions/v0/templates/json-schema/manifest.hbs @@ -1,6 +1,5 @@ { - "v0": { {{~#each definitions~}} {{~#switch kind~}} {{#case "TypeDefinition"}}{{> schema-definition-type}}{{/case}} @@ -15,6 +14,5 @@ {{~/default~}} {{~/switch~}} {{~/each~}} - } } diff --git a/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/expand-type.hbs b/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/expand-type.hbs index 238fb8ff2..5b2ac9174 100644 --- a/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/expand-type.hbs +++ b/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/expand-type.hbs @@ -8,32 +8,43 @@ {{#case "ListType"}} "type":"array", "items": { + {{#withType type}} + {{#withAnnotation "shortform" ~}} + "oneOf" : [ + { "type":"string" }, + {{#with "{"}}{{.}}{{/with}} + {{~/withAnnotation}} + {{/withType}} {{> expand-type type }} + {{#withType type}} + {{#withAnnotation "shortform" ~}} + {{#with "}"}}{{.}}{{/with}} + ] + {{~/withAnnotation}} + {{/withType}} } {{/case}} {{#case "Optional"}} - "required" : false, {{> expand-type type }} - {{#ifCond type.name.value "==" "ConnectionTargetDefinition"}} - #[serde(deserialize_with = "connection_target_shortform")] - {{/ifCond}} {{/case}} {{#case "Named"~}} {{#switch name.value~}} - {{#case "any"}}"oneOf": [{"type":"boolean"},{"type":"object"},{"type":"array"},{"type":"string"},{"type":"number"}]{{/case}} + {{#case "any"}}{{/case}} + {{#case "LocationReference"}}"type":"string"{{/case}} + {{#case "Glob"}}"type":"string"{{/case}} {{#case "string"}}"type":"string"{{/case}} - {{#case "i8"}}"type":"number"{{/case}} - {{#case "u8"}}"type":"number"{{/case}} - {{#case "i16"}}"type":"number"{{/case}} - {{#case "u16"}}"type":"number"{{/case}} - {{#case "i32"}}"type":"number"{{/case}} - {{#case "u32"}}"type":"number"{{/case}} - {{#case "i64"}}"type":"number"{{/case}} - {{#case "u64"}}"type":"number"{{/case}} - {{#case "f32"}}"type":"number"{{/case}} - {{#case "f64"}}"type":"number"{{/case}} + {{#case "i8"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} + {{#case "u8"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} + {{#case "i16"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} + {{#case "u16"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} + {{#case "i32"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} + {{#case "u32"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} + {{#case "i64"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} + {{#case "u64"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} + {{#case "f32"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} + {{#case "f64"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} {{#case "bool"}}"type":"boolean"{{/case}} - {{#default}}"$ref":"#/$defs/v0/{{name.value}}"{{/default}} + {{#default}}"$ref":"#/$defs/v0.{{name.value}}"{{/default}} {{~/switch}} {{~/case}} {{~/switch}} diff --git a/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/expand-value.hbs b/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/expand-value.hbs deleted file mode 100644 index 5773dba9f..000000000 --- a/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/expand-value.hbs +++ /dev/null @@ -1,21 +0,0 @@ - -{{#switch kind ~}} - {{#case "StringValue"}} - "{{value}}".to_owned() - {{/case}} - {{#case "ObjectValue"}} - {{#if fields }} - {{panic "Unhandled default" . }} - {{/if}} - HashMap::new() - {{/case}} - {{#case "ListValue"}} - {{#if value }} - {{panic "Unhandled default" . }} - {{/if}} - Vec::new() - {{/case}} - {{#default}} - {{panic "unhandled value" . }} - {{/default}} -{{~/switch}} \ No newline at end of file diff --git a/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/schema-definition-enum.hbs b/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/schema-definition-enum.hbs index e4d111b3b..841b34f19 100644 --- a/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/schema-definition-enum.hbs +++ b/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/schema-definition-enum.hbs @@ -1,8 +1,8 @@ -"{{name.value}}": { - "$anchor": "#v0/{{name.value}}", +"v0.{{name.value}}": { + "$anchor": "v0.{{name.value}}", "enum" : [ {{#join values "," ~}} - "{{name.value}}" + "{{ pascalCase name.value}}" {{~/join}} ] }, diff --git a/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/schema-definition-type.hbs b/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/schema-definition-type.hbs index 75f5c0b28..e5ecde5a4 100644 --- a/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/schema-definition-type.hbs +++ b/crates/wick/wick-config/definitions/v0/templates/json-schema/partials/schema-definition-type.hbs @@ -1,7 +1,29 @@ -"{{name.value}}": { - "$anchor": "#v0/{{name.value}}", +{{#withAnnotation "nameonly"}} +"v0.{{../name.value}}": { + "$anchor": "v0.{{../name.value}}", "additionalProperties": false, + "type":"string", +{{#if arguments.0.value.value}} + "enum": ["{{arguments.0.value.value}}"] +{{else}} + "enum": ["{{../name.value}}"] +{{/if}} +}, +{{else}} +"v0.{{name.value}}": { + "$anchor": "v0.{{name.value}}", + "additionalProperties": false, + "type":"object", "properties": { + {{#withAnnotation "tagged"}} + {{#ifCond name.value '===' 'tagged'}} + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["{{arguments.0.value.value}}"] + }, + {{/ifCond}} + {{/withAnnotation}} {{#join fields "," ~}} "{{name.value}}" : { {{#if description}} @@ -10,7 +32,16 @@ {{#withAnnotation "discriminant"}} "enum": [{{arguments.0.value.value}}] {{else}} - {{> expand-type type }} + {{#withAnnotation "shortform" ~}} + "oneOf" : [ + { "type":"string" }, + {{#with "{"}}{{.}}{{/with}} + {{~/withAnnotation}} + {{> expand-type type }} + {{#withAnnotation "shortform" ~}} + {{#with "}"}}{{.}}{{/with}} + ] + {{~/withAnnotation}} {{/withAnnotation}} } {{~/join}} @@ -21,3 +52,4 @@ {{~/each~}} ] }, +{{/withAnnotation}} diff --git a/crates/wick/wick-config/definitions/v1/templates/json-schema/manifest.hbs b/crates/wick/wick-config/definitions/v1/templates/json-schema/manifest.hbs index 75e084d75..206ec0979 100644 --- a/crates/wick/wick-config/definitions/v1/templates/json-schema/manifest.hbs +++ b/crates/wick/wick-config/definitions/v1/templates/json-schema/manifest.hbs @@ -1,5 +1,4 @@ { - "v1": { {{#each definitions}} {{#switch kind}} {{~#case "ImportDefinition"}} @@ -16,5 +15,4 @@ {{/default}} {{/switch}} {{/each}} - } } \ No newline at end of file diff --git a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/expand-type.hbs b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/expand-type.hbs index b20333962..c69e8a413 100644 --- a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/expand-type.hbs +++ b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/expand-type.hbs @@ -45,7 +45,7 @@ {{#case "f32"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} {{#case "f64"}}"oneOf" : [{"type":"number"},{"type":"string"}]{{/case}} {{#case "bool"}}"type":"boolean"{{/case}} - {{#default}}"$ref":"#/$defs/v1/{{name.value}}"{{/default}} + {{#default}}"$ref":"#/$defs/v1.{{name.value}}"{{/default}} {{~/switch}} {{~/case}} {{~/switch}} diff --git a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/expand-value.hbs b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/expand-value.hbs deleted file mode 100644 index 5773dba9f..000000000 --- a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/expand-value.hbs +++ /dev/null @@ -1,21 +0,0 @@ - -{{#switch kind ~}} - {{#case "StringValue"}} - "{{value}}".to_owned() - {{/case}} - {{#case "ObjectValue"}} - {{#if fields }} - {{panic "Unhandled default" . }} - {{/if}} - HashMap::new() - {{/case}} - {{#case "ListValue"}} - {{#if value }} - {{panic "Unhandled default" . }} - {{/if}} - Vec::new() - {{/case}} - {{#default}} - {{panic "unhandled value" . }} - {{/default}} -{{~/switch}} \ No newline at end of file diff --git a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-alias.hbs b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-alias.hbs index a96cf96ba..1261bcd94 100644 --- a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-alias.hbs +++ b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-alias.hbs @@ -1,4 +1,4 @@ -"{{name.value}}": { +"v1.{{name.value}}": { {{#switch name.value~}} {{#case "LiquidJsonValue"}}"oneOf": [{"type":"boolean"},{"type":"object"},{"type":"array"},{"type":"string"},{"type":"number"}]{{/case}} {{#default}} diff --git a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-enum.hbs b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-enum.hbs index 620559847..5cd8567e7 100644 --- a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-enum.hbs +++ b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-enum.hbs @@ -1,5 +1,5 @@ -"{{name.value}}": { - "$anchor": "#v1/{{name.value}}", +"v1.{{name.value}}": { + "$anchor": "v1.{{name.value}}", "enum" : [ {{#join values "," ~}} "{{ pascalCase name.value}}" diff --git a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-type.hbs b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-type.hbs index efa8f1f7a..65e6fe92c 100644 --- a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-type.hbs +++ b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-type.hbs @@ -1,7 +1,7 @@ {{#withAnnotation "nameonly"}} -"{{../name.value}}": { - "$anchor": "#v1/{{../name.value}}", +"v1.{{../name.value}}": { + "$anchor": "v1.{{../name.value}}", "additionalProperties": false, "type":"string", {{#if arguments.0.value.value}} @@ -11,8 +11,8 @@ {{/if}} }, {{else}} -"{{name.value}}": { - "$anchor": "#v1/{{name.value}}", +"v1.{{name.value}}": { + "$anchor": "v1.{{name.value}}", "additionalProperties": false, "type":"object", "properties": { @@ -30,9 +30,6 @@ {{#if description}} "description": "{{description.value}}", {{/if}} - {{#ifCond type.kind "===" "Optional"}} - "required" : false, - {{/ifCond}} {{#withAnnotation "discriminant"}} "enum": [{{arguments.0.value.value}}] {{else}} diff --git a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-union.hbs b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-union.hbs index ca33e5a5f..2d1f8dbce 100644 --- a/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-union.hbs +++ b/crates/wick/wick-config/definitions/v1/templates/json-schema/partials/schema-definition-union.hbs @@ -1,11 +1,11 @@ -"{{name.value}}": { +"v1.{{name.value}}": { "oneOf" : [ {{#withAnnotation "shortform" ~}} { "type":"string" }, {{~/withAnnotation}} {{#unlessAnnotation "shortformonly"}} {{#join types "," ~}} - {"$ref": "#/$defs/v1/{{name.value}}"} + {"$ref": "#/$defs/v1.{{name.value}}"} {{~/join}} {{/unlessAnnotation}} ] diff --git a/crates/wick/wick-config/docs/v0.md b/crates/wick/wick-config/docs/v0.md index 758b0087b..b928670f9 100644 --- a/crates/wick/wick-config/docs/v0.md +++ b/crates/wick/wick-config/docs/v0.md @@ -102,30 +102,11 @@ aliases: | Field name | Type | Description | Required? | Shortform? | |------------|------|-------------|-----------|------------| | `name` | `string` |The unique identifier for this Network.||| -| `triggers` | [`EntrypointDefinition`](#entrypointdefinition) |The collection to use as the entrypoint when running as a standalone process.||| | `schematics` | [`SchematicManifest`](#schematicmanifest)[] |The links between capabilities and components.||| | `collections` | [`CollectionDefinition`](#collectiondefinition)[] |A list of component collections.||| --------- - -## EntrypointDefinition - -

-

A collection definition for the main entrypoint.
-

- - - -| Field name | Type | Description | Required? | Shortform? | -|------------|------|-------------|-----------|------------| -| `reference` | `string` |The reference/location of the collection.||| -| `component` | `string` |The component to use as the entrypoint.||| -| `data` | `{` `string` `: ` `any` `}` |Data or configuration used to initialize the collection.||| - - - -------- ## CollectionDefinition diff --git a/crates/wick/wick-config/json-schema/manifest.json b/crates/wick/wick-config/json-schema/manifest.json index 1bc6b9f60..0d5efd479 100644 --- a/crates/wick/wick-config/json-schema/manifest.json +++ b/crates/wick/wick-config/json-schema/manifest.json @@ -3,3120 +3,2937 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "$defs": { - "v0": { - "HostManifest": { - "$anchor": "#v0/HostManifest", - "additionalProperties": false, - "properties": { - "format": { - "description": "The configuration manifest format.", - "enum": [ - 0 - ] - }, - "version": { - "description": "The version of the configuration.", + "v0.CollectionDefinition": { + "$anchor": "v0.CollectionDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "namespace": { + "description": "The local namespace for the collection.", + "type": "string" + }, + "kind": { + "description": "The kind/type of the collection.", + "$ref": "#/$defs/v0.CollectionKind" + }, + "reference": { + "description": "The reference/location of the collection.", + "type": "string" + }, + "data": { + "description": "Data or configuration used to initialize the collection.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": {} + } + } + }, + "required": [] + }, + "v0.CollectionKind": { + "$anchor": "v0.CollectionKind", + "enum": [ + "Native", + "GrpcUrl", + "WaPc", + "Network" + ] + }, + "v0.ComponentDefinition": { + "$anchor": "v0.ComponentDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "id": { + "description": "The ID of the component (i.e. the alias, key, or namespace).", + "type": "string" + }, + "data": { + "description": "Data to associate with the reference.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": {} + } + } + }, + "required": [ + "id" + ] + }, + "v0.ConnectionDefinition": { + "$anchor": "v0.ConnectionDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "from": { + "description": "The originating component from upstream.", + "$ref": "#/$defs/v0.ConnectionTargetDefinition" + }, + "to": { + "description": "The destination component (downstream).", + "$ref": "#/$defs/v0.ConnectionTargetDefinition" + } + }, + "required": [] + }, + "v0.ConnectionTargetDefinition": { + "$anchor": "v0.ConnectionTargetDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "instance": { + "description": "The instance name of the referenced component.", + "type": "string" + }, + "port": { + "description": "The component's port.", + "type": "string" + }, + "data": { + "description": "Data to associate with a connection.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": {} + } + } + }, + "required": [ + "instance", + "port" + ] + }, + "v0.HostConfig": { + "$anchor": "v0.HostConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "allow_latest": { + "description": "Whether or not to allow the :latest tag on remote artifacts.", + "type": "boolean" + }, + "insecure_registries": { + "description": "A list of registries to connect to insecurely (over HTTP vs HTTPS).", + "type": "array", + "items": { "type": "string" - }, - "host": { - "description": "Additional host configuration.", - "required": false, - "$ref": "#/$defs/v0/HostConfig" - }, - "network": { - "description": "The configuration for a Wick network.", - "$ref": "#/$defs/v0/NetworkManifest" - }, - "default_schematic": { - "description": "The default schematic to execute if none is provided.", - "required": false, + } + }, + "id": { + "description": "The ID for this host, used to identify the host over the mesh.", + "type": "string" + }, + "expose": { + "description": "The schematics to expose via RPC or the mesh, if any.", + "type": "array", + "items": { "type": "string" } }, - "required": [ - "format" - ] - }, - "HostConfig": { - "$anchor": "#v0/HostConfig", - "additionalProperties": false, - "properties": { - "allow_latest": { - "description": "Whether or not to allow the :latest tag on remote artifacts.", - "type": "boolean" - }, - "insecure_registries": { - "description": "A list of registries to connect to insecurely (over HTTP vs HTTPS).", - "type": "array", - "items": { + "mesh": { + "description": "The mesh configuration.", + "$ref": "#/$defs/v0.MeshConfig" + }, + "rpc": { + "description": "Configuration for the GRPC server.", + "$ref": "#/$defs/v0.HttpConfig" + }, + "http": { + "description": "Configuration for the HTTP 1 server (development only).", + "$ref": "#/$defs/v0.HttpConfig" + } + }, + "required": [] + }, + "v0.HostManifest": { + "$anchor": "v0.HostManifest", + "additionalProperties": false, + "type": "object", + "properties": { + "format": { + "description": "The configuration manifest format.", + "enum": [ + 0 + ] + }, + "version": { + "description": "The version of the configuration.", + "type": "string" + }, + "host": { + "description": "Additional host configuration.", + "$ref": "#/$defs/v0.HostConfig" + }, + "network": { + "description": "The configuration for a Wick network.", + "$ref": "#/$defs/v0.NetworkManifest" + }, + "default_schematic": { + "description": "The default schematic to execute if none is provided.", + "type": "string" + } + }, + "required": [ + "format" + ] + }, + "v0.HttpConfig": { + "$anchor": "v0.HttpConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "enabled": { + "description": "Enable/disable the server.", + "type": "boolean" + }, + "port": { + "description": "The port to bind to.", + "oneOf": [ + { + "type": "number" + }, + { "type": "string" } - }, - "id": { - "description": "The ID for this host, used to identify the host over the mesh.", - "required": false, - "type": "string" - }, - "expose": { - "description": "The schematics to expose via RPC or the mesh, if any.", - "type": "array", - "items": { + ] + }, + "address": { + "description": "The address to bind to.", + "type": "string" + }, + "pem": { + "description": "Path to pem file for TLS.", + "type": "string" + }, + "key": { + "description": "Path to key file for TLS.", + "type": "string" + }, + "ca": { + "description": "Path to CA file.", + "type": "string" + } + }, + "required": [] + }, + "v0.MeshConfig": { + "$anchor": "v0.MeshConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "enabled": { + "description": "Enable/disable the mesh connection.", + "type": "boolean" + }, + "address": { + "description": "The address of the NATS server.", + "type": "string" + }, + "creds_path": { + "description": "The path to the NATS credsfile.", + "type": "string" + }, + "token": { + "description": "The NATS token.", + "type": "string" + } + }, + "required": [] + }, + "v0.NetworkManifest": { + "$anchor": "v0.NetworkManifest", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The unique identifier for this Network.", + "type": "string" + }, + "schematics": { + "description": "The links between capabilities and components.", + "type": "array", + "items": { + "$ref": "#/$defs/v0.SchematicManifest" + } + }, + "collections": { + "description": "A list of component collections.", + "type": "array", + "items": { + "$ref": "#/$defs/v0.CollectionDefinition" + } + } + }, + "required": [] + }, + "v0.SchematicManifest": { + "$anchor": "v0.SchematicManifest", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "Schematic name.", + "type": "string" + }, + "instances": { + "description": "A map from component reference to its target.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v0.ComponentDefinition" + } + } + }, + "connections": { + "description": "A list of connections from component to component.", + "type": "array", + "items": { + "$ref": "#/$defs/v0.ConnectionDefinition" + } + }, + "constraints": { + "description": "A map of constraints and values that limit where this schematic can run.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { "type": "string" } - }, - "mesh": { - "description": "The mesh configuration.", - "required": false, - "$ref": "#/$defs/v0/MeshConfig" - }, - "rpc": { - "description": "Configuration for the GRPC server.", - "required": false, - "$ref": "#/$defs/v0/HttpConfig" - }, - "http": { - "description": "Configuration for the HTTP 1 server (development only).", - "required": false, - "$ref": "#/$defs/v0/HttpConfig" - } - }, - "required": [] - }, - "HttpConfig": { - "$anchor": "#v0/HttpConfig", - "additionalProperties": false, - "properties": { - "enabled": { - "description": "Enable/disable the server.", - "type": "boolean" - }, - "port": { - "description": "The port to bind to.", - "required": false, - "type": "number" - }, - "address": { - "description": "The address to bind to.", - "required": false, - "type": "string" - }, - "pem": { - "description": "Path to pem file for TLS.", - "required": false, - "type": "string" - }, - "key": { - "description": "Path to key file for TLS.", - "required": false, - "type": "string" - }, - "ca": { - "description": "Path to CA file.", - "required": false, - "type": "string" } - }, - "required": [] + } }, - "MeshConfig": { - "$anchor": "#v0/MeshConfig", - "additionalProperties": false, - "properties": { - "enabled": { - "description": "Enable/disable the mesh connection.", - "type": "boolean" - }, - "address": { - "description": "The address of the NATS server.", - "type": "string" - }, - "creds_path": { - "description": "The path to the NATS credsfile.", - "required": false, - "type": "string" - }, - "token": { - "description": "The NATS token.", - "required": false, - "type": "string" - } - }, - "required": [] + "required": [ + "name" + ] + }, + "v1.AppConfiguration": { + "$anchor": "v1.AppConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/app@v1" + ] + }, + "name": { + "description": "The application's name.", + "type": "string" + }, + "metadata": { + "description": "Associated metadata for this application.", + "$ref": "#/$defs/v1.Metadata" + }, + "package": { + "description": "Details about the package for this application.", + "$ref": "#/$defs/v1.PackageDefinition" + }, + "resources": { + "description": "Resources and configuration that the application and its components can access.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.ResourceBinding" + } + }, + "import": { + "description": "Components that to import and make available to the application.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.ImportBinding" + } + }, + "triggers": { + "description": "Triggers to load and instantiate to drive the application's behavior.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TriggerDefinition" + } + } + }, + "required": [] + }, + "v1.AssertionOperator": { + "$anchor": "v1.AssertionOperator", + "enum": [ + "Equals", + "LessThan", + "GreaterThan", + "Regex", + "Contains" + ] + }, + "v1.BlockExpression": { + "$anchor": "v1.BlockExpression", + "additionalProperties": false, + "type": "object", + "properties": { + "expressions": { + "type": "array", + "items": { + "$ref": "#/$defs/v1.FlowExpression" + } + } + }, + "required": [ + "expressions" + ] + }, + "v1.Bool": { + "$anchor": "v1.Bool", + "additionalProperties": false, + "type": "string", + "enum": [ + "i8" + ] + }, + "v1.Bytes": { + "$anchor": "v1.Bytes", + "additionalProperties": false, + "type": "string", + "enum": [ + "bytes" + ] + }, + "v1.CliTrigger": { + "$anchor": "v1.CliTrigger", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/trigger/cli@v1" + ] + }, + "operation": { + "description": "The operation that will act as the main entrypoint for this trigger.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" + } + ] + } }, - "NetworkManifest": { - "$anchor": "#v0/NetworkManifest", - "additionalProperties": false, - "properties": { - "name": { - "description": "The unique identifier for this Network.", - "required": false, - "type": "string" - }, - "triggers": { - "description": "The collection to use as the entrypoint when running as a standalone process.", - "required": false, - "$ref": "#/$defs/v0/EntrypointDefinition" - }, - "schematics": { - "description": "The links between capabilities and components.", - "type": "array", - "items": { - "$ref": "#/$defs/v0/SchematicManifest" + "required": [ + "operation" + ] + }, + "v1.Codec": { + "$anchor": "v1.Codec", + "enum": [ + "Json", + "Raw", + "FormData", + "Text" + ] + }, + "v1.ComponentConfiguration": { + "$anchor": "v1.ComponentConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/component@v1" + ] + }, + "name": { + "description": "The name of the component.", + "type": "string" + }, + "metadata": { + "description": "Associated metadata for this component.", + "$ref": "#/$defs/v1.Metadata" + }, + "package": { + "description": "Details about the package for this component.", + "$ref": "#/$defs/v1.PackageDefinition" + }, + "host": { + "description": "Configuration for when wick hosts this component as a service.", + "$ref": "#/$defs/v1.HostConfig" + }, + "resources": { + "description": "Resources that the component can access.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.ResourceBinding" + } + }, + "import": { + "description": "Components or types to import into this component's scope.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.ImportBinding" + } + }, + "types": { + "description": "Additional types to export and make available to the component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TypeDefinition" + } + }, + "requires": { + "description": "Interfaces the component requires to operate.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.InterfaceBinding" + } + }, + "component": { + "description": "Configuration specific to different kinds of components.", + "$ref": "#/$defs/v1.ComponentKind" + }, + "tests": { + "description": "Assertions that can be run against the component to validate its behavior.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TestConfiguration" + } + } + }, + "required": [ + "component" + ] + }, + "v1.ComponentDefinition": { + "oneOf": [ + { + "$ref": "#/$defs/v1.GrpcUrlComponent" + }, + { + "$ref": "#/$defs/v1.ManifestComponent" + }, + { + "$ref": "#/$defs/v1.ComponentReference" + }, + { + "$ref": "#/$defs/v1.SqlComponent" + }, + { + "$ref": "#/$defs/v1.HttpClientComponent" + } + ] + }, + "v1.ComponentKind": { + "oneOf": [ + { + "$ref": "#/$defs/v1.WasmComponentConfiguration" + }, + { + "$ref": "#/$defs/v1.CompositeComponentConfiguration" + }, + { + "$ref": "#/$defs/v1.SqlComponent" + }, + { + "$ref": "#/$defs/v1.HttpClientComponent" + } + ] + }, + "v1.ComponentOperationExpression": { + "$anchor": "v1.ComponentOperationExpression", + "additionalProperties": false, + "type": "object", + "properties": { + "component": { + "description": "The component that exports the operation.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/v1.ComponentDefinition" } - }, - "collections": { - "description": "A list of component collections.", - "type": "array", - "items": { - "$ref": "#/$defs/v0/CollectionDefinition" + ] + }, + "name": { + "description": "The operation name.", + "type": "string" + }, + "with": { + "description": "Configuration to pass to this operation on invocation.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" } } }, - "required": [] - }, - "EntrypointDefinition": { - "$anchor": "#v0/EntrypointDefinition", - "additionalProperties": false, - "properties": { - "reference": { - "description": "The reference/location of the collection.", - "type": "string" - }, - "component": { - "description": "The component to use as the entrypoint.", - "type": "string" - }, - "data": { - "description": "Data or configuration used to initialize the collection.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "object" - }, - { - "type": "array" - }, - { - "type": "string" - }, - { - "type": "number" - } - ] - } + "timeout": { + "description": "Timeout (in milliseconds) to wait for the operation to complete. Use 0 to wait indefinitely.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" } + ] + } + }, + "required": [ + "component", + "name" + ] + }, + "v1.ComponentReference": { + "$anchor": "v1.ComponentReference", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/component/reference@v1" + ] + }, + "id": { + "description": "The id of the referenced component.", + "type": "string" + } + }, + "required": [ + "id" + ] + }, + "v1.CompositeComponentConfiguration": { + "$anchor": "v1.CompositeComponentConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/component/composite@v1" + ] + }, + "operations": { + "description": "A list of operations exposed by the Composite component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.CompositeOperationDefinition" } }, - "required": [] - }, - "CollectionDefinition": { - "$anchor": "#v0/CollectionDefinition", - "additionalProperties": false, - "properties": { - "namespace": { - "description": "The local namespace for the collection.", - "type": "string" - }, - "kind": { - "description": "The kind/type of the collection.", - "$ref": "#/$defs/v0/CollectionKind" - }, - "reference": { - "description": "The reference/location of the collection.", - "type": "string" - }, - "data": { - "description": "Data or configuration used to initialize the collection.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "object" - }, - { - "type": "array" - }, - { - "type": "string" - }, - { - "type": "number" - } - ] - } - } + "with": { + "description": "Configuration necessary to provide when instantiating the component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] - }, - "CollectionKind": { - "$anchor": "#v0/CollectionKind", - "enum": [ - "Native", - "GrpcUrl", - "WaPC", - "Network" - ] - }, - "SchematicManifest": { - "$anchor": "#v0/SchematicManifest", - "additionalProperties": false, - "properties": { - "name": { - "description": "Schematic name.", + "extends": { + "description": "A component or components whose operations you want to inherit from.", + "type": "array", + "items": { "type": "string" - }, - "instances": { - "description": "A map from component reference to its target.", - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v0/ComponentDefinition" - } - } - }, - "connections": { - "description": "A list of connections from component to component.", - "type": "array", - "items": { - "$ref": "#/$defs/v0/ConnectionDefinition" - } - }, - "constraints": { - "description": "A map of constraints and values that limit where this schematic can run.", - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "type": "string" - } - } + } + } + }, + "required": [] + }, + "v1.CompositeOperationDefinition": { + "$anchor": "v1.CompositeOperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", + "type": "string" + }, + "with": { + "description": "Any configuration required by the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "inputs": { + "description": "Types of the inputs to the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "outputs": { + "description": "Types of the outputs to the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [ - "name" - ] + "uses": { + "description": "A map of IDs to specific operations.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationInstance" + } + }, + "flow": { + "description": "A list of connections from operation to operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.FlowExpression" + } + }, + "operations": { + "description": "Additional `CompositeOperationDefinition`s to define as children.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.CompositeOperationDefinition" + } + } }, - "ComponentDefinition": { - "$anchor": "#v0/ComponentDefinition", - "additionalProperties": false, - "properties": { - "id": { - "description": "The ID of the component (i.e. the alias, key, or namespace).", - "type": "string" - }, - "data": { - "description": "Data to associate with the reference.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "object" - }, - { - "type": "array" - }, - { - "type": "string" - }, - { - "type": "number" - } - ] - } + "required": [] + }, + "v1.ConnectionDefinition": { + "$anchor": "v1.ConnectionDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "from": { + "description": "An upstream operation's output.", + "$ref": "#/$defs/v1.ConnectionTargetDefinition" + }, + "to": { + "description": "A downstream operation's input.", + "$ref": "#/$defs/v1.ConnectionTargetDefinition" + } + }, + "required": [ + "from", + "to" + ] + }, + "v1.ConnectionTargetDefinition": { + "$anchor": "v1.ConnectionTargetDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "instance": { + "description": "The instance ID of the component operation.", + "type": "string" + }, + "port": { + "description": "The operation's input or output (depending on to/from).", + "type": "string" + }, + "data": { + "description": "The default value to provide on this connection in the event of an error.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" + } + } + } + }, + "required": [ + "instance" + ] + }, + "v1.Contact": { + "$anchor": "v1.Contact", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the contact.", + "type": "string" + }, + "url": { + "description": "The URL to the contact.", + "type": "string" + }, + "email": { + "description": "The email address of the contact.", + "type": "string" + } + }, + "required": [] + }, + "v1.Custom": { + "$anchor": "v1.Custom", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the custom type.", + "type": "string" + } + }, + "required": [] + }, + "v1.Datetime": { + "$anchor": "v1.Datetime", + "additionalProperties": false, + "type": "string", + "enum": [ + "datetime" + ] + }, + "v1.Documentation": { + "$anchor": "v1.Documentation", + "additionalProperties": false, + "type": "object", + "properties": { + "url": { + "description": "The URL to the API's documentation.", + "type": "string" + }, + "description": { + "description": "A short description of the documentation.", + "type": "string" + } + }, + "required": [] + }, + "v1.EnumSignature": { + "$anchor": "v1.EnumSignature", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/type/enum@v1" + ] + }, + "name": { + "description": "The name of the enum.", + "type": "string" + }, + "variants": { + "description": "The variants in the enum.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.EnumVariant" + } + }, + "description": { + "description": "The description of the enum.", + "type": "string" + } + }, + "required": [] + }, + "v1.EnumVariant": { + "$anchor": "v1.EnumVariant", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the variant.", + "type": "string" + }, + "index": { + "description": "The index of the variant.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" } - } + ] + }, + "value": { + "description": "The optional value of the variant.", + "type": "string" }, - "required": [ - "id" - ] + "description": { + "description": "A description of the variant.", + "type": "string" + } }, - "ConnectionDefinition": { - "$anchor": "#v0/ConnectionDefinition", - "additionalProperties": false, - "properties": { - "from": { - "description": "The originating component from upstream.", - "$ref": "#/$defs/v0/ConnectionTargetDefinition" - }, - "to": { - "description": "The destination component (downstream).", - "$ref": "#/$defs/v0/ConnectionTargetDefinition" + "required": [] + }, + "v1.ErrorBehavior": { + "$anchor": "v1.ErrorBehavior", + "enum": [ + "Ignore", + "Commit", + "Rollback" + ] + }, + "v1.ErrorPacket": { + "$anchor": "v1.ErrorPacket", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the input or output this packet is going to or coming from.", + "type": "string" + }, + "flags": { + "description": "Any flags set on the packet. Deprecated, use 'flag:' instead", + "$ref": "#/$defs/v1.PacketFlags" + }, + "flag": { + "description": "The flag set on the packet.", + "$ref": "#/$defs/v1.PacketFlag" + }, + "error": { + "description": "The error message.", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [ + "name", + "error" + ] + }, + "v1.ExposedVolume": { + "$anchor": "v1.ExposedVolume", + "additionalProperties": false, + "type": "object", + "properties": { + "resource": { + "description": "The resource ID of the volume.", + "type": "string" + }, + "path": { + "description": "The path to map it to in the component.", + "type": "string" + } + }, + "required": [ + "resource", + "path" + ] + }, + "v1.F32": { + "$anchor": "v1.F32", + "additionalProperties": false, + "type": "string", + "enum": [ + "f32" + ] + }, + "v1.F64": { + "$anchor": "v1.F64", + "additionalProperties": false, + "type": "string", + "enum": [ + "f64" + ] + }, + "v1.Field": { + "$anchor": "v1.Field", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the field.", + "type": "string" + }, + "type": { + "description": "The type signature of the field.", + "$ref": "#/$defs/v1.TypeSignature" + }, + "description": { + "description": "The description of the field.", + "type": "string" + } + }, + "required": [ + "name", + "type" + ] + }, + "v1.FlowExpression": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/v1.ConnectionDefinition" + }, + { + "$ref": "#/$defs/v1.BlockExpression" + } + ] + }, + "v1.Glob": { + "type": "string" + }, + "v1.GrpcUrlComponent": { + "$anchor": "v1.GrpcUrlComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/component/grpc@v1" + ] + }, + "url": { + "description": "The GRPC URL to connect to.", + "type": "string" + }, + "with": { + "description": "Any configuration necessary for the component.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" + } + } + } + }, + "required": [ + "url" + ] + }, + "v1.HostConfig": { + "$anchor": "v1.HostConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "allow_latest": { + "description": "Whether or not to allow the `:latest` tag on remote artifacts.", + "type": "boolean" + }, + "insecure_registries": { + "description": "A list of registries to connect to insecurely (over HTTP vs HTTPS).", + "type": "array", + "items": { + "type": "string" } }, - "required": [] + "rpc": { + "description": "Configuration for the GRPC server.", + "$ref": "#/$defs/v1.HttpConfig" + } }, - "ConnectionTargetDefinition": { - "$anchor": "#v0/ConnectionTargetDefinition", - "additionalProperties": false, - "properties": { - "instance": { - "description": "The instance name of the referenced component.", - "type": "string" - }, - "port": { - "description": "The component's port.", - "type": "string" - }, - "data": { - "description": "Data to associate with a connection.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "object" - }, - { - "type": "array" - }, - { - "type": "string" - }, - { - "type": "number" - } - ] + "required": [] + }, + "v1.HttpClientComponent": { + "$anchor": "v1.HttpClientComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/component/http@v1" + ] + }, + "resource": { + "description": "The URL base to use.", + "type": "string" + }, + "codec": { + "description": "The codec to use when encoding/decoding data. Can be overridden by individual operations.", + "$ref": "#/$defs/v1.Codec" + }, + "with": { + "description": "Configuration necessary to provide when instantiating the component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "operations": { + "description": "A list of operations to expose on this component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.HttpClientOperationDefinition" + } + } + }, + "required": [] + }, + "v1.HttpClientOperationDefinition": { + "$anchor": "v1.HttpClientOperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", + "type": "string" + }, + "with": { + "description": "Any configuration required by the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "inputs": { + "description": "Types of the inputs to the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "method": { + "description": "The HTTP method to use.", + "$ref": "#/$defs/v1.HttpMethod" + }, + "codec": { + "description": "The codec to use when encoding/decoding data.", + "$ref": "#/$defs/v1.Codec" + }, + "headers": { + "description": "Any headers to add to the request.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "type": "array", + "items": { + "type": "string" } } } }, - "required": [ - "instance", - "port" - ] - } - }, - "v1": { - "WickConfig": { - "oneOf": [ - { - "$ref": "#/$defs/v1/AppConfiguration" - }, - { - "$ref": "#/$defs/v1/ComponentConfiguration" - }, - { - "$ref": "#/$defs/v1/TypesConfiguration" - }, - { - "$ref": "#/$defs/v1/TestConfiguration" - }, - { - "$ref": "#/$defs/v1/LockdownConfiguration" - } - ] - }, - "LocationReference": { - "type": "string" - }, - "LiquidJsonValue": { - "oneOf": [ - { - "type": "boolean" - }, - { - "type": "object" - }, - { - "type": "array" - }, - { - "type": "string" - }, - { - "type": "number" - } - ] - }, - "LiquidTemplate": { - "type": "string" - }, - "Glob": { - "type": "string" - }, - "AppConfiguration": { - "$anchor": "#v1/AppConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/app@v1" - ] - }, - "name": { - "description": "The application's name.", - "type": "string" - }, - "metadata": { - "description": "Associated metadata for this application.", - "required": false, - "$ref": "#/$defs/v1/Metadata" - }, - "package": { - "description": "Details about the package for this application.", - "required": false, - "$ref": "#/$defs/v1/PackageDefinition" - }, - "resources": { - "description": "Resources and configuration that the application and its components can access.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/ResourceBinding" - } - }, - "import": { - "description": "Components that to import and make available to the application.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/ImportBinding" - } - }, - "triggers": { - "description": "Triggers to load and instantiate to drive the application's behavior.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TriggerDefinition" + "body": { + "description": "The body to send, processed as a structured JSON liquid template.", + "$ref": "#/$defs/v1.LiquidJsonValue" + }, + "path": { + "description": "The path to append to our base URL, processed as a liquid template with each input as part of the template data.", + "type": "string" + } + }, + "required": [] + }, + "v1.HttpConfig": { + "$anchor": "v1.HttpConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "enabled": { + "description": "Enable/disable the server.", + "type": "boolean" + }, + "port": { + "description": "The port to bind to.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" } - } + ] + }, + "address": { + "description": "The address to bind to.", + "type": "string" + }, + "pem": { + "description": "Path to pem file for TLS.", + "type": "string" + }, + "key": { + "description": "Path to key file for TLS.", + "type": "string" }, - "required": [] + "ca": { + "description": "Path to CA file.", + "type": "string" + } }, - "Metadata": { - "$anchor": "#v1/Metadata", - "additionalProperties": false, - "type": "object", - "properties": { - "version": { - "description": "The version of the artifact.", - "type": "string" - }, - "authors": { - "description": "A list of the authors.", - "type": "array", - "items": { + "required": [] + }, + "v1.HttpMethod": { + "$anchor": "v1.HttpMethod", + "enum": [ + "Get", + "Post", + "Put", + "Delete" + ] + }, + "v1.HttpRouter": { + "oneOf": [ + { + "$ref": "#/$defs/v1.RawRouter" + }, + { + "$ref": "#/$defs/v1.RestRouter" + }, + { + "$ref": "#/$defs/v1.StaticRouter" + }, + { + "$ref": "#/$defs/v1.ProxyRouter" + } + ] + }, + "v1.HttpTrigger": { + "$anchor": "v1.HttpTrigger", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/trigger/http@v1" + ] + }, + "resource": { + "description": "The TcpPort resource to listen on for connections.", + "type": "string" + }, + "routers": { + "description": "The router to handle incoming requests", + "type": "array", + "items": { + "$ref": "#/$defs/v1.HttpRouter" + } + } + }, + "required": [ + "resource" + ] + }, + "v1.I16": { + "$anchor": "v1.I16", + "additionalProperties": false, + "type": "string", + "enum": [ + "i16" + ] + }, + "v1.I32": { + "$anchor": "v1.I32", + "additionalProperties": false, + "type": "string", + "enum": [ + "i32" + ] + }, + "v1.I64": { + "$anchor": "v1.I64", + "additionalProperties": false, + "type": "string", + "enum": [ + "i64" + ] + }, + "v1.I8": { + "$anchor": "v1.I8", + "additionalProperties": false, + "type": "string", + "enum": [ + "i8" + ] + }, + "v1.ImportBinding": { + "$anchor": "v1.ImportBinding", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the binding.", + "type": "string" + }, + "component": { + "description": "The import to bind to.", + "$ref": "#/$defs/v1.ImportDefinition" + } + }, + "required": [ + "name", + "component" + ] + }, + "v1.ImportDefinition": { + "oneOf": [ + { + "$ref": "#/$defs/v1.TypesComponent" + }, + { + "$ref": "#/$defs/v1.ManifestComponent" + }, + { + "$ref": "#/$defs/v1.SqlComponent" + }, + { + "$ref": "#/$defs/v1.HttpClientComponent" + } + ] + }, + "v1.Info": { + "$anchor": "v1.Info", + "additionalProperties": false, + "type": "object", + "properties": { + "title": { + "description": "The title of the API.", + "type": "string" + }, + "description": { + "description": "A short description of the API.", + "type": "string" + }, + "tos": { + "description": "The terms of service for the API.", + "type": "string" + }, + "contact": { + "description": "The contact information for the API.", + "$ref": "#/$defs/v1.Contact" + }, + "license": { + "description": "The license information for the API.", + "$ref": "#/$defs/v1.License" + }, + "version": { + "description": "The version of the API.", + "type": "string" + }, + "documentation": { + "description": "The URL to the API's terms of service.", + "$ref": "#/$defs/v1.Documentation" + } + }, + "required": [] + }, + "v1.InherentData": { + "$anchor": "v1.InherentData", + "additionalProperties": false, + "type": "object", + "properties": { + "seed": { + "description": "A random seed, i.e. to initialize a random number generator.", + "oneOf": [ + { + "type": "number" + }, + { "type": "string" } - }, - "vendors": { - "description": "A list of any vendors associated with the artifact.", - "type": "array", - "items": { + ] + }, + "timestamp": { + "description": "A timestamp.", + "oneOf": [ + { + "type": "number" + }, + { "type": "string" } - }, - "description": { - "description": "A short description.", - "required": false, - "type": "string" - }, - "documentation": { - "description": "Where to find documentation.", - "required": false, - "type": "string" - }, - "licenses": { - "description": "The license(s) for the artifact.", - "type": "array", - "items": { + ] + } + }, + "required": [] + }, + "v1.InterfaceBinding": { + "$anchor": "v1.InterfaceBinding", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the interface.", + "type": "string" + }, + "interface": { + "description": "The interface to bind to.", + "$ref": "#/$defs/v1.InterfaceDefinition" + } + }, + "required": [ + "name", + "interface" + ] + }, + "v1.InterfaceDefinition": { + "$anchor": "v1.InterfaceDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "types": { + "description": "Types used by the interface's operations", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TypeDefinition" + } + }, + "operations": { + "description": "A list of operations defined by this interface.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationDefinition" + } + } + }, + "required": [] + }, + "v1.License": { + "$anchor": "v1.License", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the license.", + "type": "string" + }, + "url": { + "description": "The URL to the license.", + "type": "string" + } + }, + "required": [ + "name" + ] + }, + "v1.LiquidJsonValue": { + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "object" + }, + { + "type": "array" + }, + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "v1.LiquidTemplate": { + "type": "string" + }, + "v1.List": { + "$anchor": "v1.List", + "additionalProperties": false, + "type": "object", + "properties": { + "type": { + "$ref": "#/$defs/v1.TypeSignature" + } + }, + "required": [ + "type" + ] + }, + "v1.LocationReference": { + "type": "string" + }, + "v1.LockdownConfiguration": { + "$anchor": "v1.LockdownConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/lockdown@v1" + ] + }, + "metadata": { + "description": "Associated metadata for this configuration.", + "$ref": "#/$defs/v1.Metadata" + }, + "resources": { + "description": "Restrictions to apply to resources before an application or component can be run.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.ResourceRestriction" + } + } + }, + "required": [] + }, + "v1.ManifestComponent": { + "$anchor": "v1.ManifestComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/component/manifest@v1" + ] + }, + "ref": { + "description": "The URL (and optional tag) or local file path to find the manifest.", + "type": "string" + }, + "with": { + "description": "Any configuration necessary for the component.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" + } + } + }, + "provide": { + "description": "External components to provide to the referenced component.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { "type": "string" } - }, - "icon": { - "description": "An icon to associate with the artifact.", - "required": false, - "type": "string" } }, - "required": [] - }, - "PackageDefinition": { - "$anchor": "#v1/PackageDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "files": { - "description": "The list of files and folders to be included with the package.", - "type": "array", - "items": { + "max_packet_size": { + "description": "If applicable, the default size to allocate to the component's send/receive buffer.", + "oneOf": [ + { + "type": "number" + }, + { "type": "string" } - }, - "registry": { - "description": "Configuration for publishing the package to a registry.", - "required": false, - "$ref": "#/$defs/v1/RegistryDefinition" - } - }, - "required": [] - }, - "RegistryDefinition": { - "$anchor": "#v1/RegistryDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "host": { - "description": "The registry to publish to, e.g. registry.candle.dev", - "type": "string" - }, - "namespace": { - "description": "The namespace on the registry. e.g.: [*your username*]", + ] + } + }, + "required": [ + "ref" + ] + }, + "v1.Map": { + "$anchor": "v1.Map", + "additionalProperties": false, + "type": "object", + "properties": { + "key": { + "$ref": "#/$defs/v1.TypeSignature" + }, + "value": { + "$ref": "#/$defs/v1.TypeSignature" + } + }, + "required": [ + "key", + "value" + ] + }, + "v1.Metadata": { + "$anchor": "v1.Metadata", + "additionalProperties": false, + "type": "object", + "properties": { + "version": { + "description": "The version of the artifact.", + "type": "string" + }, + "authors": { + "description": "A list of the authors.", + "type": "array", + "items": { "type": "string" } }, - "required": [] - }, - "ResourceBinding": { - "$anchor": "#v1/ResourceBinding", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the binding.", - "type": "string" - }, - "resource": { - "description": "The resource to bind to.", - "$ref": "#/$defs/v1/ResourceDefinition" - } - }, - "required": [ - "name", - "resource" - ] - }, - "ImportBinding": { - "$anchor": "#v1/ImportBinding", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the binding.", + "vendors": { + "description": "A list of any vendors associated with the artifact.", + "type": "array", + "items": { "type": "string" - }, - "component": { - "description": "The import to bind to.", - "$ref": "#/$defs/v1/ImportDefinition" - } - }, - "required": [ - "name", - "component" - ] - }, - "ResourceDefinition": { - "oneOf": [ - { - "$ref": "#/$defs/v1/TcpPort" - }, - { - "$ref": "#/$defs/v1/UdpPort" - }, - { - "$ref": "#/$defs/v1/Url" - }, - { - "$ref": "#/$defs/v1/Volume" - } - ] - }, - "TcpPort": { - "$anchor": "#v1/TcpPort", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/resource/tcpport@v1" - ] - }, - "port": { - "description": "The port to bind to.", - "$ref": "#/$defs/v1/LiquidTemplate" - }, - "address": { - "description": "The address to bind to.", - "$ref": "#/$defs/v1/LiquidTemplate" - } - }, - "required": [] - }, - "UdpPort": { - "$anchor": "#v1/UdpPort", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/resource/udpport@v1" - ] - }, - "port": { - "description": "The port to bind to.", - "$ref": "#/$defs/v1/LiquidTemplate" - }, - "address": { - "description": "The address to bind to.", - "$ref": "#/$defs/v1/LiquidTemplate" - } - }, - "required": [] - }, - "Volume": { - "$anchor": "#v1/Volume", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/resource/volume@v1" - ] - }, - "path": { - "description": "The path.", - "$ref": "#/$defs/v1/LiquidTemplate" - } - }, - "required": [ - "path" - ] - }, - "Url": { - "$anchor": "#v1/Url", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/resource/url@v1" - ] - }, - "url": { - "description": "The url string.", - "$ref": "#/$defs/v1/LiquidTemplate" - } - }, - "required": [ - "url" - ] - }, - "TriggerDefinition": { - "oneOf": [ - { - "$ref": "#/$defs/v1/CliTrigger" - }, - { - "$ref": "#/$defs/v1/HttpTrigger" - }, - { - "$ref": "#/$defs/v1/TimeTrigger" - } - ] - }, - "CliTrigger": { - "$anchor": "#v1/CliTrigger", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/trigger/cli@v1" - ] - }, - "operation": { - "description": "The operation that will act as the main entrypoint for this trigger.", - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] } }, - "required": [ - "operation" - ] - }, - "TimeTrigger": { - "$anchor": "#v1/TimeTrigger", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/trigger/time@v1" - ] - }, - "schedule": { - "description": "The schedule to run the trigger with.", - "$ref": "#/$defs/v1/Schedule" - }, - "operation": { - "description": "The operation to execute on the schedule.", - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - }, - "payload": { - "description": "Values passed to the operation as inputs", - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationInput" - } - } + "description": { + "description": "A short description.", + "type": "string" }, - "required": [ - "schedule", - "operation", - "payload" - ] - }, - "OperationInput": { - "$anchor": "#v1/OperationInput", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the input.", - "type": "string" - }, - "value": { - "description": "The value to pass." - } - }, - "required": [ - "name", - "value" - ] - }, - "Schedule": { - "$anchor": "#v1/Schedule", - "additionalProperties": false, - "type": "object", - "properties": { - "cron": { - "description": "Schedule in cron format with second precision. See [cron.help](https://cron.help) for more information.", + "documentation": { + "description": "Where to find documentation.", + "type": "string" + }, + "licenses": { + "description": "The license(s) for the artifact.", + "type": "array", + "items": { "type": "string" - }, - "repeat": { - "description": "repeat `n` times. Use `0` to repeat indefinitely", - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] } }, - "required": [ - "cron" - ] + "icon": { + "description": "An icon to associate with the artifact.", + "type": "string" + } }, - "ComponentOperationExpression": { - "$anchor": "#v1/ComponentOperationExpression", - "additionalProperties": false, - "type": "object", - "properties": { - "component": { - "description": "The component that exports the operation.", + "required": [] + }, + "v1.Middleware": { + "$anchor": "v1.Middleware", + "additionalProperties": false, + "type": "object", + "properties": { + "request": { + "description": "The middleware to apply to requests.", + "type": "array", + "items": { "oneOf": [ { "type": "string" }, { - "$ref": "#/$defs/v1/ComponentDefinition" - } - ] - }, - "name": { - "description": "The operation name.", - "type": "string" - }, - "with": { - "description": "Configuration to pass to this operation on invocation.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - }, - "timeout": { - "description": "Timeout (in milliseconds) to wait for the operation to complete. Use 0 to wait indefinitely.", - "required": false, - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" + "$ref": "#/$defs/v1.ComponentOperationExpression" } ] } }, - "required": [ - "component", - "name" - ] - }, - "HttpTrigger": { - "$anchor": "#v1/HttpTrigger", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/trigger/http@v1" - ] - }, - "resource": { - "description": "The TcpPort resource to listen on for connections.", - "type": "string" - }, - "routers": { - "description": "The router to handle incoming requests", - "type": "array", - "items": { - "$ref": "#/$defs/v1/HttpRouter" - } - } - }, - "required": [ - "resource" - ] - }, - "HttpRouter": { - "oneOf": [ - { - "$ref": "#/$defs/v1/RawRouter" - }, - { - "$ref": "#/$defs/v1/RestRouter" - }, - { - "$ref": "#/$defs/v1/StaticRouter" - }, - { - "$ref": "#/$defs/v1/ProxyRouter" - } - ] - }, - "ProxyRouter": { - "$anchor": "#v1/ProxyRouter", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/router/proxy@v1" - ] - }, - "path": { - "description": "The path that this router will trigger for.", - "type": "string" - }, - "middleware": { - "description": "Middleware operations for this router.", - "required": false, - "$ref": "#/$defs/v1/Middleware" - }, - "url": { - "description": "The URL resource to proxy to.", - "type": "string" - }, - "strip_path": { - "description": "Whether or not to strip the router's path from the proxied request.", - "type": "boolean" - } - }, - "required": [ - "path", - "url" - ] - }, - "RestRouter": { - "$anchor": "#v1/RestRouter", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/router/rest@v1" - ] - }, - "path": { - "description": "The path that this router will trigger for.", - "type": "string" - }, - "tools": { - "description": "Additional tools and services to enable.", - "required": false, - "$ref": "#/$defs/v1/Tools" - }, - "middleware": { - "description": "Middleware operations for this router.", - "required": false, - "$ref": "#/$defs/v1/Middleware" - }, - "routes": { - "description": "The routes to serve and operations that handle them.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Route" - } - }, - "info": { - "description": "Information about the router to use when generating documentation and other tools.", - "required": false, - "$ref": "#/$defs/v1/Info" - } - }, - "required": [ - "path" - ] - }, - "Route": { - "$anchor": "#v1/Route", - "additionalProperties": false, - "type": "object", - "properties": { - "sub_path": { - "description": "The path to serve this route from. See [URI documentation](/docs/configuration/uri) for more information on specifying query and path parameters.", - "type": "string" - }, - "operation": { - "description": "The operation that will act as the main entrypoint for this route.", + "response": { + "description": "The middleware to apply to responses.", + "type": "array", + "items": { "oneOf": [ { "type": "string" }, { - "$ref": "#/$defs/v1/ComponentOperationExpression" + "$ref": "#/$defs/v1.ComponentOperationExpression" } ] - }, - "methods": { - "description": "The HTTP methods to serve this route for.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/HttpMethod" + } + } + }, + "required": [] + }, + "v1.Object": { + "$anchor": "v1.Object", + "additionalProperties": false, + "type": "string", + "enum": [ + "object" + ] + }, + "v1.OperationDefinition": { + "$anchor": "v1.OperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", + "type": "string" + }, + "with": { + "description": "Any configuration required by the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "inputs": { + "description": "Types of the inputs to the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "outputs": { + "description": "Types of the outputs to the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + } + }, + "required": [] + }, + "v1.OperationInput": { + "$anchor": "v1.OperationInput", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the input.", + "type": "string" + }, + "value": { + "description": "The value to pass." + } + }, + "required": [ + "name", + "value" + ] + }, + "v1.OperationInstance": { + "$anchor": "v1.OperationInstance", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the binding.", + "type": "string" + }, + "operation": { + "description": "The operation to bind to.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" + } + ] + }, + "with": { + "description": "Data to associate with the reference, if any.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" } - }, - "id": { - "description": "The unique ID of the route, used for documentation and tooling.", - "required": false, - "type": "string" - }, - "description": { - "description": "A short description of the route.", - "required": false, - "type": "string" - }, - "summary": { - "description": "A longer description of the route.", - "required": false, - "type": "string" } }, - "required": [ - "sub_path", - "operation" - ] + "timeout": { + "description": "Timeout (in milliseconds) to wait for the operation to complete. Use 0 to wait indefinitely.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } }, - "Tools": { - "$anchor": "#v1/Tools", - "additionalProperties": false, - "type": "object", - "properties": { - "openapi": { - "description": "Set to true to generate an OpenAPI specification and serve it at *router_path*/openapi.json", - "type": "boolean" + "required": [ + "name", + "operation" + ] + }, + "v1.Optional": { + "$anchor": "v1.Optional", + "additionalProperties": false, + "type": "object", + "properties": { + "type": { + "$ref": "#/$defs/v1.TypeSignature" + } + }, + "required": [ + "type" + ] + }, + "v1.PackageDefinition": { + "$anchor": "v1.PackageDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "files": { + "description": "The list of files and folders to be included with the package.", + "type": "array", + "items": { + "type": "string" } }, - "required": [] + "registry": { + "description": "Configuration for publishing the package to a registry.", + "$ref": "#/$defs/v1.RegistryDefinition" + } }, - "Info": { - "$anchor": "#v1/Info", - "additionalProperties": false, - "type": "object", - "properties": { - "title": { - "description": "The title of the API.", - "required": false, - "type": "string" - }, - "description": { - "description": "A short description of the API.", - "required": false, - "type": "string" - }, - "tos": { - "description": "The terms of service for the API.", - "required": false, - "type": "string" - }, - "contact": { - "description": "The contact information for the API.", - "required": false, - "$ref": "#/$defs/v1/Contact" - }, - "license": { - "description": "The license information for the API.", - "required": false, - "$ref": "#/$defs/v1/License" - }, - "version": { - "description": "The version of the API.", - "type": "string" - }, - "documentation": { - "description": "The URL to the API's terms of service.", - "required": false, - "$ref": "#/$defs/v1/Documentation" - } - }, - "required": [] - }, - "Documentation": { - "$anchor": "#v1/Documentation", - "additionalProperties": false, - "type": "object", - "properties": { - "url": { - "description": "The URL to the API's documentation.", - "required": false, - "type": "string" - }, - "description": { - "description": "A short description of the documentation.", - "required": false, - "type": "string" - } - }, - "required": [] - }, - "License": { - "$anchor": "#v1/License", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the license.", - "type": "string" - }, - "url": { - "description": "The URL to the license.", - "required": false, - "type": "string" - } - }, - "required": [ - "name" - ] + "required": [] + }, + "v1.PacketAssertion": { + "$anchor": "v1.PacketAssertion", + "additionalProperties": false, + "type": "object", + "properties": { + "path": { + "description": "The optional path to a value in the packet to assert against.", + "type": "string" + }, + "operator": { + "description": "The operation to use when asserting against a packet.", + "$ref": "#/$defs/v1.AssertionOperator" + }, + "value": { + "description": "A value or object combine with the operator to assert against a packet value.", + "$ref": "#/$defs/v1.LiquidJsonValue" + } + }, + "required": [ + "operator", + "value" + ] + }, + "v1.PacketAssertionDef": { + "$anchor": "v1.PacketAssertionDef", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the input or output this packet is going to or coming from.", + "type": "string" + }, + "assertions": { + "description": "An assertion to test against the packet.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.PacketAssertion" + } + } + }, + "required": [ + "name" + ] + }, + "v1.PacketData": { + "oneOf": [ + { + "$ref": "#/$defs/v1.SuccessPacket" + }, + { + "$ref": "#/$defs/v1.ErrorPacket" + } + ] + }, + "v1.PacketFlag": { + "$anchor": "v1.PacketFlag", + "enum": [ + "Done", + "Open", + "Close" + ] + }, + "v1.PacketFlags": { + "$anchor": "v1.PacketFlags", + "additionalProperties": false, + "type": "object", + "properties": { + "done": { + "description": "Indicates the port should be considered closed.", + "type": "boolean" + }, + "open": { + "description": "Indicates the opening of a new substream context within the parent stream.", + "type": "boolean" + }, + "close": { + "description": "Indicates the closing of a substream context within the parent stream.", + "type": "boolean" + } + }, + "required": [] + }, + "v1.ProxyRouter": { + "$anchor": "v1.ProxyRouter", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/router/proxy@v1" + ] + }, + "path": { + "description": "The path that this router will trigger for.", + "type": "string" + }, + "middleware": { + "description": "Middleware operations for this router.", + "$ref": "#/$defs/v1.Middleware" + }, + "url": { + "description": "The URL resource to proxy to.", + "type": "string" + }, + "strip_path": { + "description": "Whether or not to strip the router's path from the proxied request.", + "type": "boolean" + } + }, + "required": [ + "path", + "url" + ] + }, + "v1.RawRouter": { + "$anchor": "v1.RawRouter", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/router/raw@v1" + ] + }, + "path": { + "description": "The path that this router will trigger for.", + "type": "string" + }, + "middleware": { + "description": "Middleware operations for this router.", + "$ref": "#/$defs/v1.Middleware" + }, + "codec": { + "description": "The codec to use when encoding/decoding data.", + "$ref": "#/$defs/v1.Codec" + }, + "operation": { + "description": "The operation that handles HTTP requests.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" + } + ] + } }, - "Contact": { - "$anchor": "#v1/Contact", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the contact.", - "required": false, - "type": "string" - }, - "url": { - "description": "The URL to the contact.", - "required": false, - "type": "string" - }, - "email": { - "description": "The email address of the contact.", - "required": false, - "type": "string" - } + "required": [ + "path", + "operation" + ] + }, + "v1.RegistryDefinition": { + "$anchor": "v1.RegistryDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "host": { + "description": "The registry to publish to, e.g. registry.candle.dev", + "type": "string" + }, + "namespace": { + "description": "The namespace on the registry. e.g.: [*your username*]", + "type": "string" + } + }, + "required": [] + }, + "v1.ResourceBinding": { + "$anchor": "v1.ResourceBinding", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the binding.", + "type": "string" + }, + "resource": { + "description": "The resource to bind to.", + "$ref": "#/$defs/v1.ResourceDefinition" + } + }, + "required": [ + "name", + "resource" + ] + }, + "v1.ResourceDefinition": { + "oneOf": [ + { + "$ref": "#/$defs/v1.TcpPort" }, - "required": [] - }, - "StaticRouter": { - "$anchor": "#v1/StaticRouter", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/router/static@v1" - ] - }, - "path": { - "description": "The path that this router will trigger for.", - "type": "string" - }, - "middleware": { - "description": "Middleware operations for this router.", - "required": false, - "$ref": "#/$defs/v1/Middleware" - }, - "volume": { - "description": "The volume to serve static files from.", - "type": "string" - }, - "fallback": { - "description": "Fallback path (relative to volume `resource`) for files to serve in case of a 404. Useful for SPA's. if volume resource is: /www and fallback: index.html, then a 404 will serve /www/index.html", - "required": false, - "type": "string" - } + { + "$ref": "#/$defs/v1.UdpPort" }, - "required": [ - "path", - "volume" - ] - }, - "RawRouter": { - "$anchor": "#v1/RawRouter", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/router/raw@v1" - ] - }, - "path": { - "description": "The path that this router will trigger for.", - "type": "string" - }, - "middleware": { - "description": "Middleware operations for this router.", - "required": false, - "$ref": "#/$defs/v1/Middleware" - }, - "codec": { - "description": "The codec to use when encoding/decoding data.", - "required": false, - "$ref": "#/$defs/v1/Codec" - }, - "operation": { - "description": "The operation that handles HTTP requests.", - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - } + { + "$ref": "#/$defs/v1.Url" }, - "required": [ - "path", - "operation" - ] - }, - "Middleware": { - "$anchor": "#v1/Middleware", - "additionalProperties": false, - "type": "object", - "properties": { - "request": { - "description": "The middleware to apply to requests.", - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - } - }, - "response": { - "description": "The middleware to apply to responses.", - "type": "array", - "items": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - } - } + { + "$ref": "#/$defs/v1.Volume" + } + ] + }, + "v1.ResourceRestriction": { + "oneOf": [ + { + "$ref": "#/$defs/v1.VolumeRestriction" }, - "required": [] - }, - "TypesConfiguration": { - "$anchor": "#v1/TypesConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/types@v1" - ] - }, - "name": { - "description": "The name of this type.", - "required": false, - "type": "string" - }, - "metadata": { - "description": "Associated metadata for this type.", - "required": false, - "$ref": "#/$defs/v1/Metadata" - }, - "types": { - "description": "Additional types to export and make available to the type.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TypeDefinition" - } - }, - "operations": { - "description": "A list of operation signatures.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationDefinition" - } - }, - "package": { - "description": "Details about the package for this types.", - "required": false, - "$ref": "#/$defs/v1/PackageDefinition" - } - }, - "required": [] - }, - "TestConfiguration": { - "$anchor": "#v1/TestConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/tests@v1" - ] - }, - "name": { - "description": "The name of this component.", - "required": false, - "type": "string" - }, - "with": { - "description": "Configuration used to instantiate this component.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - }, - "cases": { - "description": "Unit tests to run against components and operations.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TestDefinition" - } - } + { + "$ref": "#/$defs/v1.UrlRestriction" }, - "required": [] - }, - "LockdownConfiguration": { - "$anchor": "#v1/LockdownConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/lockdown@v1" - ] - }, - "metadata": { - "description": "Associated metadata for this configuration.", - "required": false, - "$ref": "#/$defs/v1/Metadata" - }, - "resources": { - "description": "Restrictions to apply to resources before an application or component can be run.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/ResourceRestriction" - } - } + { + "$ref": "#/$defs/v1.TcpPortRestriction" }, - "required": [] - }, - "ResourceRestriction": { - "oneOf": [ - { - "$ref": "#/$defs/v1/VolumeRestriction" - }, - { - "$ref": "#/$defs/v1/UrlRestriction" - }, - { - "$ref": "#/$defs/v1/TcpPortRestriction" - }, - { - "$ref": "#/$defs/v1/UdpPortRestriction" - } - ] - }, - "VolumeRestriction": { - "$anchor": "#v1/VolumeRestriction", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/resource/volume@v1" - ] - }, - "components": { - "description": "The components this restriction applies to", - "type": "array", - "items": { - "type": "string" - } - }, - "allow": { - "description": "The volumes to allow", - "$ref": "#/$defs/v1/LiquidTemplate" - } - }, - "required": [ - "allow" - ] - }, - "UrlRestriction": { - "$anchor": "#v1/UrlRestriction", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/resource/url@v1" - ] - }, - "components": { - "description": "The components this restriction applies to", - "type": "array", - "items": { - "type": "string" - } - }, - "allow": { - "description": "The URLs to allow", - "$ref": "#/$defs/v1/LiquidTemplate" - } - }, - "required": [ - "allow" - ] - }, - "TcpPortRestriction": { - "$anchor": "#v1/TcpPortRestriction", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/resource/tcpport@v1" - ] - }, - "components": { - "description": "The components this restriction applies to", - "type": "array", - "items": { - "type": "string" - } - }, - "address": { - "description": "The address to allow", - "$ref": "#/$defs/v1/LiquidTemplate" - }, - "port": { - "description": "The port to allow", - "$ref": "#/$defs/v1/LiquidTemplate" - } - }, - "required": [ - "address", - "port" - ] - }, - "UdpPortRestriction": { - "$anchor": "#v1/UdpPortRestriction", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/resource/udpport@v1" - ] - }, - "components": { - "description": "The components this restriction applies to", - "type": "array", - "items": { + { + "$ref": "#/$defs/v1.UdpPortRestriction" + } + ] + }, + "v1.RestRouter": { + "$anchor": "v1.RestRouter", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/router/rest@v1" + ] + }, + "path": { + "description": "The path that this router will trigger for.", + "type": "string" + }, + "tools": { + "description": "Additional tools and services to enable.", + "$ref": "#/$defs/v1.Tools" + }, + "middleware": { + "description": "Middleware operations for this router.", + "$ref": "#/$defs/v1.Middleware" + }, + "routes": { + "description": "The routes to serve and operations that handle them.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Route" + } + }, + "info": { + "description": "Information about the router to use when generating documentation and other tools.", + "$ref": "#/$defs/v1.Info" + } + }, + "required": [ + "path" + ] + }, + "v1.Route": { + "$anchor": "v1.Route", + "additionalProperties": false, + "type": "object", + "properties": { + "sub_path": { + "description": "The path to serve this route from. See [URI documentation](/docs/configuration/uri) for more information on specifying query and path parameters.", + "type": "string" + }, + "operation": { + "description": "The operation that will act as the main entrypoint for this route.", + "oneOf": [ + { "type": "string" + }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" } - }, - "address": { - "description": "The address to allow", - "$ref": "#/$defs/v1/LiquidTemplate" - }, - "port": { - "description": "The port to allow", - "$ref": "#/$defs/v1/LiquidTemplate" - } - }, - "required": [ - "address", - "port" - ] - }, - "ComponentConfiguration": { - "$anchor": "#v1/ComponentConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/component@v1" - ] - }, - "name": { - "description": "The name of the component.", - "required": false, - "type": "string" - }, - "metadata": { - "description": "Associated metadata for this component.", - "required": false, - "$ref": "#/$defs/v1/Metadata" - }, - "package": { - "description": "Details about the package for this component.", - "required": false, - "$ref": "#/$defs/v1/PackageDefinition" - }, - "host": { - "description": "Configuration for when wick hosts this component as a service.", - "required": false, - "$ref": "#/$defs/v1/HostConfig" - }, - "resources": { - "description": "Resources that the component can access.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/ResourceBinding" - } - }, - "import": { - "description": "Components or types to import into this component's scope.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/ImportBinding" - } - }, - "types": { - "description": "Additional types to export and make available to the component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TypeDefinition" - } - }, - "requires": { - "description": "Interfaces the component requires to operate.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/InterfaceBinding" - } - }, - "component": { - "description": "Configuration specific to different kinds of components.", - "$ref": "#/$defs/v1/ComponentKind" - }, - "tests": { - "description": "Assertions that can be run against the component to validate its behavior.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TestConfiguration" - } - } + ] }, - "required": [ - "component" - ] - }, - "InterfaceBinding": { - "$anchor": "#v1/InterfaceBinding", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the interface.", - "type": "string" - }, - "interface": { - "description": "The interface to bind to.", - "$ref": "#/$defs/v1/InterfaceDefinition" - } - }, - "required": [ - "name", - "interface" - ] - }, - "InterfaceDefinition": { - "$anchor": "#v1/InterfaceDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "types": { - "description": "Types used by the interface's operations", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TypeDefinition" - } - }, - "operations": { - "description": "A list of operations defined by this interface.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationDefinition" - } + "methods": { + "description": "The HTTP methods to serve this route for.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.HttpMethod" } }, - "required": [] - }, - "CompositeComponentConfiguration": { - "$anchor": "#v1/CompositeComponentConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/component/composite@v1" - ] - }, - "operations": { - "description": "A list of operations exposed by the Composite component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/CompositeOperationDefinition" - } - }, - "with": { - "description": "Configuration necessary to provide when instantiating the component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "extends": { - "description": "A component or components whose operations you want to inherit from.", - "type": "array", - "items": { - "type": "string" - } - } + "id": { + "description": "The unique ID of the route, used for documentation and tooling.", + "type": "string" }, - "required": [] - }, - "WasmComponentConfiguration": { - "$anchor": "#v1/WasmComponentConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/component/wasmrs@v1" - ] - }, - "ref": { - "description": "The path or OCI reference to the WebAssembly module", - "type": "string" - }, - "volumes": { - "description": "Volumes to expose to the component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/ExposedVolume" - } - }, - "max_packet_size": { - "description": "The default size to allocate to the component's send/receive buffer.", - "required": false, - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "with": { - "description": "Configuration necessary to provide when instantiating the component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "operations": { - "description": "A list of operations implemented by the WebAssembly module.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationDefinition" - } - } + "description": { + "description": "A short description of the route.", + "type": "string" }, - "required": [ - "ref" - ] + "summary": { + "description": "A longer description of the route.", + "type": "string" + } }, - "ExposedVolume": { - "$anchor": "#v1/ExposedVolume", - "additionalProperties": false, - "type": "object", - "properties": { - "resource": { - "description": "The resource ID of the volume.", - "type": "string" - }, - "path": { - "description": "The path to map it to in the component.", - "type": "string" - } - }, - "required": [ - "resource", - "path" - ] - }, - "ComponentKind": { - "oneOf": [ - { - "$ref": "#/$defs/v1/WasmComponentConfiguration" - }, - { - "$ref": "#/$defs/v1/CompositeComponentConfiguration" - }, - { - "$ref": "#/$defs/v1/SqlComponent" - }, - { - "$ref": "#/$defs/v1/HttpClientComponent" - } - ] - }, - "ImportDefinition": { - "oneOf": [ - { - "$ref": "#/$defs/v1/TypesComponent" - }, - { - "$ref": "#/$defs/v1/ManifestComponent" - }, - { - "$ref": "#/$defs/v1/SqlComponent" - }, - { - "$ref": "#/$defs/v1/HttpClientComponent" - } - ] - }, - "ComponentDefinition": { - "oneOf": [ - { - "$ref": "#/$defs/v1/GrpcUrlComponent" - }, - { - "$ref": "#/$defs/v1/ManifestComponent" - }, - { - "$ref": "#/$defs/v1/ComponentReference" - }, - { - "$ref": "#/$defs/v1/SqlComponent" - }, - { - "$ref": "#/$defs/v1/HttpClientComponent" - } - ] - }, - "TypesComponent": { - "$anchor": "#v1/TypesComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/component/types@v1" - ] - }, - "ref": { - "description": "The URL (and optional tag) or local file path to find the types manifest.", - "type": "string" - }, - "types": { - "description": "The types to import from the manifest.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "ref" - ] - }, - "ComponentReference": { - "$anchor": "#v1/ComponentReference", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/component/reference@v1" - ] - }, - "id": { - "description": "The id of the referenced component.", - "type": "string" - } - }, - "required": [ - "id" - ] - }, - "HostConfig": { - "$anchor": "#v1/HostConfig", - "additionalProperties": false, - "type": "object", - "properties": { - "allow_latest": { - "description": "Whether or not to allow the `:latest` tag on remote artifacts.", - "type": "boolean" - }, - "insecure_registries": { - "description": "A list of registries to connect to insecurely (over HTTP vs HTTPS).", - "type": "array", - "items": { + "required": [ + "sub_path", + "operation" + ] + }, + "v1.Schedule": { + "$anchor": "v1.Schedule", + "additionalProperties": false, + "type": "object", + "properties": { + "cron": { + "description": "Schedule in cron format with second precision. See [cron.help](https://cron.help) for more information.", + "type": "string" + }, + "repeat": { + "description": "repeat `n` times. Use `0` to repeat indefinitely", + "oneOf": [ + { + "type": "number" + }, + { "type": "string" } - }, - "rpc": { - "description": "Configuration for the GRPC server.", - "required": false, - "$ref": "#/$defs/v1/HttpConfig" - } - }, - "required": [] - }, - "HttpConfig": { - "$anchor": "#v1/HttpConfig", - "additionalProperties": false, - "type": "object", - "properties": { - "enabled": { - "description": "Enable/disable the server.", - "type": "boolean" - }, - "port": { - "description": "The port to bind to.", - "required": false, - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "address": { - "description": "The address to bind to.", - "required": false, - "type": "string" - }, - "pem": { - "description": "Path to pem file for TLS.", - "required": false, - "type": "string" - }, - "key": { - "description": "Path to key file for TLS.", - "required": false, - "type": "string" - }, - "ca": { - "description": "Path to CA file.", - "required": false, - "type": "string" - } - }, - "required": [] + ] + } }, - "GrpcUrlComponent": { - "$anchor": "#v1/GrpcUrlComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/component/grpc@v1" - ] - }, - "url": { - "description": "The GRPC URL to connect to.", - "type": "string" - }, - "with": { - "description": "Any configuration necessary for the component.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - } + "required": [ + "cron" + ] + }, + "v1.SqlComponent": { + "$anchor": "v1.SqlComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/component/sql@v1" + ] + }, + "resource": { + "description": "The connect string URL resource for the database.", + "type": "string" + }, + "tls": { + "description": "Whether or not to use TLS.", + "type": "boolean" + }, + "with": { + "description": "Configuration necessary to provide when instantiating the component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "operations": { + "description": "A list of operations to expose on this component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.SqlQueryKind" + } + } + }, + "required": [] + }, + "v1.SqlExecOperationDefinition": { + "$anchor": "v1.SqlExecOperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", + "type": "string" }, - "required": [ - "url" - ] - }, - "ManifestComponent": { - "$anchor": "#v1/ManifestComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/component/manifest@v1" - ] - }, - "ref": { - "description": "The URL (and optional tag) or local file path to find the manifest.", - "type": "string" - }, - "with": { - "description": "Any configuration necessary for the component.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - }, - "provide": { - "description": "External components to provide to the referenced component.", - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "type": "string" - } - } - }, - "max_packet_size": { - "description": "If applicable, the default size to allocate to the component's send/receive buffer.", - "required": false, - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "with": { + "description": "Any configuration required by the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [ - "ref" - ] - }, - "CompositeOperationDefinition": { - "$anchor": "#v1/CompositeOperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", - "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "outputs": { - "description": "Types of the outputs to the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "uses": { - "description": "A map of IDs to specific operations.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationInstance" - } - }, - "flow": { - "description": "A list of connections from operation to operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/FlowExpression" - } - }, - "operations": { - "description": "Additional `CompositeOperationDefinition`s to define as children.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/CompositeOperationDefinition" - } + "inputs": { + "description": "Types of the inputs to the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] - }, - "FlowExpression": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/$defs/v1/ConnectionDefinition" - }, - { - "$ref": "#/$defs/v1/BlockExpression" - } - ] - }, - "BlockExpression": { - "$anchor": "#v1/BlockExpression", - "additionalProperties": false, - "type": "object", - "properties": { - "expressions": { - "type": "array", - "items": { - "$ref": "#/$defs/v1/FlowExpression" - } + "outputs": { + "description": "Types of the outputs to the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [ - "expressions" - ] - }, - "ConnectionDefinition": { - "$anchor": "#v1/ConnectionDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "from": { - "description": "An upstream operation's output.", - "$ref": "#/$defs/v1/ConnectionTargetDefinition" - }, - "to": { - "description": "A downstream operation's input.", - "$ref": "#/$defs/v1/ConnectionTargetDefinition" - } - }, - "required": [ - "from", - "to" - ] - }, - "ConnectionTargetDefinition": { - "$anchor": "#v1/ConnectionTargetDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "instance": { - "description": "The instance ID of the component operation.", - "type": "string" - }, - "port": { - "description": "The operation's input or output (depending on to/from).", - "required": false, - "type": "string" - }, - "data": { - "description": "The default value to provide on this connection in the event of an error.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - } + "exec": { + "description": "The query to execute.", + "type": "string" }, - "required": [ - "instance" - ] - }, - "OperationDefinition": { - "$anchor": "#v1/OperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", + "arguments": { + "description": "The positional arguments to the query, defined as a list of input names.", + "type": "array", + "items": { "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "outputs": { - "description": "Types of the outputs to the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } } }, - "required": [] + "on_error": { + "description": "What to do when an error occurs.", + "$ref": "#/$defs/v1.ErrorBehavior" + } }, - "Field": { - "$anchor": "#v1/Field", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the field.", - "type": "string" - }, - "type": { - "description": "The type signature of the field.", - "$ref": "#/$defs/v1/TypeSignature" - }, - "description": { - "description": "The description of the field.", - "required": false, - "type": "string" - } + "required": [ + "exec" + ] + }, + "v1.SqlQueryKind": { + "oneOf": [ + { + "$ref": "#/$defs/v1.SqlQueryOperationDefinition" + }, + { + "$ref": "#/$defs/v1.SqlExecOperationDefinition" + } + ] + }, + "v1.SqlQueryOperationDefinition": { + "$anchor": "v1.SqlQueryOperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", + "type": "string" }, - "required": [ - "name", - "type" - ] - }, - "TypeSignature": { - "oneOf": [ - { - "type": "string" - } - ] - }, - "I8": { - "$anchor": "#v1/I8", - "additionalProperties": false, - "type": "string", - "enum": [ - "i8" - ] - }, - "I16": { - "$anchor": "#v1/I16", - "additionalProperties": false, - "type": "string", - "enum": [ - "i16" - ] - }, - "I32": { - "$anchor": "#v1/I32", - "additionalProperties": false, - "type": "string", - "enum": [ - "i32" - ] - }, - "I64": { - "$anchor": "#v1/I64", - "additionalProperties": false, - "type": "string", - "enum": [ - "i64" - ] - }, - "U8": { - "$anchor": "#v1/U8", - "additionalProperties": false, - "type": "string", - "enum": [ - "u8" - ] - }, - "U16": { - "$anchor": "#v1/U16", - "additionalProperties": false, - "type": "string", - "enum": [ - "u16" - ] - }, - "U32": { - "$anchor": "#v1/U32", - "additionalProperties": false, - "type": "string", - "enum": [ - "u32" - ] - }, - "U64": { - "$anchor": "#v1/U64", - "additionalProperties": false, - "type": "string", - "enum": [ - "u64" - ] - }, - "F32": { - "$anchor": "#v1/F32", - "additionalProperties": false, - "type": "string", - "enum": [ - "f32" - ] - }, - "F64": { - "$anchor": "#v1/F64", - "additionalProperties": false, - "type": "string", - "enum": [ - "f64" - ] - }, - "Bool": { - "$anchor": "#v1/Bool", - "additionalProperties": false, - "type": "string", - "enum": [ - "i8" - ] - }, - "StringType": { - "$anchor": "#v1/StringType", - "additionalProperties": false, - "type": "string", - "enum": [ - "string" - ] - }, - "Datetime": { - "$anchor": "#v1/Datetime", - "additionalProperties": false, - "type": "string", - "enum": [ - "datetime" - ] - }, - "Bytes": { - "$anchor": "#v1/Bytes", - "additionalProperties": false, - "type": "string", - "enum": [ - "bytes" - ] - }, - "Custom": { - "$anchor": "#v1/Custom", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the custom type.", - "type": "string" + "with": { + "description": "Any configuration required by the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] - }, - "Optional": { - "$anchor": "#v1/Optional", - "additionalProperties": false, - "type": "object", - "properties": { - "type": { - "$ref": "#/$defs/v1/TypeSignature" - } - }, - "required": [ - "type" - ] - }, - "List": { - "$anchor": "#v1/List", - "additionalProperties": false, - "type": "object", - "properties": { - "type": { - "$ref": "#/$defs/v1/TypeSignature" - } - }, - "required": [ - "type" - ] - }, - "Map": { - "$anchor": "#v1/Map", - "additionalProperties": false, - "type": "object", - "properties": { - "key": { - "$ref": "#/$defs/v1/TypeSignature" - }, - "value": { - "$ref": "#/$defs/v1/TypeSignature" - } - }, - "required": [ - "key", - "value" - ] - }, - "Object": { - "$anchor": "#v1/Object", - "additionalProperties": false, - "type": "string", - "enum": [ - "object" - ] - }, - "TypeDefinition": { - "oneOf": [ - { - "$ref": "#/$defs/v1/StructSignature" - }, - { - "$ref": "#/$defs/v1/EnumSignature" - }, - { - "$ref": "#/$defs/v1/UnionSignature" - } - ] - }, - "StructSignature": { - "$anchor": "#v1/StructSignature", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/type/struct@v1" - ] - }, - "name": { - "description": "The name of the struct.", - "type": "string" - }, - "fields": { - "description": "The fields in this struct.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "description": { - "description": "The description of the struct.", - "required": false, - "type": "string" + "inputs": { + "description": "Types of the inputs to the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] - }, - "UnionSignature": { - "$anchor": "#v1/UnionSignature", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/type/union@v1" - ] - }, - "name": { - "description": "The name of the union.", - "type": "string" - }, - "types": { - "description": "The types in the union.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TypeSignature" - } - }, - "description": { - "description": "The description of the union.", - "required": false, - "type": "string" + "outputs": { + "description": "Types of the outputs to the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] - }, - "EnumSignature": { - "$anchor": "#v1/EnumSignature", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/type/enum@v1" - ] - }, - "name": { - "description": "The name of the enum.", - "type": "string" - }, - "variants": { - "description": "The variants in the enum.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/EnumVariant" - } - }, - "description": { - "description": "The description of the enum.", - "required": false, - "type": "string" - } + "query": { + "description": "The query to execute.", + "type": "string" }, - "required": [] - }, - "EnumVariant": { - "$anchor": "#v1/EnumVariant", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the variant.", - "type": "string" - }, - "index": { - "description": "The index of the variant.", - "required": false, - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "value": { - "description": "The optional value of the variant.", - "required": false, - "type": "string" - }, - "description": { - "description": "A description of the variant.", - "required": false, + "arguments": { + "description": "The positional arguments to the query, defined as a list of input names.", + "type": "array", + "items": { "type": "string" } }, - "required": [] + "on_error": { + "description": "What to do when an error occurs.", + "$ref": "#/$defs/v1.ErrorBehavior" + } }, - "OperationInstance": { - "$anchor": "#v1/OperationInstance", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the binding.", - "type": "string" - }, - "operation": { - "description": "The operation to bind to.", - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - }, - "with": { - "description": "Data to associate with the reference, if any.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } + "required": [ + "query" + ] + }, + "v1.StaticRouter": { + "$anchor": "v1.StaticRouter", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/router/static@v1" + ] + }, + "path": { + "description": "The path that this router will trigger for.", + "type": "string" + }, + "middleware": { + "description": "Middleware operations for this router.", + "$ref": "#/$defs/v1.Middleware" + }, + "volume": { + "description": "The volume to serve static files from.", + "type": "string" + }, + "fallback": { + "description": "Fallback path (relative to volume `resource`) for files to serve in case of a 404. Useful for SPA's. if volume resource is: /www and fallback: index.html, then a 404 will serve /www/index.html", + "type": "string" + } + }, + "required": [ + "path", + "volume" + ] + }, + "v1.StringType": { + "$anchor": "v1.StringType", + "additionalProperties": false, + "type": "string", + "enum": [ + "string" + ] + }, + "v1.StructSignature": { + "$anchor": "v1.StructSignature", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/type/struct@v1" + ] + }, + "name": { + "description": "The name of the struct.", + "type": "string" + }, + "fields": { + "description": "The fields in this struct.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "description": { + "description": "The description of the struct.", + "type": "string" + } + }, + "required": [] + }, + "v1.SuccessPacket": { + "$anchor": "v1.SuccessPacket", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the input or output this packet is going to or coming from.", + "type": "string" + }, + "flags": { + "description": "Any flags set on the packet. Deprecated, use 'flag:' instead", + "$ref": "#/$defs/v1.PacketFlags" + }, + "flag": { + "description": "The flag set on the packet.", + "$ref": "#/$defs/v1.PacketFlag" + }, + "value": { + "description": "The packet payload.", + "$ref": "#/$defs/v1.LiquidJsonValue" + } + }, + "required": [ + "name" + ] + }, + "v1.TcpPort": { + "$anchor": "v1.TcpPort", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/resource/tcpport@v1" + ] + }, + "port": { + "description": "The port to bind to.", + "$ref": "#/$defs/v1.LiquidTemplate" + }, + "address": { + "description": "The address to bind to.", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [] + }, + "v1.TcpPortRestriction": { + "$anchor": "v1.TcpPortRestriction", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/resource/tcpport@v1" + ] + }, + "components": { + "description": "The components this restriction applies to", + "type": "array", + "items": { + "type": "string" + } + }, + "address": { + "description": "The address to allow", + "$ref": "#/$defs/v1.LiquidTemplate" + }, + "port": { + "description": "The port to allow", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [ + "address", + "port" + ] + }, + "v1.TestConfiguration": { + "$anchor": "v1.TestConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/tests@v1" + ] + }, + "name": { + "description": "The name of this component.", + "type": "string" + }, + "with": { + "description": "Configuration used to instantiate this component.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" + } + } + }, + "cases": { + "description": "Unit tests to run against components and operations.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TestDefinition" + } + } + }, + "required": [] + }, + "v1.TestDefinition": { + "$anchor": "v1.TestDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the test.", + "type": "string" + }, + "operation": { + "description": "The operaton to test.", + "type": "string" + }, + "inherent": { + "description": "Inherent data to use for the test.", + "$ref": "#/$defs/v1.InherentData" + }, + "with": { + "description": "The configuration for the operation, if any.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" + } + } + }, + "inputs": { + "description": "The inputs to the test.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.PacketData" + } + }, + "outputs": { + "description": "The expected outputs of the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TestPacketData" + } + } + }, + "required": [ + "operation" + ] + }, + "v1.TestPacketData": { + "oneOf": [ + { + "$ref": "#/$defs/v1.SuccessPacket" + }, + { + "$ref": "#/$defs/v1.PacketAssertionDef" + }, + { + "$ref": "#/$defs/v1.ErrorPacket" + } + ] + }, + "v1.TimeTrigger": { + "$anchor": "v1.TimeTrigger", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/trigger/time@v1" + ] + }, + "schedule": { + "description": "The schedule to run the trigger with.", + "$ref": "#/$defs/v1.Schedule" + }, + "operation": { + "description": "The operation to execute on the schedule.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" } - }, - "timeout": { - "description": "Timeout (in milliseconds) to wait for the operation to complete. Use 0 to wait indefinitely.", - "required": false, - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } + ] }, - "required": [ - "name", - "operation" - ] - }, - "TestDefinition": { - "$anchor": "#v1/TestDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the test.", - "required": false, - "type": "string" - }, - "operation": { - "description": "The operaton to test.", - "type": "string" - }, - "inherent": { - "description": "Inherent data to use for the test.", - "required": false, - "$ref": "#/$defs/v1/InherentData" - }, - "with": { - "description": "The configuration for the operation, if any.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - }, - "inputs": { - "description": "The inputs to the test.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/PacketData" - } - }, - "outputs": { - "description": "The expected outputs of the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TestPacketData" - } + "payload": { + "description": "Values passed to the operation as inputs", + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationInput" } - }, - "required": [ - "operation" - ] + } }, - "InherentData": { - "$anchor": "#v1/InherentData", - "additionalProperties": false, - "type": "object", - "properties": { - "seed": { - "description": "A random seed, i.e. to initialize a random number generator.", - "required": false, - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - }, - "timestamp": { - "description": "A timestamp.", - "required": false, - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } - }, - "required": [] - }, - "PacketData": { - "oneOf": [ - { - "$ref": "#/$defs/v1/SuccessPacket" - }, - { - "$ref": "#/$defs/v1/ErrorPacket" - } - ] - }, - "TestPacketData": { - "oneOf": [ - { - "$ref": "#/$defs/v1/SuccessPacket" - }, - { - "$ref": "#/$defs/v1/PacketAssertionDef" - }, - { - "$ref": "#/$defs/v1/ErrorPacket" - } - ] - }, - "SuccessPacket": { - "$anchor": "#v1/SuccessPacket", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the input or output this packet is going to or coming from.", - "type": "string" - }, - "flags": { - "description": "Any flags set on the packet. Deprecated, use 'flag:' instead", - "required": false, - "$ref": "#/$defs/v1/PacketFlags" - }, - "flag": { - "description": "The flag set on the packet.", - "required": false, - "$ref": "#/$defs/v1/PacketFlag" - }, - "value": { - "description": "The packet payload.", - "required": false, - "$ref": "#/$defs/v1/LiquidJsonValue" - } - }, - "required": [ - "name" - ] - }, - "PacketAssertionDef": { - "$anchor": "#v1/PacketAssertionDef", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the input or output this packet is going to or coming from.", - "type": "string" - }, - "assertions": { - "description": "An assertion to test against the packet.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/PacketAssertion" + "required": [ + "schedule", + "operation", + "payload" + ] + }, + "v1.Tools": { + "$anchor": "v1.Tools", + "additionalProperties": false, + "type": "object", + "properties": { + "openapi": { + "description": "Set to true to generate an OpenAPI specification and serve it at *router_path*/openapi.json", + "type": "boolean" + } + }, + "required": [] + }, + "v1.TriggerDefinition": { + "oneOf": [ + { + "$ref": "#/$defs/v1.CliTrigger" + }, + { + "$ref": "#/$defs/v1.HttpTrigger" + }, + { + "$ref": "#/$defs/v1.TimeTrigger" + } + ] + }, + "v1.TypeDefinition": { + "oneOf": [ + { + "$ref": "#/$defs/v1.StructSignature" + }, + { + "$ref": "#/$defs/v1.EnumSignature" + }, + { + "$ref": "#/$defs/v1.UnionSignature" + } + ] + }, + "v1.TypesComponent": { + "$anchor": "v1.TypesComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/component/types@v1" + ] + }, + "ref": { + "description": "The URL (and optional tag) or local file path to find the types manifest.", + "type": "string" + }, + "types": { + "description": "The types to import from the manifest.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "ref" + ] + }, + "v1.TypesConfiguration": { + "$anchor": "v1.TypesConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/types@v1" + ] + }, + "name": { + "description": "The name of this type.", + "type": "string" + }, + "metadata": { + "description": "Associated metadata for this type.", + "$ref": "#/$defs/v1.Metadata" + }, + "types": { + "description": "Additional types to export and make available to the type.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TypeDefinition" + } + }, + "operations": { + "description": "A list of operation signatures.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationDefinition" + } + }, + "package": { + "description": "Details about the package for this types.", + "$ref": "#/$defs/v1.PackageDefinition" + } + }, + "required": [] + }, + "v1.TypeSignature": { + "oneOf": [ + { + "type": "string" + } + ] + }, + "v1.U16": { + "$anchor": "v1.U16", + "additionalProperties": false, + "type": "string", + "enum": [ + "u16" + ] + }, + "v1.U32": { + "$anchor": "v1.U32", + "additionalProperties": false, + "type": "string", + "enum": [ + "u32" + ] + }, + "v1.U64": { + "$anchor": "v1.U64", + "additionalProperties": false, + "type": "string", + "enum": [ + "u64" + ] + }, + "v1.U8": { + "$anchor": "v1.U8", + "additionalProperties": false, + "type": "string", + "enum": [ + "u8" + ] + }, + "v1.UdpPort": { + "$anchor": "v1.UdpPort", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/resource/udpport@v1" + ] + }, + "port": { + "description": "The port to bind to.", + "$ref": "#/$defs/v1.LiquidTemplate" + }, + "address": { + "description": "The address to bind to.", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [] + }, + "v1.UdpPortRestriction": { + "$anchor": "v1.UdpPortRestriction", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/resource/udpport@v1" + ] + }, + "components": { + "description": "The components this restriction applies to", + "type": "array", + "items": { + "type": "string" + } + }, + "address": { + "description": "The address to allow", + "$ref": "#/$defs/v1.LiquidTemplate" + }, + "port": { + "description": "The port to allow", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [ + "address", + "port" + ] + }, + "v1.UnionSignature": { + "$anchor": "v1.UnionSignature", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/type/union@v1" + ] + }, + "name": { + "description": "The name of the union.", + "type": "string" + }, + "types": { + "description": "The types in the union.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TypeSignature" + } + }, + "description": { + "description": "The description of the union.", + "type": "string" + } + }, + "required": [] + }, + "v1.Url": { + "$anchor": "v1.Url", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/resource/url@v1" + ] + }, + "url": { + "description": "The url string.", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [ + "url" + ] + }, + "v1.UrlRestriction": { + "$anchor": "v1.UrlRestriction", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/resource/url@v1" + ] + }, + "components": { + "description": "The components this restriction applies to", + "type": "array", + "items": { + "type": "string" + } + }, + "allow": { + "description": "The URLs to allow", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [ + "allow" + ] + }, + "v1.Volume": { + "$anchor": "v1.Volume", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/resource/volume@v1" + ] + }, + "path": { + "description": "The path.", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [ + "path" + ] + }, + "v1.VolumeRestriction": { + "$anchor": "v1.VolumeRestriction", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/resource/volume@v1" + ] + }, + "components": { + "description": "The components this restriction applies to", + "type": "array", + "items": { + "type": "string" + } + }, + "allow": { + "description": "The volumes to allow", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [ + "allow" + ] + }, + "v1.WasmComponentConfiguration": { + "$anchor": "v1.WasmComponentConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": [ + "wick/component/wasmrs@v1" + ] + }, + "ref": { + "description": "The path or OCI reference to the WebAssembly module", + "type": "string" + }, + "volumes": { + "description": "Volumes to expose to the component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.ExposedVolume" + } + }, + "max_packet_size": { + "description": "The default size to allocate to the component's send/receive buffer.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" } - } + ] }, - "required": [ - "name" - ] - }, - "PacketAssertion": { - "$anchor": "#v1/PacketAssertion", - "additionalProperties": false, - "type": "object", - "properties": { - "path": { - "description": "The optional path to a value in the packet to assert against.", - "required": false, - "type": "string" - }, - "operator": { - "description": "The operation to use when asserting against a packet.", - "$ref": "#/$defs/v1/AssertionOperator" - }, - "value": { - "description": "A value or object combine with the operator to assert against a packet value.", - "$ref": "#/$defs/v1/LiquidJsonValue" - } - }, - "required": [ - "operator", - "value" - ] - }, - "AssertionOperator": { - "$anchor": "#v1/AssertionOperator", - "enum": [ - "Equals", - "LessThan", - "GreaterThan", - "Regex", - "Contains" - ] - }, - "ErrorPacket": { - "$anchor": "#v1/ErrorPacket", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the input or output this packet is going to or coming from.", - "type": "string" - }, - "flags": { - "description": "Any flags set on the packet. Deprecated, use 'flag:' instead", - "required": false, - "$ref": "#/$defs/v1/PacketFlags" - }, - "flag": { - "description": "The flag set on the packet.", - "required": false, - "$ref": "#/$defs/v1/PacketFlag" - }, - "error": { - "description": "The error message.", - "$ref": "#/$defs/v1/LiquidTemplate" - } - }, - "required": [ - "name", - "error" - ] - }, - "PacketFlags": { - "$anchor": "#v1/PacketFlags", - "additionalProperties": false, - "type": "object", - "properties": { - "done": { - "description": "Indicates the port should be considered closed.", - "type": "boolean" - }, - "open": { - "description": "Indicates the opening of a new substream context within the parent stream.", - "type": "boolean" - }, - "close": { - "description": "Indicates the closing of a substream context within the parent stream.", - "type": "boolean" - } - }, - "required": [] - }, - "PacketFlag": { - "$anchor": "#v1/PacketFlag", - "enum": [ - "Done", - "Open", - "Close" - ] - }, - "SqlComponent": { - "$anchor": "#v1/SqlComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/component/sql@v1" - ] - }, - "resource": { - "description": "The connect string URL resource for the database.", - "type": "string" - }, - "tls": { - "description": "Whether or not to use TLS.", - "type": "boolean" - }, - "with": { - "description": "Configuration necessary to provide when instantiating the component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "operations": { - "description": "A list of operations to expose on this component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/SqlQueryKind" - } + "with": { + "description": "Configuration necessary to provide when instantiating the component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] - }, - "SqlQueryKind": { - "oneOf": [ - { - "$ref": "#/$defs/v1/SqlQueryOperationDefinition" - }, - { - "$ref": "#/$defs/v1/SqlExecOperationDefinition" + "operations": { + "description": "A list of operations implemented by the WebAssembly module.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationDefinition" } - ] + } }, - "SqlQueryOperationDefinition": { - "$anchor": "#v1/SqlQueryOperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", - "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "outputs": { - "description": "Types of the outputs to the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "query": { - "description": "The query to execute.", - "type": "string" - }, - "arguments": { - "description": "The positional arguments to the query, defined as a list of input names.", - "type": "array", - "items": { - "type": "string" - } - }, - "on_error": { - "description": "What to do when an error occurs.", - "required": false, - "$ref": "#/$defs/v1/ErrorBehavior" - } - }, - "required": [ - "query" - ] - }, - "SqlExecOperationDefinition": { - "$anchor": "#v1/SqlExecOperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", - "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "outputs": { - "description": "Types of the outputs to the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "exec": { - "description": "The query to execute.", - "type": "string" - }, - "arguments": { - "description": "The positional arguments to the query, defined as a list of input names.", - "type": "array", - "items": { - "type": "string" - } - }, - "on_error": { - "description": "What to do when an error occurs.", - "required": false, - "$ref": "#/$defs/v1/ErrorBehavior" - } - }, - "required": [ - "exec" - ] - }, - "ErrorBehavior": { - "$anchor": "#v1/ErrorBehavior", - "enum": [ - "Ignore", - "Commit", - "Rollback" - ] - }, - "HttpClientComponent": { - "$anchor": "#v1/HttpClientComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": [ - "wick/component/http@v1" - ] - }, - "resource": { - "description": "The URL base to use.", - "type": "string" - }, - "codec": { - "description": "The codec to use when encoding/decoding data. Can be overridden by individual operations.", - "required": false, - "$ref": "#/$defs/v1/Codec" - }, - "with": { - "description": "Configuration necessary to provide when instantiating the component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "operations": { - "description": "A list of operations to expose on this component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/HttpClientOperationDefinition" - } - } + "required": [ + "ref" + ] + }, + "v1.WickConfig": { + "oneOf": [ + { + "$ref": "#/$defs/v1.AppConfiguration" }, - "required": [] - }, - "HttpClientOperationDefinition": { - "$anchor": "#v1/HttpClientOperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", - "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "method": { - "description": "The HTTP method to use.", - "$ref": "#/$defs/v1/HttpMethod" - }, - "codec": { - "description": "The codec to use when encoding/decoding data.", - "required": false, - "$ref": "#/$defs/v1/Codec" - }, - "headers": { - "description": "Any headers to add to the request.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "body": { - "description": "The body to send, processed as a structured JSON liquid template.", - "required": false, - "$ref": "#/$defs/v1/LiquidJsonValue" - }, - "path": { - "description": "The path to append to our base URL, processed as a liquid template with each input as part of the template data.", - "type": "string" - } + { + "$ref": "#/$defs/v1.ComponentConfiguration" + }, + { + "$ref": "#/$defs/v1.TypesConfiguration" + }, + { + "$ref": "#/$defs/v1.TestConfiguration" }, - "required": [] - }, - "Codec": { - "$anchor": "#v1/Codec", - "enum": [ - "Json", - "Raw", - "FormData", - "Text" - ] - }, - "HttpMethod": { - "$anchor": "#v1/HttpMethod", - "enum": [ - "Get", - "Post", - "Put", - "Delete" - ] - } + { + "$ref": "#/$defs/v1.LockdownConfiguration" + } + ] } }, "oneOf": [ { - "$ref": "#/$defs/v1/AppConfiguration" + "$ref": "#/$defs/v1.AppConfiguration" }, { - "$ref": "#/$defs/v1/ComponentConfiguration" + "$ref": "#/$defs/v1.ComponentConfiguration" }, { - "$ref": "#/$defs/v1/TypesConfiguration" + "$ref": "#/$defs/v1.TypesConfiguration" }, { - "$ref": "#/$defs/v1/TestConfiguration" + "$ref": "#/$defs/v1.TestConfiguration" }, { - "$ref": "#/$defs/v1/LockdownConfiguration" + "$ref": "#/$defs/v1.LockdownConfiguration" }, { - "$ref": "#/$defs/v0/HostManifest" + "$ref": "#/$defs/v0.HostManifest" } ] } diff --git a/crates/wick/wick-config/json-schema/v0/manifest.json b/crates/wick/wick-config/json-schema/v0/manifest.json index 512ea9c40..9a9fde6aa 100644 --- a/crates/wick/wick-config/json-schema/v0/manifest.json +++ b/crates/wick/wick-config/json-schema/v0/manifest.json @@ -1,391 +1,318 @@ { - "v0": { - "HostManifest": { - "$anchor": "#v0/HostManifest", - "additionalProperties": false, - "properties": { - "format": { - "description": "The configuration manifest format.", - "enum": [0] - }, - "version": { - "description": "The version of the configuration.", + "v0.HostManifest": { + "$anchor": "v0.HostManifest", + "additionalProperties": false, + "type": "object", + "properties": { + "format": { + "description": "The configuration manifest format.", + "enum": [0] + }, + "version": { + "description": "The version of the configuration.", - "type": "string" - }, - "host": { - "description": "Additional host configuration.", - "required": false, - - "$ref": "#/$defs/v0/HostConfig" - }, - "network": { - "description": "The configuration for a Wick network.", - - "$ref": "#/$defs/v0/NetworkManifest" - }, - "default_schematic": { - "description": "The default schematic to execute if none is provided.", - "required": false, + "type": "string" + }, + "host": { + "description": "Additional host configuration.", - "type": "string" - } + "$ref": "#/$defs/v0.HostConfig" }, - "required": ["format"] - }, + "network": { + "description": "The configuration for a Wick network.", - "HostConfig": { - "$anchor": "#v0/HostConfig", - "additionalProperties": false, - "properties": { - "allow_latest": { - "description": "Whether or not to allow the :latest tag on remote artifacts.", - - "type": "boolean" - }, - "insecure_registries": { - "description": "A list of registries to connect to insecurely (over HTTP vs HTTPS).", - "type": "array", - "items": { - "type": "string" - } - }, - "id": { - "description": "The ID for this host, used to identify the host over the mesh.", - "required": false, + "$ref": "#/$defs/v0.NetworkManifest" + }, + "default_schematic": { + "description": "The default schematic to execute if none is provided.", + "type": "string" + } + }, + "required": ["format"] + }, + + "v0.HostConfig": { + "$anchor": "v0.HostConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "allow_latest": { + "description": "Whether or not to allow the :latest tag on remote artifacts.", + + "type": "boolean" + }, + "insecure_registries": { + "description": "A list of registries to connect to insecurely (over HTTP vs HTTPS).", + "type": "array", + "items": { "type": "string" - }, - "expose": { - "description": "The schematics to expose via RPC or the mesh, if any.", - "type": "array", - "items": { - "type": "string" - } - }, - "mesh": { - "description": "The mesh configuration.", - "required": false, - - "$ref": "#/$defs/v0/MeshConfig" - }, - "rpc": { - "description": "Configuration for the GRPC server.", - "required": false, - - "$ref": "#/$defs/v0/HttpConfig" - }, - "http": { - "description": "Configuration for the HTTP 1 server (development only).", - "required": false, - - "$ref": "#/$defs/v0/HttpConfig" } }, - "required": [] - }, - - "HttpConfig": { - "$anchor": "#v0/HttpConfig", - "additionalProperties": false, - "properties": { - "enabled": { - "description": "Enable/disable the server.", - - "type": "boolean" - }, - "port": { - "description": "The port to bind to.", - "required": false, - - "type": "number" - }, - "address": { - "description": "The address to bind to.", - "required": false, - - "type": "string" - }, - "pem": { - "description": "Path to pem file for TLS.", - "required": false, - - "type": "string" - }, - "key": { - "description": "Path to key file for TLS.", - "required": false, - - "type": "string" - }, - "ca": { - "description": "Path to CA file.", - "required": false, + "id": { + "description": "The ID for this host, used to identify the host over the mesh.", + "type": "string" + }, + "expose": { + "description": "The schematics to expose via RPC or the mesh, if any.", + "type": "array", + "items": { "type": "string" } }, - "required": [] - }, + "mesh": { + "description": "The mesh configuration.", - "MeshConfig": { - "$anchor": "#v0/MeshConfig", - "additionalProperties": false, - "properties": { - "enabled": { - "description": "Enable/disable the mesh connection.", + "$ref": "#/$defs/v0.MeshConfig" + }, + "rpc": { + "description": "Configuration for the GRPC server.", - "type": "boolean" - }, - "address": { - "description": "The address of the NATS server.", + "$ref": "#/$defs/v0.HttpConfig" + }, + "http": { + "description": "Configuration for the HTTP 1 server (development only).", - "type": "string" - }, - "creds_path": { - "description": "The path to the NATS credsfile.", - "required": false, + "$ref": "#/$defs/v0.HttpConfig" + } + }, + "required": [] + }, + + "v0.HttpConfig": { + "$anchor": "v0.HttpConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "enabled": { + "description": "Enable/disable the server.", + + "type": "boolean" + }, + "port": { + "description": "The port to bind to.", - "type": "string" - }, - "token": { - "description": "The NATS token.", - "required": false, + "oneOf": [{ "type": "number" }, { "type": "string" }] + }, + "address": { + "description": "The address to bind to.", - "type": "string" - } + "type": "string" }, - "required": [] - }, + "pem": { + "description": "Path to pem file for TLS.", - "NetworkManifest": { - "$anchor": "#v0/NetworkManifest", - "additionalProperties": false, - "properties": { - "name": { - "description": "The unique identifier for this Network.", - "required": false, + "type": "string" + }, + "key": { + "description": "Path to key file for TLS.", - "type": "string" - }, - "triggers": { - "description": "The collection to use as the entrypoint when running as a standalone process.", - "required": false, - - "$ref": "#/$defs/v0/EntrypointDefinition" - }, - "schematics": { - "description": "The links between capabilities and components.", - "type": "array", - "items": { - "$ref": "#/$defs/v0/SchematicManifest" - } - }, - "collections": { - "description": "A list of component collections.", - "type": "array", - "items": { - "$ref": "#/$defs/v0/CollectionDefinition" - } - } + "type": "string" }, - "required": [] + "ca": { + "description": "Path to CA file.", + + "type": "string" + } }, + "required": [] + }, + + "v0.MeshConfig": { + "$anchor": "v0.MeshConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "enabled": { + "description": "Enable/disable the mesh connection.", + + "type": "boolean" + }, + "address": { + "description": "The address of the NATS server.", - "EntrypointDefinition": { - "$anchor": "#v0/EntrypointDefinition", - "additionalProperties": false, - "properties": { - "reference": { - "description": "The reference/location of the collection.", + "type": "string" + }, + "creds_path": { + "description": "The path to the NATS credsfile.", - "type": "string" - }, - "component": { - "description": "The component to use as the entrypoint.", + "type": "string" + }, + "token": { + "description": "The NATS token.", - "type": "string" - }, - "data": { - "description": "Data or configuration used to initialize the collection.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "oneOf": [ - { "type": "boolean" }, - { "type": "object" }, - { "type": "array" }, - { "type": "string" }, - { "type": "number" } - ] - } - } + "type": "string" + } + }, + "required": [] + }, + + "v0.NetworkManifest": { + "$anchor": "v0.NetworkManifest", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The unique identifier for this Network.", + + "type": "string" + }, + "schematics": { + "description": "The links between capabilities and components.", + "type": "array", + "items": { + "$ref": "#/$defs/v0.SchematicManifest" } }, - "required": [] + "collections": { + "description": "A list of component collections.", + "type": "array", + "items": { + "$ref": "#/$defs/v0.CollectionDefinition" + } + } }, + "required": [] + }, + + "v0.CollectionDefinition": { + "$anchor": "v0.CollectionDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "namespace": { + "description": "The local namespace for the collection.", + + "type": "string" + }, + "kind": { + "description": "The kind/type of the collection.", - "CollectionDefinition": { - "$anchor": "#v0/CollectionDefinition", - "additionalProperties": false, - "properties": { - "namespace": { - "description": "The local namespace for the collection.", - - "type": "string" - }, - "kind": { - "description": "The kind/type of the collection.", - - "$ref": "#/$defs/v0/CollectionKind" - }, - "reference": { - "description": "The reference/location of the collection.", - - "type": "string" - }, - "data": { - "description": "Data or configuration used to initialize the collection.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "oneOf": [ - { "type": "boolean" }, - { "type": "object" }, - { "type": "array" }, - { "type": "string" }, - { "type": "number" } - ] - } - } - } + "$ref": "#/$defs/v0.CollectionKind" }, - "required": [] - }, + "reference": { + "description": "The reference/location of the collection.", - "CollectionKind": { - "$anchor": "#v0/CollectionKind", - "enum": ["Native", "GrpcUrl", "WaPC", "Network"] + "type": "string" + }, + "data": { + "description": "Data or configuration used to initialize the collection.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": {} + } + } }, - "SchematicManifest": { - "$anchor": "#v0/SchematicManifest", - "additionalProperties": false, - "properties": { - "name": { - "description": "Schematic name.", - - "type": "string" - }, - "instances": { - "description": "A map from component reference to its target.", - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v0/ComponentDefinition" - } - } - }, - "connections": { - "description": "A list of connections from component to component.", - "type": "array", - "items": { - "$ref": "#/$defs/v0/ConnectionDefinition" - } - }, - "constraints": { - "description": "A map of constraints and values that limit where this schematic can run.", - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "type": "string" - } + "required": [] + }, + + "v0.CollectionKind": { + "$anchor": "v0.CollectionKind", + "enum": ["Native", "GrpcUrl", "WaPc", "Network"] + }, + "v0.SchematicManifest": { + "$anchor": "v0.SchematicManifest", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "Schematic name.", + + "type": "string" + }, + "instances": { + "description": "A map from component reference to its target.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v0.ComponentDefinition" } } }, - "required": ["name"] - }, - - "ComponentDefinition": { - "$anchor": "#v0/ComponentDefinition", - "additionalProperties": false, - "properties": { - "id": { - "description": "The ID of the component (i.e. the alias, key, or namespace).", - - "type": "string" - }, - "data": { - "description": "Data to associate with the reference.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "oneOf": [ - { "type": "boolean" }, - { "type": "object" }, - { "type": "array" }, - { "type": "string" }, - { "type": "number" } - ] - } - } + "connections": { + "description": "A list of connections from component to component.", + "type": "array", + "items": { + "$ref": "#/$defs/v0.ConnectionDefinition" } }, - "required": ["id"] - }, - - "ConnectionDefinition": { - "$anchor": "#v0/ConnectionDefinition", - "additionalProperties": false, - "properties": { - "from": { - "description": "The originating component from upstream.", - - "$ref": "#/$defs/v0/ConnectionTargetDefinition" - }, - "to": { - "description": "The destination component (downstream).", - - "$ref": "#/$defs/v0/ConnectionTargetDefinition" + "constraints": { + "description": "A map of constraints and values that limit where this schematic can run.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "type": "string" + } } + } + }, + "required": ["name"] + }, + + "v0.ComponentDefinition": { + "$anchor": "v0.ComponentDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "id": { + "description": "The ID of the component (i.e. the alias, key, or namespace).", + + "type": "string" }, - "required": [] + "data": { + "description": "Data to associate with the reference.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": {} + } + } }, + "required": ["id"] + }, + + "v0.ConnectionDefinition": { + "$anchor": "v0.ConnectionDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "from": { + "description": "The originating component from upstream.", + + "$ref": "#/$defs/v0.ConnectionTargetDefinition" + }, + "to": { + "description": "The destination component (downstream).", - "ConnectionTargetDefinition": { - "$anchor": "#v0/ConnectionTargetDefinition", - "additionalProperties": false, - "properties": { - "instance": { - "description": "The instance name of the referenced component.", - - "type": "string" - }, - "port": { - "description": "The component's port.", + "$ref": "#/$defs/v0.ConnectionTargetDefinition" + } + }, + "required": [] + }, + + "v0.ConnectionTargetDefinition": { + "$anchor": "v0.ConnectionTargetDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "instance": { + "description": "The instance name of the referenced component.", + + "type": "string" + }, + "port": { + "description": "The component's port.", - "type": "string" - }, - "data": { - "description": "Data to associate with a connection.", - "required": false, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "oneOf": [ - { "type": "boolean" }, - { "type": "object" }, - { "type": "array" }, - { "type": "string" }, - { "type": "number" } - ] - } - } - } + "type": "string" }, - "required": ["instance", "port"] - } + "data": { + "description": "Data to associate with a connection.", + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": {} + } + } + }, + "required": ["instance", "port"] } } diff --git a/crates/wick/wick-config/json-schema/v1/manifest.json b/crates/wick/wick-config/json-schema/v1/manifest.json index 0f479cf78..8ee59db98 100644 --- a/crates/wick/wick-config/json-schema/v1/manifest.json +++ b/crates/wick/wick-config/json-schema/v1/manifest.json @@ -1,2624 +1,2543 @@ { - "v1": { - "WickConfig": { - "oneOf": [ - { "$ref": "#/$defs/v1/AppConfiguration" }, - { "$ref": "#/$defs/v1/ComponentConfiguration" }, - { "$ref": "#/$defs/v1/TypesConfiguration" }, - { "$ref": "#/$defs/v1/TestConfiguration" }, - { "$ref": "#/$defs/v1/LockdownConfiguration" } - ] - }, + "v1.WickConfig": { + "oneOf": [ + { "$ref": "#/$defs/v1.AppConfiguration" }, + { "$ref": "#/$defs/v1.ComponentConfiguration" }, + { "$ref": "#/$defs/v1.TypesConfiguration" }, + { "$ref": "#/$defs/v1.TestConfiguration" }, + { "$ref": "#/$defs/v1.LockdownConfiguration" } + ] + }, - "LocationReference": { - "type": "string" - }, + "v1.LocationReference": { + "type": "string" + }, - "LiquidJsonValue": { - "oneOf": [ - { "type": "boolean" }, - { "type": "object" }, - { "type": "array" }, - { "type": "string" }, - { "type": "number" } - ] - }, - - "LiquidTemplate": { - "type": "string" - }, + "v1.LiquidJsonValue": { + "oneOf": [ + { "type": "boolean" }, + { "type": "object" }, + { "type": "array" }, + { "type": "string" }, + { "type": "number" } + ] + }, - "Glob": { - "type": "string" - }, - - "AppConfiguration": { - "$anchor": "#v1/AppConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/app@v1"] - }, - "name": { - "description": "The application's name.", - - "type": "string" - }, - "metadata": { - "description": "Associated metadata for this application.", - "required": false, - - "$ref": "#/$defs/v1/Metadata" - }, - "package": { - "description": "Details about the package for this application.", - "required": false, - - "$ref": "#/$defs/v1/PackageDefinition" - }, - "resources": { - "description": "Resources and configuration that the application and its components can access.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/ResourceBinding" - } - }, - "import": { - "description": "Components that to import and make available to the application.", + "v1.LiquidTemplate": { + "type": "string" + }, - "type": "array", - "items": { - "$ref": "#/$defs/v1/ImportBinding" - } - }, - "triggers": { - "description": "Triggers to load and instantiate to drive the application's behavior.", + "v1.Glob": { + "type": "string" + }, - "type": "array", - "items": { - "$ref": "#/$defs/v1/TriggerDefinition" - } - } + "v1.AppConfiguration": { + "$anchor": "v1.AppConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/app@v1"] }, - "required": [] - }, - - "Metadata": { - "$anchor": "#v1/Metadata", - "additionalProperties": false, - "type": "object", - "properties": { - "version": { - "description": "The version of the artifact.", - - "type": "string" - }, - "authors": { - "description": "A list of the authors.", - - "type": "array", - "items": { - "type": "string" - } - }, - "vendors": { - "description": "A list of any vendors associated with the artifact.", - - "type": "array", - "items": { - "type": "string" - } - }, - "description": { - "description": "A short description.", - "required": false, + "name": { + "description": "The application's name.", - "type": "string" - }, - "documentation": { - "description": "Where to find documentation.", - "required": false, + "type": "string" + }, + "metadata": { + "description": "Associated metadata for this application.", - "type": "string" - }, - "licenses": { - "description": "The license(s) for the artifact.", + "$ref": "#/$defs/v1.Metadata" + }, + "package": { + "description": "Details about the package for this application.", - "type": "array", - "items": { - "type": "string" - } - }, - "icon": { - "description": "An icon to associate with the artifact.", - "required": false, + "$ref": "#/$defs/v1.PackageDefinition" + }, + "resources": { + "description": "Resources and configuration that the application and its components can access.", - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/v1.ResourceBinding" } }, - "required": [] - }, - - "PackageDefinition": { - "$anchor": "#v1/PackageDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "files": { - "description": "The list of files and folders to be included with the package.", - - "type": "array", - "items": { - "type": "string" - } - }, - "registry": { - "description": "Configuration for publishing the package to a registry.", - "required": false, + "import": { + "description": "Components that to import and make available to the application.", - "$ref": "#/$defs/v1/RegistryDefinition" + "type": "array", + "items": { + "$ref": "#/$defs/v1.ImportBinding" } }, - "required": [] + "triggers": { + "description": "Triggers to load and instantiate to drive the application's behavior.", + + "type": "array", + "items": { + "$ref": "#/$defs/v1.TriggerDefinition" + } + } }, + "required": [] + }, - "RegistryDefinition": { - "$anchor": "#v1/RegistryDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "host": { - "description": "The registry to publish to, e.g. registry.candle.dev", + "v1.Metadata": { + "$anchor": "v1.Metadata", + "additionalProperties": false, + "type": "object", + "properties": { + "version": { + "description": "The version of the artifact.", - "type": "string" - }, - "namespace": { - "description": "The namespace on the registry. e.g.: [*your username*]", + "type": "string" + }, + "authors": { + "description": "A list of the authors.", + "type": "array", + "items": { "type": "string" } }, - "required": [] - }, - - "ResourceBinding": { - "$anchor": "#v1/ResourceBinding", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the binding.", + "vendors": { + "description": "A list of any vendors associated with the artifact.", + "type": "array", + "items": { "type": "string" - }, - "resource": { - "description": "The resource to bind to.", - - "$ref": "#/$defs/v1/ResourceDefinition" } }, - "required": ["name", "resource"] - }, + "description": { + "description": "A short description.", + + "type": "string" + }, + "documentation": { + "description": "Where to find documentation.", - "ImportBinding": { - "$anchor": "#v1/ImportBinding", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the binding.", + "type": "string" + }, + "licenses": { + "description": "The license(s) for the artifact.", + "type": "array", + "items": { "type": "string" - }, - "component": { - "description": "The import to bind to.", - - "$ref": "#/$defs/v1/ImportDefinition" } }, - "required": ["name", "component"] - }, + "icon": { + "description": "An icon to associate with the artifact.", - "ResourceDefinition": { - "oneOf": [ - { "$ref": "#/$defs/v1/TcpPort" }, - { "$ref": "#/$defs/v1/UdpPort" }, - { "$ref": "#/$defs/v1/Url" }, - { "$ref": "#/$defs/v1/Volume" } - ] + "type": "string" + } }, + "required": [] + }, - "TcpPort": { - "$anchor": "#v1/TcpPort", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/resource/tcpport@v1"] - }, - "port": { - "description": "The port to bind to.", - - "$ref": "#/$defs/v1/LiquidTemplate" - }, - "address": { - "description": "The address to bind to.", + "v1.PackageDefinition": { + "$anchor": "v1.PackageDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "files": { + "description": "The list of files and folders to be included with the package.", - "$ref": "#/$defs/v1/LiquidTemplate" + "type": "array", + "items": { + "type": "string" } }, - "required": [] - }, + "registry": { + "description": "Configuration for publishing the package to a registry.", - "UdpPort": { - "$anchor": "#v1/UdpPort", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/resource/udpport@v1"] - }, - "port": { - "description": "The port to bind to.", + "$ref": "#/$defs/v1.RegistryDefinition" + } + }, + "required": [] + }, - "$ref": "#/$defs/v1/LiquidTemplate" - }, - "address": { - "description": "The address to bind to.", + "v1.RegistryDefinition": { + "$anchor": "v1.RegistryDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "host": { + "description": "The registry to publish to, e.g. registry.candle.dev", - "$ref": "#/$defs/v1/LiquidTemplate" - } + "type": "string" }, - "required": [] + "namespace": { + "description": "The namespace on the registry. e.g.: [*your username*]", + + "type": "string" + } }, + "required": [] + }, - "Volume": { - "$anchor": "#v1/Volume", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/resource/volume@v1"] - }, - "path": { - "description": "The path.", + "v1.ResourceBinding": { + "$anchor": "v1.ResourceBinding", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the binding.", - "$ref": "#/$defs/v1/LiquidTemplate" - } + "type": "string" }, - "required": ["path"] + "resource": { + "description": "The resource to bind to.", + + "$ref": "#/$defs/v1.ResourceDefinition" + } }, + "required": ["name", "resource"] + }, - "Url": { - "$anchor": "#v1/Url", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/resource/url@v1"] - }, - "url": { - "description": "The url string.", + "v1.ImportBinding": { + "$anchor": "v1.ImportBinding", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the binding.", - "$ref": "#/$defs/v1/LiquidTemplate" - } + "type": "string" }, - "required": ["url"] - }, + "component": { + "description": "The import to bind to.", - "TriggerDefinition": { - "oneOf": [ - { "$ref": "#/$defs/v1/CliTrigger" }, - { "$ref": "#/$defs/v1/HttpTrigger" }, - { "$ref": "#/$defs/v1/TimeTrigger" } - ] - }, - - "CliTrigger": { - "$anchor": "#v1/CliTrigger", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/trigger/cli@v1"] - }, - "operation": { - "description": "The operation that will act as the main entrypoint for this trigger.", - "oneOf": [ - { "type": "string" }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - } - }, - "required": ["operation"] + "$ref": "#/$defs/v1.ImportDefinition" + } }, + "required": ["name", "component"] + }, - "TimeTrigger": { - "$anchor": "#v1/TimeTrigger", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/trigger/time@v1"] - }, - "schedule": { - "description": "The schedule to run the trigger with.", + "v1.ResourceDefinition": { + "oneOf": [ + { "$ref": "#/$defs/v1.TcpPort" }, + { "$ref": "#/$defs/v1.UdpPort" }, + { "$ref": "#/$defs/v1.Url" }, + { "$ref": "#/$defs/v1.Volume" } + ] + }, - "$ref": "#/$defs/v1/Schedule" - }, - "operation": { - "description": "The operation to execute on the schedule.", - "oneOf": [ - { "type": "string" }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - }, - "payload": { - "description": "Values passed to the operation as inputs", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationInput" + "v1.TcpPort": { + "$anchor": "v1.TcpPort", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/resource/tcpport@v1"] + }, + "port": { + "description": "The port to bind to.", + + "$ref": "#/$defs/v1.LiquidTemplate" + }, + "address": { + "description": "The address to bind to.", + + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [] + }, + + "v1.UdpPort": { + "$anchor": "v1.UdpPort", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/resource/udpport@v1"] + }, + "port": { + "description": "The port to bind to.", + + "$ref": "#/$defs/v1.LiquidTemplate" + }, + "address": { + "description": "The address to bind to.", + + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": [] + }, + + "v1.Volume": { + "$anchor": "v1.Volume", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/resource/volume@v1"] + }, + "path": { + "description": "The path.", + + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": ["path"] + }, + + "v1.Url": { + "$anchor": "v1.Url", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/resource/url@v1"] + }, + "url": { + "description": "The url string.", + + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": ["url"] + }, + + "v1.TriggerDefinition": { + "oneOf": [ + { "$ref": "#/$defs/v1.CliTrigger" }, + { "$ref": "#/$defs/v1.HttpTrigger" }, + { "$ref": "#/$defs/v1.TimeTrigger" } + ] + }, + + "v1.CliTrigger": { + "$anchor": "v1.CliTrigger", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/trigger/cli@v1"] + }, + "operation": { + "description": "The operation that will act as the main entrypoint for this trigger.", + "oneOf": [ + { "type": "string" }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" + } + ] + } + }, + "required": ["operation"] + }, + + "v1.TimeTrigger": { + "$anchor": "v1.TimeTrigger", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/trigger/time@v1"] + }, + "schedule": { + "description": "The schedule to run the trigger with.", + + "$ref": "#/$defs/v1.Schedule" + }, + "operation": { + "description": "The operation to execute on the schedule.", + "oneOf": [ + { "type": "string" }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" + } + ] + }, + "payload": { + "description": "Values passed to the operation as inputs", + + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationInput" + } + } + }, + "required": ["schedule", "operation", "payload"] + }, + + "v1.OperationInput": { + "$anchor": "v1.OperationInput", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the input.", + + "type": "string" + }, + "value": { + "description": "The value to pass." + } + }, + "required": ["name", "value"] + }, + + "v1.Schedule": { + "$anchor": "v1.Schedule", + "additionalProperties": false, + "type": "object", + "properties": { + "cron": { + "description": "Schedule in cron format with second precision. See [cron.help](https://cron.help) for more information.", + + "type": "string" + }, + "repeat": { + "description": "repeat `n` times. Use `0` to repeat indefinitely", + + "oneOf": [{ "type": "number" }, { "type": "string" }] + } + }, + "required": ["cron"] + }, + + "v1.ComponentOperationExpression": { + "$anchor": "v1.ComponentOperationExpression", + "additionalProperties": false, + "type": "object", + "properties": { + "component": { + "description": "The component that exports the operation.", + "oneOf": [ + { "type": "string" }, + { + "$ref": "#/$defs/v1.ComponentDefinition" } - } + ] }, - "required": ["schedule", "operation", "payload"] - }, + "name": { + "description": "The operation name.", - "OperationInput": { - "$anchor": "#v1/OperationInput", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the input.", + "type": "string" + }, + "with": { + "description": "Configuration to pass to this operation on invocation.", - "type": "string" - }, - "value": { - "description": "The value to pass." + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" + } } }, - "required": ["name", "value"] + "timeout": { + "description": "Timeout (in milliseconds) to wait for the operation to complete. Use 0 to wait indefinitely.", + + "oneOf": [{ "type": "number" }, { "type": "string" }] + } }, + "required": ["component", "name"] + }, - "Schedule": { - "$anchor": "#v1/Schedule", - "additionalProperties": false, - "type": "object", - "properties": { - "cron": { - "description": "Schedule in cron format with second precision. See [cron.help](https://cron.help) for more information.", + "v1.HttpTrigger": { + "$anchor": "v1.HttpTrigger", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/trigger/http@v1"] + }, + "resource": { + "description": "The TcpPort resource to listen on for connections.", - "type": "string" - }, - "repeat": { - "description": "repeat `n` times. Use `0` to repeat indefinitely", + "type": "string" + }, + "routers": { + "description": "The router to handle incoming requests", - "oneOf": [{ "type": "number" }, { "type": "string" }] + "type": "array", + "items": { + "$ref": "#/$defs/v1.HttpRouter" } - }, - "required": ["cron"] + } }, + "required": ["resource"] + }, - "ComponentOperationExpression": { - "$anchor": "#v1/ComponentOperationExpression", - "additionalProperties": false, - "type": "object", - "properties": { - "component": { - "description": "The component that exports the operation.", - "oneOf": [ - { "type": "string" }, - { - "$ref": "#/$defs/v1/ComponentDefinition" - } - ] - }, - "name": { - "description": "The operation name.", + "v1.HttpRouter": { + "oneOf": [ + { "$ref": "#/$defs/v1.RawRouter" }, + { "$ref": "#/$defs/v1.RestRouter" }, + { "$ref": "#/$defs/v1.StaticRouter" }, + { "$ref": "#/$defs/v1.ProxyRouter" } + ] + }, - "type": "string" - }, - "with": { - "description": "Configuration to pass to this operation on invocation.", - "required": false, - - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - }, - "timeout": { - "description": "Timeout (in milliseconds) to wait for the operation to complete. Use 0 to wait indefinitely.", - "required": false, - - "oneOf": [{ "type": "number" }, { "type": "string" }] - } + "v1.ProxyRouter": { + "$anchor": "v1.ProxyRouter", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/router/proxy@v1"] }, - "required": ["component", "name"] - }, + "path": { + "description": "The path that this router will trigger for.", - "HttpTrigger": { - "$anchor": "#v1/HttpTrigger", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/trigger/http@v1"] - }, - "resource": { - "description": "The TcpPort resource to listen on for connections.", + "type": "string" + }, + "middleware": { + "description": "Middleware operations for this router.", - "type": "string" - }, - "routers": { - "description": "The router to handle incoming requests", + "$ref": "#/$defs/v1.Middleware" + }, + "url": { + "description": "The URL resource to proxy to.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/HttpRouter" - } - } + "type": "string" }, - "required": ["resource"] - }, + "strip_path": { + "description": "Whether or not to strip the router's path from the proxied request.", - "HttpRouter": { - "oneOf": [ - { "$ref": "#/$defs/v1/RawRouter" }, - { "$ref": "#/$defs/v1/RestRouter" }, - { "$ref": "#/$defs/v1/StaticRouter" }, - { "$ref": "#/$defs/v1/ProxyRouter" } - ] + "type": "boolean" + } }, + "required": ["path", "url"] + }, - "ProxyRouter": { - "$anchor": "#v1/ProxyRouter", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/router/proxy@v1"] - }, - "path": { - "description": "The path that this router will trigger for.", + "v1.RestRouter": { + "$anchor": "v1.RestRouter", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/router/rest@v1"] + }, + "path": { + "description": "The path that this router will trigger for.", - "type": "string" - }, - "middleware": { - "description": "Middleware operations for this router.", - "required": false, + "type": "string" + }, + "tools": { + "description": "Additional tools and services to enable.", - "$ref": "#/$defs/v1/Middleware" - }, - "url": { - "description": "The URL resource to proxy to.", + "$ref": "#/$defs/v1.Tools" + }, + "middleware": { + "description": "Middleware operations for this router.", - "type": "string" - }, - "strip_path": { - "description": "Whether or not to strip the router's path from the proxied request.", + "$ref": "#/$defs/v1.Middleware" + }, + "routes": { + "description": "The routes to serve and operations that handle them.", - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/$defs/v1.Route" } }, - "required": ["path", "url"] + "info": { + "description": "Information about the router to use when generating documentation and other tools.", + + "$ref": "#/$defs/v1.Info" + } }, + "required": ["path"] + }, - "RestRouter": { - "$anchor": "#v1/RestRouter", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/router/rest@v1"] - }, - "path": { - "description": "The path that this router will trigger for.", + "v1.Route": { + "$anchor": "v1.Route", + "additionalProperties": false, + "type": "object", + "properties": { + "sub_path": { + "description": "The path to serve this route from. See [URI documentation](/docs/configuration/uri) for more information on specifying query and path parameters.", - "type": "string" - }, - "tools": { - "description": "Additional tools and services to enable.", - "required": false, - - "$ref": "#/$defs/v1/Tools" - }, - "middleware": { - "description": "Middleware operations for this router.", - "required": false, - - "$ref": "#/$defs/v1/Middleware" - }, - "routes": { - "description": "The routes to serve and operations that handle them.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/Route" + "type": "string" + }, + "operation": { + "description": "The operation that will act as the main entrypoint for this route.", + "oneOf": [ + { "type": "string" }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" } - }, - "info": { - "description": "Information about the router to use when generating documentation and other tools.", - "required": false, + ] + }, + "methods": { + "description": "The HTTP methods to serve this route for.", - "$ref": "#/$defs/v1/Info" + "type": "array", + "items": { + "$ref": "#/$defs/v1.HttpMethod" } }, - "required": ["path"] - }, + "id": { + "description": "The unique ID of the route, used for documentation and tooling.", - "Route": { - "$anchor": "#v1/Route", - "additionalProperties": false, - "type": "object", - "properties": { - "sub_path": { - "description": "The path to serve this route from. See [URI documentation](/docs/configuration/uri) for more information on specifying query and path parameters.", + "type": "string" + }, + "description": { + "description": "A short description of the route.", - "type": "string" - }, - "operation": { - "description": "The operation that will act as the main entrypoint for this route.", - "oneOf": [ - { "type": "string" }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - }, - "methods": { - "description": "The HTTP methods to serve this route for.", + "type": "string" + }, + "summary": { + "description": "A longer description of the route.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/HttpMethod" - } - }, - "id": { - "description": "The unique ID of the route, used for documentation and tooling.", - "required": false, + "type": "string" + } + }, + "required": ["sub_path", "operation"] + }, - "type": "string" - }, - "description": { - "description": "A short description of the route.", - "required": false, + "v1.Tools": { + "$anchor": "v1.Tools", + "additionalProperties": false, + "type": "object", + "properties": { + "openapi": { + "description": "Set to true to generate an OpenAPI specification and serve it at *router_path*/openapi.json", - "type": "string" - }, - "summary": { - "description": "A longer description of the route.", - "required": false, + "type": "boolean" + } + }, + "required": [] + }, - "type": "string" - } + "v1.Info": { + "$anchor": "v1.Info", + "additionalProperties": false, + "type": "object", + "properties": { + "title": { + "description": "The title of the API.", + + "type": "string" }, - "required": ["sub_path", "operation"] - }, + "description": { + "description": "A short description of the API.", - "Tools": { - "$anchor": "#v1/Tools", - "additionalProperties": false, - "type": "object", - "properties": { - "openapi": { - "description": "Set to true to generate an OpenAPI specification and serve it at *router_path*/openapi.json", + "type": "string" + }, + "tos": { + "description": "The terms of service for the API.", - "type": "boolean" - } + "type": "string" }, - "required": [] - }, + "contact": { + "description": "The contact information for the API.", - "Info": { - "$anchor": "#v1/Info", - "additionalProperties": false, - "type": "object", - "properties": { - "title": { - "description": "The title of the API.", - "required": false, + "$ref": "#/$defs/v1.Contact" + }, + "license": { + "description": "The license information for the API.", - "type": "string" - }, - "description": { - "description": "A short description of the API.", - "required": false, + "$ref": "#/$defs/v1.License" + }, + "version": { + "description": "The version of the API.", - "type": "string" - }, - "tos": { - "description": "The terms of service for the API.", - "required": false, + "type": "string" + }, + "documentation": { + "description": "The URL to the API's terms of service.", - "type": "string" - }, - "contact": { - "description": "The contact information for the API.", - "required": false, - - "$ref": "#/$defs/v1/Contact" - }, - "license": { - "description": "The license information for the API.", - "required": false, - - "$ref": "#/$defs/v1/License" - }, - "version": { - "description": "The version of the API.", + "$ref": "#/$defs/v1.Documentation" + } + }, + "required": [] + }, - "type": "string" - }, - "documentation": { - "description": "The URL to the API's terms of service.", - "required": false, + "v1.Documentation": { + "$anchor": "v1.Documentation", + "additionalProperties": false, + "type": "object", + "properties": { + "url": { + "description": "The URL to the API's documentation.", - "$ref": "#/$defs/v1/Documentation" - } + "type": "string" }, - "required": [] + "description": { + "description": "A short description of the documentation.", + + "type": "string" + } }, + "required": [] + }, - "Documentation": { - "$anchor": "#v1/Documentation", - "additionalProperties": false, - "type": "object", - "properties": { - "url": { - "description": "The URL to the API's documentation.", - "required": false, + "v1.License": { + "$anchor": "v1.License", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the license.", - "type": "string" - }, - "description": { - "description": "A short description of the documentation.", - "required": false, - - "type": "string" - } + "type": "string" }, - "required": [] + "url": { + "description": "The URL to the license.", + + "type": "string" + } }, + "required": ["name"] + }, - "License": { - "$anchor": "#v1/License", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the license.", + "v1.Contact": { + "$anchor": "v1.Contact", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the contact.", - "type": "string" - }, - "url": { - "description": "The URL to the license.", - "required": false, + "type": "string" + }, + "url": { + "description": "The URL to the contact.", - "type": "string" - } + "type": "string" }, - "required": ["name"] + "email": { + "description": "The email address of the contact.", + + "type": "string" + } }, + "required": [] + }, - "Contact": { - "$anchor": "#v1/Contact", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the contact.", - "required": false, + "v1.StaticRouter": { + "$anchor": "v1.StaticRouter", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/router/static@v1"] + }, + "path": { + "description": "The path that this router will trigger for.", - "type": "string" - }, - "url": { - "description": "The URL to the contact.", - "required": false, + "type": "string" + }, + "middleware": { + "description": "Middleware operations for this router.", - "type": "string" - }, - "email": { - "description": "The email address of the contact.", - "required": false, + "$ref": "#/$defs/v1.Middleware" + }, + "volume": { + "description": "The volume to serve static files from.", - "type": "string" - } + "type": "string" }, - "required": [] - }, + "fallback": { + "description": "Fallback path (relative to volume `resource`) for files to serve in case of a 404. Useful for SPA's. if volume resource is: /www and fallback: index.html, then a 404 will serve /www/index.html", - "StaticRouter": { - "$anchor": "#v1/StaticRouter", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/router/static@v1"] - }, - "path": { - "description": "The path that this router will trigger for.", + "type": "string" + } + }, + "required": ["path", "volume"] + }, - "type": "string" - }, - "middleware": { - "description": "Middleware operations for this router.", - "required": false, + "v1.RawRouter": { + "$anchor": "v1.RawRouter", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/router/raw@v1"] + }, + "path": { + "description": "The path that this router will trigger for.", - "$ref": "#/$defs/v1/Middleware" - }, - "volume": { - "description": "The volume to serve static files from.", + "type": "string" + }, + "middleware": { + "description": "Middleware operations for this router.", - "type": "string" - }, - "fallback": { - "description": "Fallback path (relative to volume `resource`) for files to serve in case of a 404. Useful for SPA's. if volume resource is: /www and fallback: index.html, then a 404 will serve /www/index.html", - "required": false, + "$ref": "#/$defs/v1.Middleware" + }, + "codec": { + "description": "The codec to use when encoding/decoding data.", - "type": "string" - } + "$ref": "#/$defs/v1.Codec" }, - "required": ["path", "volume"] + "operation": { + "description": "The operation that handles HTTP requests.", + "oneOf": [ + { "type": "string" }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" + } + ] + } }, + "required": ["path", "operation"] + }, - "RawRouter": { - "$anchor": "#v1/RawRouter", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/router/raw@v1"] - }, - "path": { - "description": "The path that this router will trigger for.", + "v1.Middleware": { + "$anchor": "v1.Middleware", + "additionalProperties": false, + "type": "object", + "properties": { + "request": { + "description": "The middleware to apply to requests.", - "type": "string" - }, - "middleware": { - "description": "Middleware operations for this router.", - "required": false, - - "$ref": "#/$defs/v1/Middleware" - }, - "codec": { - "description": "The codec to use when encoding/decoding data.", - "required": false, - - "$ref": "#/$defs/v1/Codec" - }, - "operation": { - "description": "The operation that handles HTTP requests.", + "type": "array", + "items": { "oneOf": [ { "type": "string" }, { - "$ref": "#/$defs/v1/ComponentOperationExpression" + "$ref": "#/$defs/v1.ComponentOperationExpression" } ] } }, - "required": ["path", "operation"] - }, - - "Middleware": { - "$anchor": "#v1/Middleware", - "additionalProperties": false, - "type": "object", - "properties": { - "request": { - "description": "The middleware to apply to requests.", + "response": { + "description": "The middleware to apply to responses.", - "type": "array", - "items": { - "oneOf": [ - { "type": "string" }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - } - }, - "response": { - "description": "The middleware to apply to responses.", - - "type": "array", - "items": { - "oneOf": [ - { "type": "string" }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - } + "type": "array", + "items": { + "oneOf": [ + { "type": "string" }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" + } + ] } - }, - "required": [] + } }, + "required": [] + }, - "TypesConfiguration": { - "$anchor": "#v1/TypesConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/types@v1"] - }, - "name": { - "description": "The name of this type.", - "required": false, + "v1.TypesConfiguration": { + "$anchor": "v1.TypesConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/types@v1"] + }, + "name": { + "description": "The name of this type.", - "type": "string" - }, - "metadata": { - "description": "Associated metadata for this type.", - "required": false, - - "$ref": "#/$defs/v1/Metadata" - }, - "types": { - "description": "Additional types to export and make available to the type.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/TypeDefinition" - } - }, - "operations": { - "description": "A list of operation signatures.", + "type": "string" + }, + "metadata": { + "description": "Associated metadata for this type.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationDefinition" - } - }, - "package": { - "description": "Details about the package for this types.", - "required": false, + "$ref": "#/$defs/v1.Metadata" + }, + "types": { + "description": "Additional types to export and make available to the type.", - "$ref": "#/$defs/v1/PackageDefinition" + "type": "array", + "items": { + "$ref": "#/$defs/v1.TypeDefinition" } }, - "required": [] - }, + "operations": { + "description": "A list of operation signatures.", - "TestConfiguration": { - "$anchor": "#v1/TestConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/tests@v1"] - }, - "name": { - "description": "The name of this component.", - "required": false, - - "type": "string" - }, - "with": { - "description": "Configuration used to instantiate this component.", - "required": false, - - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - }, - "cases": { - "description": "Unit tests to run against components and operations.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/TestDefinition" - } + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationDefinition" } }, - "required": [] + "package": { + "description": "Details about the package for this types.", + + "$ref": "#/$defs/v1.PackageDefinition" + } }, + "required": [] + }, - "LockdownConfiguration": { - "$anchor": "#v1/LockdownConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/lockdown@v1"] - }, - "metadata": { - "description": "Associated metadata for this configuration.", - "required": false, + "v1.TestConfiguration": { + "$anchor": "v1.TestConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/tests@v1"] + }, + "name": { + "description": "The name of this component.", - "$ref": "#/$defs/v1/Metadata" - }, - "resources": { - "description": "Restrictions to apply to resources before an application or component can be run.", + "type": "string" + }, + "with": { + "description": "Configuration used to instantiate this component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/ResourceRestriction" + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" } } }, - "required": [] - }, + "cases": { + "description": "Unit tests to run against components and operations.", - "ResourceRestriction": { - "oneOf": [ - { "$ref": "#/$defs/v1/VolumeRestriction" }, - { "$ref": "#/$defs/v1/UrlRestriction" }, - { "$ref": "#/$defs/v1/TcpPortRestriction" }, - { "$ref": "#/$defs/v1/UdpPortRestriction" } - ] + "type": "array", + "items": { + "$ref": "#/$defs/v1.TestDefinition" + } + } }, + "required": [] + }, - "VolumeRestriction": { - "$anchor": "#v1/VolumeRestriction", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/resource/volume@v1"] - }, - "components": { - "description": "The components this restriction applies to", + "v1.LockdownConfiguration": { + "$anchor": "v1.LockdownConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/lockdown@v1"] + }, + "metadata": { + "description": "Associated metadata for this configuration.", - "type": "array", - "items": { - "type": "string" - } - }, - "allow": { - "description": "The volumes to allow", + "$ref": "#/$defs/v1.Metadata" + }, + "resources": { + "description": "Restrictions to apply to resources before an application or component can be run.", - "$ref": "#/$defs/v1/LiquidTemplate" + "type": "array", + "items": { + "$ref": "#/$defs/v1.ResourceRestriction" } - }, - "required": ["allow"] + } }, + "required": [] + }, - "UrlRestriction": { - "$anchor": "#v1/UrlRestriction", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/resource/url@v1"] - }, - "components": { - "description": "The components this restriction applies to", + "v1.ResourceRestriction": { + "oneOf": [ + { "$ref": "#/$defs/v1.VolumeRestriction" }, + { "$ref": "#/$defs/v1.UrlRestriction" }, + { "$ref": "#/$defs/v1.TcpPortRestriction" }, + { "$ref": "#/$defs/v1.UdpPortRestriction" } + ] + }, - "type": "array", - "items": { - "type": "string" - } - }, - "allow": { - "description": "The URLs to allow", + "v1.VolumeRestriction": { + "$anchor": "v1.VolumeRestriction", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/resource/volume@v1"] + }, + "components": { + "description": "The components this restriction applies to", - "$ref": "#/$defs/v1/LiquidTemplate" + "type": "array", + "items": { + "type": "string" } }, - "required": ["allow"] - }, - - "TcpPortRestriction": { - "$anchor": "#v1/TcpPortRestriction", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/resource/tcpport@v1"] - }, - "components": { - "description": "The components this restriction applies to", + "allow": { + "description": "The volumes to allow", - "type": "array", - "items": { - "type": "string" - } - }, - "address": { - "description": "The address to allow", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": ["allow"] + }, - "$ref": "#/$defs/v1/LiquidTemplate" - }, - "port": { - "description": "The port to allow", + "v1.UrlRestriction": { + "$anchor": "v1.UrlRestriction", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/resource/url@v1"] + }, + "components": { + "description": "The components this restriction applies to", - "$ref": "#/$defs/v1/LiquidTemplate" + "type": "array", + "items": { + "type": "string" } }, - "required": ["address", "port"] - }, - - "UdpPortRestriction": { - "$anchor": "#v1/UdpPortRestriction", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/resource/udpport@v1"] - }, - "components": { - "description": "The components this restriction applies to", + "allow": { + "description": "The URLs to allow", - "type": "array", - "items": { - "type": "string" - } - }, - "address": { - "description": "The address to allow", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": ["allow"] + }, - "$ref": "#/$defs/v1/LiquidTemplate" - }, - "port": { - "description": "The port to allow", + "v1.TcpPortRestriction": { + "$anchor": "v1.TcpPortRestriction", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/resource/tcpport@v1"] + }, + "components": { + "description": "The components this restriction applies to", - "$ref": "#/$defs/v1/LiquidTemplate" + "type": "array", + "items": { + "type": "string" } }, - "required": ["address", "port"] - }, + "address": { + "description": "The address to allow", - "ComponentConfiguration": { - "$anchor": "#v1/ComponentConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/component@v1"] - }, - "name": { - "description": "The name of the component.", - "required": false, - - "type": "string" - }, - "metadata": { - "description": "Associated metadata for this component.", - "required": false, - - "$ref": "#/$defs/v1/Metadata" - }, - "package": { - "description": "Details about the package for this component.", - "required": false, - - "$ref": "#/$defs/v1/PackageDefinition" - }, - "host": { - "description": "Configuration for when wick hosts this component as a service.", - "required": false, - - "$ref": "#/$defs/v1/HostConfig" - }, - "resources": { - "description": "Resources that the component can access.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/ResourceBinding" - } - }, - "import": { - "description": "Components or types to import into this component's scope.", + "$ref": "#/$defs/v1.LiquidTemplate" + }, + "port": { + "description": "The port to allow", - "type": "array", - "items": { - "$ref": "#/$defs/v1/ImportBinding" - } - }, - "types": { - "description": "Additional types to export and make available to the component.", + "$ref": "#/$defs/v1.LiquidTemplate" + } + }, + "required": ["address", "port"] + }, - "type": "array", - "items": { - "$ref": "#/$defs/v1/TypeDefinition" - } - }, - "requires": { - "description": "Interfaces the component requires to operate.", + "v1.UdpPortRestriction": { + "$anchor": "v1.UdpPortRestriction", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/resource/udpport@v1"] + }, + "components": { + "description": "The components this restriction applies to", - "type": "array", - "items": { - "$ref": "#/$defs/v1/InterfaceBinding" - } - }, - "component": { - "description": "Configuration specific to different kinds of components.", - - "$ref": "#/$defs/v1/ComponentKind" - }, - "tests": { - "description": "Assertions that can be run against the component to validate its behavior.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/TestConfiguration" - } + "type": "array", + "items": { + "type": "string" } }, - "required": ["component"] + "address": { + "description": "The address to allow", + + "$ref": "#/$defs/v1.LiquidTemplate" + }, + "port": { + "description": "The port to allow", + + "$ref": "#/$defs/v1.LiquidTemplate" + } }, + "required": ["address", "port"] + }, - "InterfaceBinding": { - "$anchor": "#v1/InterfaceBinding", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the interface.", + "v1.ComponentConfiguration": { + "$anchor": "v1.ComponentConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/component@v1"] + }, + "name": { + "description": "The name of the component.", - "type": "string" - }, - "interface": { - "description": "The interface to bind to.", + "type": "string" + }, + "metadata": { + "description": "Associated metadata for this component.", - "$ref": "#/$defs/v1/InterfaceDefinition" - } + "$ref": "#/$defs/v1.Metadata" }, - "required": ["name", "interface"] - }, + "package": { + "description": "Details about the package for this component.", - "InterfaceDefinition": { - "$anchor": "#v1/InterfaceDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "types": { - "description": "Types used by the interface's operations", + "$ref": "#/$defs/v1.PackageDefinition" + }, + "host": { + "description": "Configuration for when wick hosts this component as a service.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TypeDefinition" - } - }, - "operations": { - "description": "A list of operations defined by this interface.", + "$ref": "#/$defs/v1.HostConfig" + }, + "resources": { + "description": "Resources that the component can access.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationDefinition" - } + "type": "array", + "items": { + "$ref": "#/$defs/v1.ResourceBinding" } }, - "required": [] - }, + "import": { + "description": "Components or types to import into this component's scope.", - "CompositeComponentConfiguration": { - "$anchor": "#v1/CompositeComponentConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/component/composite@v1"] - }, - "operations": { - "description": "A list of operations exposed by the Composite component.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/CompositeOperationDefinition" - } - }, - "with": { - "description": "Configuration necessary to provide when instantiating the component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.ImportBinding" + } + }, + "types": { + "description": "Additional types to export and make available to the component.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "extends": { - "description": "A component or components whose operations you want to inherit from.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TypeDefinition" + } + }, + "requires": { + "description": "Interfaces the component requires to operate.", - "type": "array", - "items": { - "type": "string" - } + "type": "array", + "items": { + "$ref": "#/$defs/v1.InterfaceBinding" } }, - "required": [] - }, + "component": { + "description": "Configuration specific to different kinds of components.", - "WasmComponentConfiguration": { - "$anchor": "#v1/WasmComponentConfiguration", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/component/wasmrs@v1"] - }, - "ref": { - "description": "The path or OCI reference to the WebAssembly module", + "$ref": "#/$defs/v1.ComponentKind" + }, + "tests": { + "description": "Assertions that can be run against the component to validate its behavior.", - "type": "string" - }, - "volumes": { - "description": "Volumes to expose to the component.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.TestConfiguration" + } + } + }, + "required": ["component"] + }, - "type": "array", - "items": { - "$ref": "#/$defs/v1/ExposedVolume" - } - }, - "max_packet_size": { - "description": "The default size to allocate to the component's send/receive buffer.", - "required": false, - - "oneOf": [{ "type": "number" }, { "type": "string" }] - }, - "with": { - "description": "Configuration necessary to provide when instantiating the component.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "operations": { - "description": "A list of operations implemented by the WebAssembly module.", + "v1.InterfaceBinding": { + "$anchor": "v1.InterfaceBinding", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the interface.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationDefinition" - } - } + "type": "string" }, - "required": ["ref"] + "interface": { + "description": "The interface to bind to.", + + "$ref": "#/$defs/v1.InterfaceDefinition" + } }, + "required": ["name", "interface"] + }, - "ExposedVolume": { - "$anchor": "#v1/ExposedVolume", - "additionalProperties": false, - "type": "object", - "properties": { - "resource": { - "description": "The resource ID of the volume.", + "v1.InterfaceDefinition": { + "$anchor": "v1.InterfaceDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "types": { + "description": "Types used by the interface's operations", - "type": "string" - }, - "path": { - "description": "The path to map it to in the component.", - - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/v1.TypeDefinition" } }, - "required": ["resource", "path"] - }, + "operations": { + "description": "A list of operations defined by this interface.", - "ComponentKind": { - "oneOf": [ - { "$ref": "#/$defs/v1/WasmComponentConfiguration" }, - { "$ref": "#/$defs/v1/CompositeComponentConfiguration" }, - { "$ref": "#/$defs/v1/SqlComponent" }, - { "$ref": "#/$defs/v1/HttpClientComponent" } - ] + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationDefinition" + } + } }, + "required": [] + }, - "ImportDefinition": { - "oneOf": [ - { "$ref": "#/$defs/v1/TypesComponent" }, - { "$ref": "#/$defs/v1/ManifestComponent" }, - { "$ref": "#/$defs/v1/SqlComponent" }, - { "$ref": "#/$defs/v1/HttpClientComponent" } - ] - }, + "v1.CompositeComponentConfiguration": { + "$anchor": "v1.CompositeComponentConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/component/composite@v1"] + }, + "operations": { + "description": "A list of operations exposed by the Composite component.", - "ComponentDefinition": { - "oneOf": [ - { "$ref": "#/$defs/v1/GrpcUrlComponent" }, - { "$ref": "#/$defs/v1/ManifestComponent" }, - { "$ref": "#/$defs/v1/ComponentReference" }, - { "$ref": "#/$defs/v1/SqlComponent" }, - { "$ref": "#/$defs/v1/HttpClientComponent" } - ] - }, + "type": "array", + "items": { + "$ref": "#/$defs/v1.CompositeOperationDefinition" + } + }, + "with": { + "description": "Configuration necessary to provide when instantiating the component.", - "TypesComponent": { - "$anchor": "#v1/TypesComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/component/types@v1"] - }, - "ref": { - "description": "The URL (and optional tag) or local file path to find the types manifest.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "extends": { + "description": "A component or components whose operations you want to inherit from.", + "type": "array", + "items": { "type": "string" - }, - "types": { - "description": "The types to import from the manifest.", - - "type": "array", - "items": { - "type": "string" - } } - }, - "required": ["ref"] + } }, + "required": [] + }, + + "v1.WasmComponentConfiguration": { + "$anchor": "v1.WasmComponentConfiguration", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/component/wasmrs@v1"] + }, + "ref": { + "description": "The path or OCI reference to the WebAssembly module", - "ComponentReference": { - "$anchor": "#v1/ComponentReference", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/component/reference@v1"] - }, - "id": { - "description": "The id of the referenced component.", + "type": "string" + }, + "volumes": { + "description": "Volumes to expose to the component.", - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/v1.ExposedVolume" } }, - "required": ["id"] - }, - - "HostConfig": { - "$anchor": "#v1/HostConfig", - "additionalProperties": false, - "type": "object", - "properties": { - "allow_latest": { - "description": "Whether or not to allow the `:latest` tag on remote artifacts.", + "max_packet_size": { + "description": "The default size to allocate to the component's send/receive buffer.", - "type": "boolean" - }, - "insecure_registries": { - "description": "A list of registries to connect to insecurely (over HTTP vs HTTPS).", - - "type": "array", - "items": { - "type": "string" - } - }, - "rpc": { - "description": "Configuration for the GRPC server.", - "required": false, + "oneOf": [{ "type": "number" }, { "type": "string" }] + }, + "with": { + "description": "Configuration necessary to provide when instantiating the component.", - "$ref": "#/$defs/v1/HttpConfig" + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] + "operations": { + "description": "A list of operations implemented by the WebAssembly module.", + + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationDefinition" + } + } }, + "required": ["ref"] + }, - "HttpConfig": { - "$anchor": "#v1/HttpConfig", - "additionalProperties": false, - "type": "object", - "properties": { - "enabled": { - "description": "Enable/disable the server.", + "v1.ExposedVolume": { + "$anchor": "v1.ExposedVolume", + "additionalProperties": false, + "type": "object", + "properties": { + "resource": { + "description": "The resource ID of the volume.", - "type": "boolean" - }, - "port": { - "description": "The port to bind to.", - "required": false, + "type": "string" + }, + "path": { + "description": "The path to map it to in the component.", - "oneOf": [{ "type": "number" }, { "type": "string" }] - }, - "address": { - "description": "The address to bind to.", - "required": false, + "type": "string" + } + }, + "required": ["resource", "path"] + }, - "type": "string" - }, - "pem": { - "description": "Path to pem file for TLS.", - "required": false, + "v1.ComponentKind": { + "oneOf": [ + { "$ref": "#/$defs/v1.WasmComponentConfiguration" }, + { "$ref": "#/$defs/v1.CompositeComponentConfiguration" }, + { "$ref": "#/$defs/v1.SqlComponent" }, + { "$ref": "#/$defs/v1.HttpClientComponent" } + ] + }, - "type": "string" - }, - "key": { - "description": "Path to key file for TLS.", - "required": false, + "v1.ImportDefinition": { + "oneOf": [ + { "$ref": "#/$defs/v1.TypesComponent" }, + { "$ref": "#/$defs/v1.ManifestComponent" }, + { "$ref": "#/$defs/v1.SqlComponent" }, + { "$ref": "#/$defs/v1.HttpClientComponent" } + ] + }, - "type": "string" - }, - "ca": { - "description": "Path to CA file.", - "required": false, + "v1.ComponentDefinition": { + "oneOf": [ + { "$ref": "#/$defs/v1.GrpcUrlComponent" }, + { "$ref": "#/$defs/v1.ManifestComponent" }, + { "$ref": "#/$defs/v1.ComponentReference" }, + { "$ref": "#/$defs/v1.SqlComponent" }, + { "$ref": "#/$defs/v1.HttpClientComponent" } + ] + }, - "type": "string" - } + "v1.TypesComponent": { + "$anchor": "v1.TypesComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/component/types@v1"] }, - "required": [] - }, + "ref": { + "description": "The URL (and optional tag) or local file path to find the types manifest.", - "GrpcUrlComponent": { - "$anchor": "#v1/GrpcUrlComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/component/grpc@v1"] - }, - "url": { - "description": "The GRPC URL to connect to.", + "type": "string" + }, + "types": { + "description": "The types to import from the manifest.", + "type": "array", + "items": { "type": "string" - }, - "with": { - "description": "Any configuration necessary for the component.", - "required": false, - - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } } - }, - "required": ["url"] + } }, + "required": ["ref"] + }, - "ManifestComponent": { - "$anchor": "#v1/ManifestComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/component/manifest@v1"] - }, - "ref": { - "description": "The URL (and optional tag) or local file path to find the manifest.", + "v1.ComponentReference": { + "$anchor": "v1.ComponentReference", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/component/reference@v1"] + }, + "id": { + "description": "The id of the referenced component.", - "type": "string" - }, - "with": { - "description": "Any configuration necessary for the component.", - "required": false, - - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - }, - "provide": { - "description": "External components to provide to the referenced component.", + "type": "string" + } + }, + "required": ["id"] + }, - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "type": "string" - } - } - }, - "max_packet_size": { - "description": "If applicable, the default size to allocate to the component's send/receive buffer.", - "required": false, + "v1.HostConfig": { + "$anchor": "v1.HostConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "allow_latest": { + "description": "Whether or not to allow the `:latest` tag on remote artifacts.", + + "type": "boolean" + }, + "insecure_registries": { + "description": "A list of registries to connect to insecurely (over HTTP vs HTTPS).", - "oneOf": [{ "type": "number" }, { "type": "string" }] + "type": "array", + "items": { + "type": "string" } }, - "required": ["ref"] + "rpc": { + "description": "Configuration for the GRPC server.", + + "$ref": "#/$defs/v1.HttpConfig" + } }, + "required": [] + }, - "CompositeOperationDefinition": { - "$anchor": "#v1/CompositeOperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", + "v1.HttpConfig": { + "$anchor": "v1.HttpConfig", + "additionalProperties": false, + "type": "object", + "properties": { + "enabled": { + "description": "Enable/disable the server.", - "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", + "type": "boolean" + }, + "port": { + "description": "The port to bind to.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", + "oneOf": [{ "type": "number" }, { "type": "string" }] + }, + "address": { + "description": "The address to bind to.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "outputs": { - "description": "Types of the outputs to the operation.", + "type": "string" + }, + "pem": { + "description": "Path to pem file for TLS.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "uses": { - "description": "A map of IDs to specific operations.", + "type": "string" + }, + "key": { + "description": "Path to key file for TLS.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/OperationInstance" - } - }, - "flow": { - "description": "A list of connections from operation to operation.", + "type": "string" + }, + "ca": { + "description": "Path to CA file.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/FlowExpression" - } - }, - "operations": { - "description": "Additional `CompositeOperationDefinition`s to define as children.", + "type": "string" + } + }, + "required": [] + }, - "type": "array", - "items": { - "$ref": "#/$defs/v1/CompositeOperationDefinition" - } - } + "v1.GrpcUrlComponent": { + "$anchor": "v1.GrpcUrlComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/component/grpc@v1"] }, - "required": [] - }, + "url": { + "description": "The GRPC URL to connect to.", - "FlowExpression": { - "oneOf": [ - { "type": "string" }, - { "$ref": "#/$defs/v1/ConnectionDefinition" }, - { "$ref": "#/$defs/v1/BlockExpression" } - ] - }, + "type": "string" + }, + "with": { + "description": "Any configuration necessary for the component.", - "BlockExpression": { - "$anchor": "#v1/BlockExpression", - "additionalProperties": false, - "type": "object", - "properties": { - "expressions": { - "type": "array", - "items": { - "$ref": "#/$defs/v1/FlowExpression" + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" } } - }, - "required": ["expressions"] + } }, + "required": ["url"] + }, - "ConnectionDefinition": { - "$anchor": "#v1/ConnectionDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "from": { - "description": "An upstream operation's output.", + "v1.ManifestComponent": { + "$anchor": "v1.ManifestComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/component/manifest@v1"] + }, + "ref": { + "description": "The URL (and optional tag) or local file path to find the manifest.", - "$ref": "#/$defs/v1/ConnectionTargetDefinition" - }, - "to": { - "description": "A downstream operation's input.", + "type": "string" + }, + "with": { + "description": "Any configuration necessary for the component.", - "$ref": "#/$defs/v1/ConnectionTargetDefinition" + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" + } } }, - "required": ["from", "to"] - }, + "provide": { + "description": "External components to provide to the referenced component.", - "ConnectionTargetDefinition": { - "$anchor": "#v1/ConnectionTargetDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "instance": { - "description": "The instance ID of the component operation.", - - "type": "string" - }, - "port": { - "description": "The operation's input or output (depending on to/from).", - "required": false, - - "type": "string" - }, - "data": { - "description": "The default value to provide on this connection in the event of an error.", - "required": false, - - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "type": "string" } } }, - "required": ["instance"] - }, - - "OperationDefinition": { - "$anchor": "#v1/OperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", + "max_packet_size": { + "description": "If applicable, the default size to allocate to the component's send/receive buffer.", - "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", + "oneOf": [{ "type": "number" }, { "type": "string" }] + } + }, + "required": ["ref"] + }, - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", + "v1.CompositeOperationDefinition": { + "$anchor": "v1.CompositeOperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "outputs": { - "description": "Types of the outputs to the operation.", + "type": "string" + }, + "with": { + "description": "Any configuration required by the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] - }, - - "Field": { - "$anchor": "#v1/Field", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the field.", + "inputs": { + "description": "Types of the inputs to the operation.", - "type": "string" - }, - "type": { - "description": "The type signature of the field.", - - "$ref": "#/$defs/v1/TypeSignature" - }, - "description": { - "description": "The description of the field.", - "required": false, + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "outputs": { + "description": "Types of the outputs to the operation.", - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": ["name", "type"] - }, + "uses": { + "description": "A map of IDs to specific operations.", - "TypeSignature": { - "oneOf": [{ "type": "string" }] - }, + "type": "array", + "items": { + "$ref": "#/$defs/v1.OperationInstance" + } + }, + "flow": { + "description": "A list of connections from operation to operation.", - "I8": { - "$anchor": "#v1/I8", - "additionalProperties": false, - "type": "string", - "enum": ["i8"] - }, + "type": "array", + "items": { + "$ref": "#/$defs/v1.FlowExpression" + } + }, + "operations": { + "description": "Additional `CompositeOperationDefinition`s to define as children.", - "I16": { - "$anchor": "#v1/I16", - "additionalProperties": false, - "type": "string", - "enum": ["i16"] + "type": "array", + "items": { + "$ref": "#/$defs/v1.CompositeOperationDefinition" + } + } }, + "required": [] + }, - "I32": { - "$anchor": "#v1/I32", - "additionalProperties": false, - "type": "string", - "enum": ["i32"] - }, + "v1.FlowExpression": { + "oneOf": [ + { "type": "string" }, + { "$ref": "#/$defs/v1.ConnectionDefinition" }, + { "$ref": "#/$defs/v1.BlockExpression" } + ] + }, - "I64": { - "$anchor": "#v1/I64", - "additionalProperties": false, - "type": "string", - "enum": ["i64"] + "v1.BlockExpression": { + "$anchor": "v1.BlockExpression", + "additionalProperties": false, + "type": "object", + "properties": { + "expressions": { + "type": "array", + "items": { + "$ref": "#/$defs/v1.FlowExpression" + } + } }, + "required": ["expressions"] + }, - "U8": { - "$anchor": "#v1/U8", - "additionalProperties": false, - "type": "string", - "enum": ["u8"] - }, + "v1.ConnectionDefinition": { + "$anchor": "v1.ConnectionDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "from": { + "description": "An upstream operation's output.", - "U16": { - "$anchor": "#v1/U16", - "additionalProperties": false, - "type": "string", - "enum": ["u16"] - }, + "$ref": "#/$defs/v1.ConnectionTargetDefinition" + }, + "to": { + "description": "A downstream operation's input.", - "U32": { - "$anchor": "#v1/U32", - "additionalProperties": false, - "type": "string", - "enum": ["u32"] + "$ref": "#/$defs/v1.ConnectionTargetDefinition" + } }, + "required": ["from", "to"] + }, - "U64": { - "$anchor": "#v1/U64", - "additionalProperties": false, - "type": "string", - "enum": ["u64"] - }, + "v1.ConnectionTargetDefinition": { + "$anchor": "v1.ConnectionTargetDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "instance": { + "description": "The instance ID of the component operation.", - "F32": { - "$anchor": "#v1/F32", - "additionalProperties": false, - "type": "string", - "enum": ["f32"] - }, + "type": "string" + }, + "port": { + "description": "The operation's input or output (depending on to/from).", - "F64": { - "$anchor": "#v1/F64", - "additionalProperties": false, - "type": "string", - "enum": ["f64"] - }, + "type": "string" + }, + "data": { + "description": "The default value to provide on this connection in the event of an error.", - "Bool": { - "$anchor": "#v1/Bool", - "additionalProperties": false, - "type": "string", - "enum": ["i8"] + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" + } + } + } }, + "required": ["instance"] + }, - "StringType": { - "$anchor": "#v1/StringType", - "additionalProperties": false, - "type": "string", - "enum": ["string"] - }, + "v1.OperationDefinition": { + "$anchor": "v1.OperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", - "Datetime": { - "$anchor": "#v1/Datetime", - "additionalProperties": false, - "type": "string", - "enum": ["datetime"] - }, + "type": "string" + }, + "with": { + "description": "Any configuration required by the operation.", - "Bytes": { - "$anchor": "#v1/Bytes", - "additionalProperties": false, - "type": "string", - "enum": ["bytes"] - }, + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "inputs": { + "description": "Types of the inputs to the operation.", + + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "outputs": { + "description": "Types of the outputs to the operation.", + + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + } + }, + "required": [] + }, + + "v1.Field": { + "$anchor": "v1.Field", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the field.", + + "type": "string" + }, + "type": { + "description": "The type signature of the field.", + + "$ref": "#/$defs/v1.TypeSignature" + }, + "description": { + "description": "The description of the field.", + + "type": "string" + } + }, + "required": ["name", "type"] + }, + + "v1.TypeSignature": { + "oneOf": [{ "type": "string" }] + }, + + "v1.I8": { + "$anchor": "v1.I8", + "additionalProperties": false, + "type": "string", + "enum": ["i8"] + }, + + "v1.I16": { + "$anchor": "v1.I16", + "additionalProperties": false, + "type": "string", + "enum": ["i16"] + }, + + "v1.I32": { + "$anchor": "v1.I32", + "additionalProperties": false, + "type": "string", + "enum": ["i32"] + }, + + "v1.I64": { + "$anchor": "v1.I64", + "additionalProperties": false, + "type": "string", + "enum": ["i64"] + }, + + "v1.U8": { + "$anchor": "v1.U8", + "additionalProperties": false, + "type": "string", + "enum": ["u8"] + }, + + "v1.U16": { + "$anchor": "v1.U16", + "additionalProperties": false, + "type": "string", + "enum": ["u16"] + }, + + "v1.U32": { + "$anchor": "v1.U32", + "additionalProperties": false, + "type": "string", + "enum": ["u32"] + }, + + "v1.U64": { + "$anchor": "v1.U64", + "additionalProperties": false, + "type": "string", + "enum": ["u64"] + }, + + "v1.F32": { + "$anchor": "v1.F32", + "additionalProperties": false, + "type": "string", + "enum": ["f32"] + }, + + "v1.F64": { + "$anchor": "v1.F64", + "additionalProperties": false, + "type": "string", + "enum": ["f64"] + }, + + "v1.Bool": { + "$anchor": "v1.Bool", + "additionalProperties": false, + "type": "string", + "enum": ["i8"] + }, + + "v1.StringType": { + "$anchor": "v1.StringType", + "additionalProperties": false, + "type": "string", + "enum": ["string"] + }, + + "v1.Datetime": { + "$anchor": "v1.Datetime", + "additionalProperties": false, + "type": "string", + "enum": ["datetime"] + }, + + "v1.Bytes": { + "$anchor": "v1.Bytes", + "additionalProperties": false, + "type": "string", + "enum": ["bytes"] + }, + + "v1.Custom": { + "$anchor": "v1.Custom", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the custom type.", + + "type": "string" + } + }, + "required": [] + }, + + "v1.Optional": { + "$anchor": "v1.Optional", + "additionalProperties": false, + "type": "object", + "properties": { + "type": { + "$ref": "#/$defs/v1.TypeSignature" + } + }, + "required": ["type"] + }, + + "v1.List": { + "$anchor": "v1.List", + "additionalProperties": false, + "type": "object", + "properties": { + "type": { + "$ref": "#/$defs/v1.TypeSignature" + } + }, + "required": ["type"] + }, + + "v1.Map": { + "$anchor": "v1.Map", + "additionalProperties": false, + "type": "object", + "properties": { + "key": { + "$ref": "#/$defs/v1.TypeSignature" + }, + "value": { + "$ref": "#/$defs/v1.TypeSignature" + } + }, + "required": ["key", "value"] + }, + + "v1.Object": { + "$anchor": "v1.Object", + "additionalProperties": false, + "type": "string", + "enum": ["object"] + }, + + "v1.TypeDefinition": { + "oneOf": [ + { "$ref": "#/$defs/v1.StructSignature" }, + { "$ref": "#/$defs/v1.EnumSignature" }, + { "$ref": "#/$defs/v1.UnionSignature" } + ] + }, + + "v1.StructSignature": { + "$anchor": "v1.StructSignature", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/type/struct@v1"] + }, + "name": { + "description": "The name of the struct.", + + "type": "string" + }, + "fields": { + "description": "The fields in this struct.", + + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "description": { + "description": "The description of the struct.", + + "type": "string" + } + }, + "required": [] + }, + + "v1.UnionSignature": { + "$anchor": "v1.UnionSignature", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/type/union@v1"] + }, + "name": { + "description": "The name of the union.", - "Custom": { - "$anchor": "#v1/Custom", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the custom type.", + "type": "string" + }, + "types": { + "description": "The types in the union.", - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/v1.TypeSignature" } }, - "required": [] + "description": { + "description": "The description of the union.", + + "type": "string" + } }, + "required": [] + }, - "Optional": { - "$anchor": "#v1/Optional", - "additionalProperties": false, - "type": "object", - "properties": { - "type": { - "$ref": "#/$defs/v1/TypeSignature" - } + "v1.EnumSignature": { + "$anchor": "v1.EnumSignature", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/type/enum@v1"] }, - "required": ["type"] - }, + "name": { + "description": "The name of the enum.", - "List": { - "$anchor": "#v1/List", - "additionalProperties": false, - "type": "object", - "properties": { - "type": { - "$ref": "#/$defs/v1/TypeSignature" - } + "type": "string" }, - "required": ["type"] - }, + "variants": { + "description": "The variants in the enum.", - "Map": { - "$anchor": "#v1/Map", - "additionalProperties": false, - "type": "object", - "properties": { - "key": { - "$ref": "#/$defs/v1/TypeSignature" - }, - "value": { - "$ref": "#/$defs/v1/TypeSignature" + "type": "array", + "items": { + "$ref": "#/$defs/v1.EnumVariant" } }, - "required": ["key", "value"] - }, - - "Object": { - "$anchor": "#v1/Object", - "additionalProperties": false, - "type": "string", - "enum": ["object"] - }, + "description": { + "description": "The description of the enum.", - "TypeDefinition": { - "oneOf": [ - { "$ref": "#/$defs/v1/StructSignature" }, - { "$ref": "#/$defs/v1/EnumSignature" }, - { "$ref": "#/$defs/v1/UnionSignature" } - ] + "type": "string" + } }, + "required": [] + }, - "StructSignature": { - "$anchor": "#v1/StructSignature", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/type/struct@v1"] - }, - "name": { - "description": "The name of the struct.", + "v1.EnumVariant": { + "$anchor": "v1.EnumVariant", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the variant.", - "type": "string" - }, - "fields": { - "description": "The fields in this struct.", + "type": "string" + }, + "index": { + "description": "The index of the variant.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "description": { - "description": "The description of the struct.", - "required": false, + "oneOf": [{ "type": "number" }, { "type": "string" }] + }, + "value": { + "description": "The optional value of the variant.", - "type": "string" - } + "type": "string" }, - "required": [] - }, + "description": { + "description": "A description of the variant.", - "UnionSignature": { - "$anchor": "#v1/UnionSignature", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/type/union@v1"] - }, - "name": { - "description": "The name of the union.", + "type": "string" + } + }, + "required": [] + }, - "type": "string" - }, - "types": { - "description": "The types in the union.", + "v1.OperationInstance": { + "$anchor": "v1.OperationInstance", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the binding.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TypeSignature" + "type": "string" + }, + "operation": { + "description": "The operation to bind to.", + "oneOf": [ + { "type": "string" }, + { + "$ref": "#/$defs/v1.ComponentOperationExpression" } - }, - "description": { - "description": "The description of the union.", - "required": false, + ] + }, + "with": { + "description": "Data to associate with the reference, if any.", - "type": "string" + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" + } } }, - "required": [] + "timeout": { + "description": "Timeout (in milliseconds) to wait for the operation to complete. Use 0 to wait indefinitely.", + + "oneOf": [{ "type": "number" }, { "type": "string" }] + } }, + "required": ["name", "operation"] + }, - "EnumSignature": { - "$anchor": "#v1/EnumSignature", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/type/enum@v1"] - }, - "name": { - "description": "The name of the enum.", + "v1.TestDefinition": { + "$anchor": "v1.TestDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the test.", - "type": "string" - }, - "variants": { - "description": "The variants in the enum.", + "type": "string" + }, + "operation": { + "description": "The operaton to test.", + + "type": "string" + }, + "inherent": { + "description": "Inherent data to use for the test.", + + "$ref": "#/$defs/v1.InherentData" + }, + "with": { + "description": "The configuration for the operation, if any.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/EnumVariant" + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "$ref": "#/$defs/v1.LiquidJsonValue" } - }, - "description": { - "description": "The description of the enum.", - "required": false, + } + }, + "inputs": { + "description": "The inputs to the test.", - "type": "string" + "type": "array", + "items": { + "$ref": "#/$defs/v1.PacketData" } }, - "required": [] + "outputs": { + "description": "The expected outputs of the operation.", + + "type": "array", + "items": { + "$ref": "#/$defs/v1.TestPacketData" + } + } }, + "required": ["operation"] + }, - "EnumVariant": { - "$anchor": "#v1/EnumVariant", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the variant.", + "v1.InherentData": { + "$anchor": "v1.InherentData", + "additionalProperties": false, + "type": "object", + "properties": { + "seed": { + "description": "A random seed, i.e. to initialize a random number generator.", - "type": "string" - }, - "index": { - "description": "The index of the variant.", - "required": false, + "oneOf": [{ "type": "number" }, { "type": "string" }] + }, + "timestamp": { + "description": "A timestamp.", - "oneOf": [{ "type": "number" }, { "type": "string" }] - }, - "value": { - "description": "The optional value of the variant.", - "required": false, + "oneOf": [{ "type": "number" }, { "type": "string" }] + } + }, + "required": [] + }, - "type": "string" - }, - "description": { - "description": "A description of the variant.", - "required": false, + "v1.PacketData": { + "oneOf": [ + { "$ref": "#/$defs/v1.SuccessPacket" }, + { "$ref": "#/$defs/v1.ErrorPacket" } + ] + }, - "type": "string" - } - }, - "required": [] - }, + "v1.TestPacketData": { + "oneOf": [ + { "$ref": "#/$defs/v1.SuccessPacket" }, + { "$ref": "#/$defs/v1.PacketAssertionDef" }, + { "$ref": "#/$defs/v1.ErrorPacket" } + ] + }, - "OperationInstance": { - "$anchor": "#v1/OperationInstance", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the binding.", + "v1.SuccessPacket": { + "$anchor": "v1.SuccessPacket", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the input or output this packet is going to or coming from.", - "type": "string" - }, - "operation": { - "description": "The operation to bind to.", - "oneOf": [ - { "type": "string" }, - { - "$ref": "#/$defs/v1/ComponentOperationExpression" - } - ] - }, - "with": { - "description": "Data to associate with the reference, if any.", - "required": false, - - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - }, - "timeout": { - "description": "Timeout (in milliseconds) to wait for the operation to complete. Use 0 to wait indefinitely.", - "required": false, + "type": "string" + }, + "flags": { + "description": "Any flags set on the packet. Deprecated, use 'flag:' instead", - "oneOf": [{ "type": "number" }, { "type": "string" }] - } + "$ref": "#/$defs/v1.PacketFlags" }, - "required": ["name", "operation"] - }, + "flag": { + "description": "The flag set on the packet.", - "TestDefinition": { - "$anchor": "#v1/TestDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the test.", - "required": false, + "$ref": "#/$defs/v1.PacketFlag" + }, + "value": { + "description": "The packet payload.", - "type": "string" - }, - "operation": { - "description": "The operaton to test.", + "$ref": "#/$defs/v1.LiquidJsonValue" + } + }, + "required": ["name"] + }, - "type": "string" - }, - "inherent": { - "description": "Inherent data to use for the test.", - "required": false, - - "$ref": "#/$defs/v1/InherentData" - }, - "with": { - "description": "The configuration for the operation, if any.", - "required": false, - - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "$ref": "#/$defs/v1/LiquidJsonValue" - } - } - }, - "inputs": { - "description": "The inputs to the test.", + "v1.PacketAssertionDef": { + "$anchor": "v1.PacketAssertionDef", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the input or output this packet is going to or coming from.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/PacketData" - } - }, - "outputs": { - "description": "The expected outputs of the operation.", + "type": "string" + }, + "assertions": { + "description": "An assertion to test against the packet.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/TestPacketData" - } + "type": "array", + "items": { + "$ref": "#/$defs/v1.PacketAssertion" } - }, - "required": ["operation"] + } }, + "required": ["name"] + }, - "InherentData": { - "$anchor": "#v1/InherentData", - "additionalProperties": false, - "type": "object", - "properties": { - "seed": { - "description": "A random seed, i.e. to initialize a random number generator.", - "required": false, - - "oneOf": [{ "type": "number" }, { "type": "string" }] - }, - "timestamp": { - "description": "A timestamp.", - "required": false, + "v1.PacketAssertion": { + "$anchor": "v1.PacketAssertion", + "additionalProperties": false, + "type": "object", + "properties": { + "path": { + "description": "The optional path to a value in the packet to assert against.", - "oneOf": [{ "type": "number" }, { "type": "string" }] - } + "type": "string" }, - "required": [] - }, + "operator": { + "description": "The operation to use when asserting against a packet.", - "PacketData": { - "oneOf": [ - { "$ref": "#/$defs/v1/SuccessPacket" }, - { "$ref": "#/$defs/v1/ErrorPacket" } - ] - }, + "$ref": "#/$defs/v1.AssertionOperator" + }, + "value": { + "description": "A value or object combine with the operator to assert against a packet value.", - "TestPacketData": { - "oneOf": [ - { "$ref": "#/$defs/v1/SuccessPacket" }, - { "$ref": "#/$defs/v1/PacketAssertionDef" }, - { "$ref": "#/$defs/v1/ErrorPacket" } - ] + "$ref": "#/$defs/v1.LiquidJsonValue" + } }, + "required": ["operator", "value"] + }, - "SuccessPacket": { - "$anchor": "#v1/SuccessPacket", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the input or output this packet is going to or coming from.", + "v1.AssertionOperator": { + "$anchor": "v1.AssertionOperator", + "enum": ["Equals", "LessThan", "GreaterThan", "Regex", "Contains"] + }, - "type": "string" - }, - "flags": { - "description": "Any flags set on the packet. Deprecated, use 'flag:' instead", - "required": false, + "v1.ErrorPacket": { + "$anchor": "v1.ErrorPacket", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the input or output this packet is going to or coming from.", - "$ref": "#/$defs/v1/PacketFlags" - }, - "flag": { - "description": "The flag set on the packet.", - "required": false, + "type": "string" + }, + "flags": { + "description": "Any flags set on the packet. Deprecated, use 'flag:' instead", - "$ref": "#/$defs/v1/PacketFlag" - }, - "value": { - "description": "The packet payload.", - "required": false, + "$ref": "#/$defs/v1.PacketFlags" + }, + "flag": { + "description": "The flag set on the packet.", - "$ref": "#/$defs/v1/LiquidJsonValue" - } + "$ref": "#/$defs/v1.PacketFlag" }, - "required": ["name"] + "error": { + "description": "The error message.", + + "$ref": "#/$defs/v1.LiquidTemplate" + } }, + "required": ["name", "error"] + }, - "PacketAssertionDef": { - "$anchor": "#v1/PacketAssertionDef", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the input or output this packet is going to or coming from.", + "v1.PacketFlags": { + "$anchor": "v1.PacketFlags", + "additionalProperties": false, + "type": "object", + "properties": { + "done": { + "description": "Indicates the port should be considered closed.", - "type": "string" - }, - "assertions": { - "description": "An assertion to test against the packet.", + "type": "boolean" + }, + "open": { + "description": "Indicates the opening of a new substream context within the parent stream.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/PacketAssertion" - } - } + "type": "boolean" }, - "required": ["name"] + "close": { + "description": "Indicates the closing of a substream context within the parent stream.", + + "type": "boolean" + } }, + "required": [] + }, - "PacketAssertion": { - "$anchor": "#v1/PacketAssertion", - "additionalProperties": false, - "type": "object", - "properties": { - "path": { - "description": "The optional path to a value in the packet to assert against.", - "required": false, + "v1.PacketFlag": { + "$anchor": "v1.PacketFlag", + "enum": ["Done", "Open", "Close"] + }, - "type": "string" - }, - "operator": { - "description": "The operation to use when asserting against a packet.", + "v1.SqlComponent": { + "$anchor": "v1.SqlComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/component/sql@v1"] + }, + "resource": { + "description": "The connect string URL resource for the database.", - "$ref": "#/$defs/v1/AssertionOperator" - }, - "value": { - "description": "A value or object combine with the operator to assert against a packet value.", + "type": "string" + }, + "tls": { + "description": "Whether or not to use TLS.", + + "type": "boolean" + }, + "with": { + "description": "Configuration necessary to provide when instantiating the component.", - "$ref": "#/$defs/v1/LiquidJsonValue" + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": ["operator", "value"] - }, + "operations": { + "description": "A list of operations to expose on this component.", - "AssertionOperator": { - "$anchor": "#v1/AssertionOperator", - "enum": ["Equals", "LessThan", "GreaterThan", "Regex", "Contains"] + "type": "array", + "items": { + "$ref": "#/$defs/v1.SqlQueryKind" + } + } }, + "required": [] + }, - "ErrorPacket": { - "$anchor": "#v1/ErrorPacket", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the input or output this packet is going to or coming from.", - - "type": "string" - }, - "flags": { - "description": "Any flags set on the packet. Deprecated, use 'flag:' instead", - "required": false, + "v1.SqlQueryKind": { + "oneOf": [ + { "$ref": "#/$defs/v1.SqlQueryOperationDefinition" }, + { "$ref": "#/$defs/v1.SqlExecOperationDefinition" } + ] + }, - "$ref": "#/$defs/v1/PacketFlags" - }, - "flag": { - "description": "The flag set on the packet.", - "required": false, + "v1.SqlQueryOperationDefinition": { + "$anchor": "v1.SqlQueryOperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", - "$ref": "#/$defs/v1/PacketFlag" - }, - "error": { - "description": "The error message.", + "type": "string" + }, + "with": { + "description": "Any configuration required by the operation.", - "$ref": "#/$defs/v1/LiquidTemplate" + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": ["name", "error"] - }, - - "PacketFlags": { - "$anchor": "#v1/PacketFlags", - "additionalProperties": false, - "type": "object", - "properties": { - "done": { - "description": "Indicates the port should be considered closed.", - - "type": "boolean" - }, - "open": { - "description": "Indicates the opening of a new substream context within the parent stream.", - - "type": "boolean" - }, - "close": { - "description": "Indicates the closing of a substream context within the parent stream.", + "inputs": { + "description": "Types of the inputs to the operation.", - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] - }, + "outputs": { + "description": "Types of the outputs to the operation.", - "PacketFlag": { - "$anchor": "#v1/PacketFlag", - "enum": ["Done", "Open", "Close"] - }, + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "query": { + "description": "The query to execute.", - "SqlComponent": { - "$anchor": "#v1/SqlComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/component/sql@v1"] - }, - "resource": { - "description": "The connect string URL resource for the database.", + "type": "string" + }, + "arguments": { + "description": "The positional arguments to the query, defined as a list of input names.", + "type": "array", + "items": { "type": "string" - }, - "tls": { - "description": "Whether or not to use TLS.", - - "type": "boolean" - }, - "with": { - "description": "Configuration necessary to provide when instantiating the component.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "operations": { - "description": "A list of operations to expose on this component.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/SqlQueryKind" - } } }, - "required": [] - }, + "on_error": { + "description": "What to do when an error occurs.", - "SqlQueryKind": { - "oneOf": [ - { "$ref": "#/$defs/v1/SqlQueryOperationDefinition" }, - { "$ref": "#/$defs/v1/SqlExecOperationDefinition" } - ] + "$ref": "#/$defs/v1.ErrorBehavior" + } }, + "required": ["query"] + }, - "SqlQueryOperationDefinition": { - "$anchor": "#v1/SqlQueryOperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", - - "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "outputs": { - "description": "Types of the outputs to the operation.", + "v1.SqlExecOperationDefinition": { + "$anchor": "v1.SqlExecOperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "query": { - "description": "The query to execute.", + "type": "string" + }, + "with": { + "description": "Any configuration required by the operation.", - "type": "string" - }, - "arguments": { - "description": "The positional arguments to the query, defined as a list of input names.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "inputs": { + "description": "Types of the inputs to the operation.", - "type": "array", - "items": { - "type": "string" - } - }, - "on_error": { - "description": "What to do when an error occurs.", - "required": false, + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "outputs": { + "description": "Types of the outputs to the operation.", - "$ref": "#/$defs/v1/ErrorBehavior" + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": ["query"] - }, + "exec": { + "description": "The query to execute.", - "SqlExecOperationDefinition": { - "$anchor": "#v1/SqlExecOperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", + "type": "string" + }, + "arguments": { + "description": "The positional arguments to the query, defined as a list of input names.", + "type": "array", + "items": { "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", + } + }, + "on_error": { + "description": "What to do when an error occurs.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", + "$ref": "#/$defs/v1.ErrorBehavior" + } + }, + "required": ["exec"] + }, - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "outputs": { - "description": "Types of the outputs to the operation.", + "v1.ErrorBehavior": { + "$anchor": "v1.ErrorBehavior", + "enum": ["Ignore", "Commit", "Rollback"] + }, - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "exec": { - "description": "The query to execute.", + "v1.HttpClientComponent": { + "$anchor": "v1.HttpClientComponent", + "additionalProperties": false, + "type": "object", + "properties": { + "kind": { + "type": "string", + "description": "The kind of the collection", + "enum": ["wick/component/http@v1"] + }, + "resource": { + "description": "The URL base to use.", - "type": "string" - }, - "arguments": { - "description": "The positional arguments to the query, defined as a list of input names.", + "type": "string" + }, + "codec": { + "description": "The codec to use when encoding/decoding data. Can be overridden by individual operations.", - "type": "array", - "items": { - "type": "string" - } - }, - "on_error": { - "description": "What to do when an error occurs.", - "required": false, + "$ref": "#/$defs/v1.Codec" + }, + "with": { + "description": "Configuration necessary to provide when instantiating the component.", - "$ref": "#/$defs/v1/ErrorBehavior" + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": ["exec"] - }, + "operations": { + "description": "A list of operations to expose on this component.", - "ErrorBehavior": { - "$anchor": "#v1/ErrorBehavior", - "enum": ["Ignore", "Commit", "Rollback"] + "type": "array", + "items": { + "$ref": "#/$defs/v1.HttpClientOperationDefinition" + } + } }, + "required": [] + }, - "HttpClientComponent": { - "$anchor": "#v1/HttpClientComponent", - "additionalProperties": false, - "type": "object", - "properties": { - "kind": { - "type": "string", - "description": "The kind of the collection", - "enum": ["wick/component/http@v1"] - }, - "resource": { - "description": "The URL base to use.", + "v1.HttpClientOperationDefinition": { + "$anchor": "v1.HttpClientOperationDefinition", + "additionalProperties": false, + "type": "object", + "properties": { + "name": { + "description": "The name of the operation.", - "type": "string" - }, - "codec": { - "description": "The codec to use when encoding/decoding data. Can be overridden by individual operations.", - "required": false, - - "$ref": "#/$defs/v1/Codec" - }, - "with": { - "description": "Configuration necessary to provide when instantiating the component.", - - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "operations": { - "description": "A list of operations to expose on this component.", + "type": "string" + }, + "with": { + "description": "Any configuration required by the operation.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/HttpClientOperationDefinition" - } + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" } }, - "required": [] - }, + "inputs": { + "description": "Types of the inputs to the operation.", - "HttpClientOperationDefinition": { - "$anchor": "#v1/HttpClientOperationDefinition", - "additionalProperties": false, - "type": "object", - "properties": { - "name": { - "description": "The name of the operation.", + "type": "array", + "items": { + "$ref": "#/$defs/v1.Field" + } + }, + "method": { + "description": "The HTTP method to use.", - "type": "string" - }, - "with": { - "description": "Any configuration required by the operation.", + "$ref": "#/$defs/v1.HttpMethod" + }, + "codec": { + "description": "The codec to use when encoding/decoding data.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "inputs": { - "description": "Types of the inputs to the operation.", + "$ref": "#/$defs/v1.Codec" + }, + "headers": { + "description": "Any headers to add to the request.", - "type": "array", - "items": { - "$ref": "#/$defs/v1/Field" - } - }, - "method": { - "description": "The HTTP method to use.", - - "$ref": "#/$defs/v1/HttpMethod" - }, - "codec": { - "description": "The codec to use when encoding/decoding data.", - "required": false, - - "$ref": "#/$defs/v1/Codec" - }, - "headers": { - "description": "Any headers to add to the request.", - "required": false, - - "type": "object", - "patternProperties": { - "[a-zA-Z0-9][a-zA-Z0-9_]*": { - "type": "array", - "items": { - "type": "string" - } + "type": "object", + "patternProperties": { + "[a-zA-Z0-9][a-zA-Z0-9_]*": { + "type": "array", + "items": { + "type": "string" } } - }, - "body": { - "description": "The body to send, processed as a structured JSON liquid template.", - "required": false, - - "$ref": "#/$defs/v1/LiquidJsonValue" - }, - "path": { - "description": "The path to append to our base URL, processed as a liquid template with each input as part of the template data.", - - "type": "string" } }, - "required": [] - }, + "body": { + "description": "The body to send, processed as a structured JSON liquid template.", + + "$ref": "#/$defs/v1.LiquidJsonValue" + }, + "path": { + "description": "The path to append to our base URL, processed as a liquid template with each input as part of the template data.", - "Codec": { - "$anchor": "#v1/Codec", - "enum": ["Json", "Raw", "FormData", "Text"] + "type": "string" + } }, + "required": [] + }, + + "v1.Codec": { + "$anchor": "v1.Codec", + "enum": ["Json", "Raw", "FormData", "Text"] + }, - "HttpMethod": { - "$anchor": "#v1/HttpMethod", - "enum": ["Get", "Post", "Put", "Delete"] - } + "v1.HttpMethod": { + "$anchor": "v1.HttpMethod", + "enum": ["Get", "Post", "Put", "Delete"] } } diff --git a/crates/wick/wick-config/src/v0.rs b/crates/wick/wick-config/src/v0.rs index 8d3757d13..a774dd4c6 100644 --- a/crates/wick/wick-config/src/v0.rs +++ b/crates/wick/wick-config/src/v0.rs @@ -138,9 +138,6 @@ pub struct NetworkManifest { /// The unique identifier for this Network. #[serde(default)] pub name: Option, - /// The collection to use as the entrypoint when running as a standalone process. - #[serde(default)] - pub triggers: Option, /// The links between capabilities and components. #[serde(default)] #[serde(skip_serializing_if = "Vec::is_empty")] @@ -151,23 +148,6 @@ pub struct NetworkManifest { pub collections: Vec, } -#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq)] -#[serde(deny_unknown_fields)] -/// A collection definition for the main entrypoint. -pub struct EntrypointDefinition { - /// The reference/location of the collection. - #[serde(default)] - #[serde(deserialize_with = "with_expand_envs")] - pub reference: String, - /// The component to use as the entrypoint. - #[serde(default)] - #[serde(deserialize_with = "with_expand_envs")] - pub component: String, - /// Data or configuration used to initialize the collection. - #[serde(default)] - pub data: Option>, -} - #[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq)] #[serde(deny_unknown_fields)] /// A collection definition. diff --git a/crates/wick/wick-config/tests/manifests/v1/template-expansion.yaml b/crates/wick/wick-config/tests/manifests/v1/template-expansion.yaml index f131225a5..e265ec918 100644 --- a/crates/wick/wick-config/tests/manifests/v1/template-expansion.yaml +++ b/crates/wick/wick-config/tests/manifests/v1/template-expansion.yaml @@ -1,5 +1,6 @@ # yaml-language-server: $schema=../../../json-schema/manifest.json --- +name: 'my app' kind: wick/app@v1 import: - name: test diff --git a/crates/wick/wick-runtime/tests/manifests/v1/app_config/app-http-server-wasm.wick b/crates/wick/wick-runtime/tests/manifests/v1/app_config/app-http-server-wasm.wick index 5ab1b0f0a..ba33009e6 100644 --- a/crates/wick/wick-runtime/tests/manifests/v1/app_config/app-http-server-wasm.wick +++ b/crates/wick/wick-runtime/tests/manifests/v1/app_config/app-http-server-wasm.wick @@ -1,4 +1,5 @@ --- +name: 'test-app' kind: wick/app@v1 resources: - name: http diff --git a/crates/wick/wick-runtime/tests/manifests/v1/app_config/rest-router-errors.wick b/crates/wick/wick-runtime/tests/manifests/v1/app_config/rest-router-errors.wick index c0119b90a..c8fd6fd3b 100644 --- a/crates/wick/wick-runtime/tests/manifests/v1/app_config/rest-router-errors.wick +++ b/crates/wick/wick-runtime/tests/manifests/v1/app_config/rest-router-errors.wick @@ -1,4 +1,5 @@ --- +name: 'test-app' kind: wick/app@v1 resources: - name: http