Skip to Content

apxy schema

Import OpenAPI schemas and validate captured traffic against them.

apxy schema import

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

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"
FlagTypeDefaultDescription
--filestring-Path to OpenAPI spec file
--namestring-Schema name
--urlstring-URL to fetch OpenAPI spec from

Either --file or --url is required.


apxy schema list

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

apxy schema list [flags]
FlagTypeDefaultDescription
--formatstringjsonOutput format: json or toon
-q, --quiet-falseOutput only IDs, one per line

apxy schema show

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

apxy schema show [flags]

Examples:

apxy schema show --id abc123
FlagTypeDefaultDescription
--idstring-Schema ID (required)

apxy schema delete

Delete an imported schema by its ID.

apxy schema delete [flags]

Examples:

apxy schema delete --id abc123
FlagTypeDefaultDescription
--dry-run-falsePreview without executing
--idstring-Schema ID (required)

apxy schema validate

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

apxy schema validate [flags]

Examples:

apxy schema validate --record-id rec123 --schema-id sch456
FlagTypeDefaultDescription
--record-idstring-Traffic record ID (required)
--schema-idstring-Schema ID (required)

apxy schema validate-recent

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

apxy schema validate-recent [flags]

Examples:

apxy schema validate-recent --limit 50
FlagTypeDefaultDescription
--limitint20Number of recent records to validate

Inherited Options

FlagTypeDefaultDescription
--configstring./configs/default.yamlConfig file path
--error-formatstringtextError output format: text or json
--help-formatstringdefaultHelp output format: default or agent
--verbose-falseEnable verbose output
Last updated on