link-protocol-v1) at import time; a
document that does not conform is rejected.
Custom protocols require Link Studio. Link Connect runs
Hellgate-published protocols only. See Protocols for the concept.
Top-level structure
A protocol document has these fields (additionalProperties is false — unknown top-level keys are rejected):
| Field | Required | Description |
|---|---|---|
$schema | yes | Reference to the meta-schema: https://developer.hellgate.io/schemas/link-protocol/v1 |
$id | yes | Canonical URI identifying this protocol. Backends reference the protocol by this URI; it is the join key. |
name | yes | Human-readable protocol name. |
version | yes | Version identifier (a string, for example 1.0.0). |
actions | yes | Map of action name → Action. At least one action is required. |
components | no | Reusable schemas referenced via $ref (see Components). |
Actions
actions is keyed by action name. Names may use dot notation to namespace related operations (for example
notify.chargeback). Each action is an object (additionalProperties: false):
| Field | Required | Description |
|---|---|---|
method | yes | HTTP method: POST, GET, PUT, PATCH, or DELETE. Callers must invoke with this method. |
description | yes | Human-readable description of the action. |
request | yes | The input definition — monomorphic or discriminated. |
responses | yes | Output definitions keyed by HTTP status (see Responses). |
required | no | Whether backends must implement this action. Defaults to false. |
Requests
request is one of two shapes.
Monomorphic — a single schema
The request is a single JSON Schema:Discriminated — a polymorphic union
A discriminator field selects a named variant. Each variant is a JSON Schema:| Field | Required | Description |
|---|---|---|
discriminator | yes | A JSONPath expression pointing to the discriminator field, for example $.credential.type. |
variants | yes | Map of discriminator value → JSON Schema. At least one variant. |
required_variants | no | Variant names backends must implement. Each must exist in variants. |
action.variant key (for example assess.pan). See
Backends.
Responses
responses is keyed by HTTP status code (a string matching ^[1-5][0-9]{2}$), with at least one entry. Each
entry nests the schema under content → application/json → schema:
Components
components.schemas holds reusable schemas referenced from anywhere in the protocol via a JSON Pointer $ref
(for example #/components/schemas/Transaction):
Supported JSON Schema keywords
Schemas (in requests, responses, and components) are JSON Schema. The meta-schema explicitly lists the supported keywords; full validation is delegated to a JSON Schema validator (draft 2020-12):type, const, enum, properties, required, additionalProperties, items, oneOf, anyOf, allOf,
$ref, description, format, minimum, maximum, minLength, maxLength, pattern.
Complete example
A minimal but valid protocol with one discriminatedassess action and shared components:
Import and validation
Import a protocol you authored with Link Studio — by URL or by posting the document directly. Requiresadmin:protocols:write.
$id is
accepted. Once imported, Link generates an OpenAPI 3.1 specification for the protocol —
see Protocols.
Next steps
Backends
Bind your protocol to a real provider with mapping rules.
Protocols
The protocol concept — actions, variants, and versioning.