Validate
The qaskx-cli definition validate command performs a validation on the OpenAPI
definition as defined in the “devops.json” file.
THIS FEATURE IS EXPERIMENTAL
The command help is shown below.
Usage: qaskx-cli definition validate [(-d=<devops file> [--name=<service name>])| -s=<openAPI file> ] [-o=<output file>] [--overwrite][-v | --vv | --vvv | --silent] [-c=<conf file>] [--colourCLI] [--offline] [--env=<environment file>]
validate OpenAPI document
Options:
-d, --devops rediOps (devops.json) file path
-n, --name Service name filter
-o, --output Output file path (default "CONSOLE")
--overwrite Overwrite existing file
-s, --spec OpenAPI file to parse for lint
-v, --verbose Verbose logging
--vv Verbose logging level 3
--vvv Verbose logging level 5
--silent Silent running
--colourCLI Colour terminal and command line (env $QASKX_COLOUR_CLI)
-c, --conf Configuration file (env $QASKX_CONFIG_FILE)
--offline Offline mode (env $QASKX_OFFLINE)
--env Environment file to use (default ".env")
Purpose
The purpose of the command is to run a simple OpenAPI specification validation of the definition. The validation output can be saved to file.
Example - Petstore API
If your run the command below
qaskx-cli definition validate --spec https://petstore3.swagger.io/api/v3/openapi.json
The ouput to console will be something like:
______ ___ _______. __ ___ ___ ___
/ __ \ / \ / || |/ / \ \ / /
| | | | / ^ \ | (----`| ' / \ V /
| | | | / /_\ \ \ \ | < > <
| `--' '--. / _____ \ .----) | | . \ / . \
\_____\_____\/__/ \__\ |_______/ |__|\__\ /__/ \__\
qaskx-cli - command line tool
version - 0.0.5
url - https://docs.qaskx.one/qaskx-cli/
copyright - 2023 qaskx.one, usage license limited
which has no errors.
Example - rediOps API
If your run the command below
qaskx-cli definition validate --spec https://apicuriows.shaun.sku61.com/sharing/86f5f760-ac3f-4d6e-a0e4-3466cdaa0c5c?content=true
The ouput to console will be something like:
______ ___ _______. __ ___ ___ ___
/ __ \ / \ / || |/ / \ \ / /
| | | | / ^ \ | (----`| ' / \ V /
| | | | / /_\ \ \ \ | < > <
| `--' '--. / _____ \ .----) | | . \ / . \
\_____\_____\/__/ \__\ |_______/ |__|\__\ /__/ \__\
qaskx-cli - command line tool
version - 0.0.5
url - https://docs.qaskx.one/qaskx-cli/
copyright - 2023 qaskx.one, usage license limited
QX>>> 2024/03/24 21:00:01 invalid paths: invalid path /command/definition/convert: invalid operation POST: extra sibling fields: [encoding]
and this will have a few errors.