Convert

The qaskx-cli defintion convert command performs a conversion on the OpenAPI v2 definition input to a v3 of the OpenAPI

The command help is shown below.

Usage: qaskx-cli definition convert --v2=<v2 OpenAPI file> -o=<v3 OpenAPI file> [-v | --vv | --vvv | --silent] [-c=<conf file>] [--colourCLI] [--offline] [--env=<environment file>]

convert OpenAPI document to V3
                    
Options:            
      --v2          Input OpenAPI file name
  -o, --output      Output file name
      --overwrite   Overwrite existing file
  -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 convert --v2 https://petstore3.swagger.io/api/v3/openapi.json -o tests/petstore_v3.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:50 Completed conversion to tests/petstore_v3.json

Purpose

The purpose of the command is to provide a simple mechanism to convert v2 OpenAPI specifications to v3 OpenAPI specification.

THIS OPTION HAS FUTURE AUTOMATION COMING