Step 3: Filter extract

Having an extract of the fields / columns in an OpenAPI specification is on the path of reducing effort and improving development velocity. You can feed the extract data to your data lineage tools or just for automated documentation.

The tool can also perform some basic filtering of the OpenAPI data. The command below uses a more complex API then the Pet Store API. The OpenAPI used below is for the rediOps definition

For the filtering we will base it on the schemas starting with the letters deploy

qaskx-cli definition extract --category basic --key schema=^deploy.* --spec https://apicuriows.shaun.sku61.com/sharing/b50006fc-510a-466c-bfa7-3ba808f52d47?content=true -v

The console output will look something like the below. With the filteringin place our list is much smaller then the first examples.

	      ______           ___           _______. __  ___ ___   ___ 
	     /  __  \         /   \         /       ||  |/  / \  \ /  / 
	    |  |  |  |       /  ^  \       |   (----`|  '  /   \  V  /  
	    |  |  |  |      /  /_\  \       \   \    |    <     >   <   
	    |  `--'  '--.  /  _____  \  .----)   |   |  .  \   /  .  \  
	     \_____\_____\/__/     \__\ |_______/    |__|\__\ /__/ \__\ 
																   															 
	
          qaskx-cli  - command line tool 
          version     - 0.0.5
          url         - https://docs.qaskx.one/qaskx-cli/
          copyright   - 2023 qaskx.one, usage license limited

HD			C:/Users/tom/AppData/Local/Temp/QASKX1733563714/openapifile.json
SC	deploy-model	Provides information of the commands o...				1	guide	string		0	500	Link to documentation for the topic
SC	deploy-model	Provides information of the commands o...				2	playbook	string		0	500	Playbook parameters
SC	deploy-model	Provides information of the commands o...				3	commands	commands-model		0	-1	Commands are executed by the engine.  ...
SC	deploy-model	Provides information of the commands o...				4	deploy	engine-model		0	-1	Engine details as used for apis, build...
SC	deploy-model	Provides information of the commands o...				5	id	string		0	40	Unique identifier for record
QX>>> 2024/03/24 21:00:08 Completed extract of OpenAPI data

Lets save this output to file as record of our filtered OpenAPI specification.

qaskx-cli definition extract --category basic --key schema=^deploy.* --spec https://apicuriows.shaun.sku61.com/sharing/b50006fc-510a-466c-bfa7-3ba808f52d47?content=true --output rediops_api.csv

The console output will look something like the below when saving to file.

	      ______           ___           _______. __  ___ ___   ___ 
	     /  __  \         /   \         /       ||  |/  / \  \ /  / 
	    |  |  |  |       /  ^  \       |   (----`|  '  /   \  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:09 Output produced to file 'rediops_api.csv'

You can view the results using Excel and opening file rediops_api.csv

There you have an example of filtering the extracts from the OpenAPI. Other filtering options are available that are explained in the command reference for definition extract

To finish up lets move onto the next Step.

You could and should use Excel filtering on the CSV if your selection criteria are complex.