Skip to content

Check a driver spec without saving it

POST
/drivers:validate
curl --request POST \
--url https://example.com/api/v1/drivers:validate \
--header 'Content-Type: application/json' \
--data '{ "spec": "example" }'

Checks a driver spec by the rules a save applies (the strict parse, then validation against the live catalogs) and writes nothing. The answer lists every fault the validator can pin down, each pinned on the function it is in, the first always the fault a save would name; an empty list is a spec create-driver accepts. Gated by driver:read.

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
spec
required

The driver spec to check, as create-driver takes it

OK

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
findings
required

Every fault the validator can pin down, the first the one a save names; empty when valid

Array<object> | null
object
function

The function the fault is pinned on: a poll’s or a listener’s name, a command binding’s command type

string
kind
required

What the fault is in: parse (the spec is not a spec), spec (the spec itself), or the family of the function it is pinned on

string
Allowed values: parse spec poll listener command
message
required

The fault, as the validator names it

string
valid
required

Whether a save would accept the spec

boolean

Example

{
"$schema": "/api/v1/schemas/ValidateDriverOutputBody.json",
"findings": [
{
"kind": "parse"
}
]
}

Error

Media type application/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}