Skip to Content

apxy schema

Import OpenAPI schemas and validate captured traffic against them.

apxy schema

Import and validate API schemas

Options

-h, --help help for schema

Options inherited from parent commands

--config string config file (default is ./configs/default.yaml) --error-format string error output format: text|json (default "text") --help-format string help output format: default|agent (default "default") --output string output format: agent|human (default: auto-detect via TTY) --verbose enable verbose output

SEE ALSO

apxy schema delete

Delete a schema

Synopsis

Delete an imported schema by its ID.

The —id flag is required. Use “apxy schema list” to find schema IDs.

apxy schema delete [flags]

Examples

apxy schema delete --id abc123

Options

--dry-run preview what would happen without executing -h, --help help for delete --id string schema ID

Options inherited from parent commands

--config string config file (default is ./configs/default.yaml) --error-format string error output format: text|json (default "text") --help-format string help output format: default|agent (default "default") --output string output format: agent|human (default: auto-detect via TTY) --verbose enable verbose output

SEE ALSO

apxy schema import

Import an OpenAPI schema from a file or URL

Synopsis

Import an OpenAPI specification from a local file or remote URL for traffic validation.

Flags: —name schema name (default: imported-schema) —file path to a local OpenAPI spec file —url URL to fetch an OpenAPI spec from

Either —file or —url is required.

apxy schema import [flags]

Examples

apxy schema import --name "my-api" --file ./openapi.yaml apxy schema import --name "petstore" --url "https://petstore.swagger.io/v2/swagger.json"

Options

--file string path to OpenAPI spec file -h, --help help for import --name string schema name --url string URL to fetch OpenAPI spec from

Options inherited from parent commands

--config string config file (default is ./configs/default.yaml) --error-format string error output format: text|json (default "text") --help-format string help output format: default|agent (default "default") --output string output format: agent|human (default: auto-detect via TTY) --verbose enable verbose output

SEE ALSO

apxy schema list

List all imported schemas

Synopsis

List all imported OpenAPI schemas, including their IDs, names, and import dates.

Flags: —format output format: json or toon (default: json)

apxy schema list [flags]

Examples

apxy schema list apxy schema list --format toon

Options

--format string output format: json|toon (default "json") -h, --help help for list -q, --quiet output only IDs, one per line

Options inherited from parent commands

--config string config file (default is ./configs/default.yaml) --error-format string error output format: text|json (default "text") --help-format string help output format: default|agent (default "default") --output string output format: agent|human (default: auto-detect via TTY) --verbose enable verbose output

SEE ALSO

apxy schema show

Show details of a specific schema

Synopsis

Show the full details of an imported schema by its ID.

The —id flag is required. Use “apxy schema list” to find schema IDs.

apxy schema show [flags]

Examples

apxy schema show --id abc123

Options

-h, --help help for show --id string schema ID

Options inherited from parent commands

--config string config file (default is ./configs/default.yaml) --error-format string error output format: text|json (default "text") --help-format string help output format: default|agent (default "default") --output string output format: agent|human (default: auto-detect via TTY) --verbose enable verbose output

SEE ALSO

apxy schema validate-recent

Validate recent traffic against all schemas

Synopsis

Validate the most recent captured traffic records against all imported schemas.

Flags: —limit number of recent records to validate (default: 20)

apxy schema validate-recent [flags]

Examples

apxy schema validate-recent --limit 50

Options

-h, --help help for validate-recent --limit int number of recent records to validate (default 20)

Options inherited from parent commands

--config string config file (default is ./configs/default.yaml) --error-format string error output format: text|json (default "text") --help-format string help output format: default|agent (default "default") --output string output format: agent|human (default: auto-detect via TTY) --verbose enable verbose output

SEE ALSO

apxy schema validate

Validate a traffic record against a schema

Synopsis

Validate a specific captured traffic record against an imported OpenAPI schema.

Flags: —record-id traffic record ID (required) —schema-id schema ID (required)

apxy schema validate [flags]

Examples

apxy schema validate --record-id rec123 --schema-id sch456

Options

-h, --help help for validate --record-id string traffic record ID --schema-id string schema ID

Options inherited from parent commands

--config string config file (default is ./configs/default.yaml) --error-format string error output format: text|json (default "text") --help-format string help output format: default|agent (default "default") --output string output format: agent|human (default: auto-detect via TTY) --verbose enable verbose output

SEE ALSO

Last updated on