Lint

The qaskx-cli definition lint command performs a lint on the api definition as defined in the “devops.json” file.

The service is defined in the rediOps (devops.json) file as a reference to an OpenAPI specification. The lint process is performed to the linked OpenAPIs specifications in the rediOps file. You can also perform a lint process on an OpenAPI specification using the -spec option.

The lint is performed using the internal lint process. Alternatively you can elect to use the qaskx-cli run lint command to use a docker lint process.

The command help is shown below.

Usage: qaskx-cli definition lint [(-d=<devops file>  [--name=<service name>])| -s=<openAPI file> ] [--validate] [-o=<output file>] [--overwrite][-v | --vv | --vvv | --silent] [-c=<conf file>] [--colourCLI] [--offline] [--env=<environment file>]

Run lint process on OpenAPI document
                    
Options:            
  -d, --devops      rediOps (devops.json) file path
  -n, --name        Service name filter
      --validate    Validate API definition
  -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")

Example

If your run the command below

qaskx-cli   definition lint --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

QX>>> 2024/03/24 20:59:47 error reading C:\Users\tom\source\qaskx.site\config\openapi_lint.yml file.  Error: open C:\Users\tom\source\qaskx.site\config\openapi_lint.yml: The system cannot find the file specified.