
OpenAPI Plugin for Steampipe
Use SQL to query introspection of the OpenAPI definition.
Quick start
Install
Download and install the latest OpenAPI plugin:
steampipe plugin install openapi
Configure your config file to include directories with OpenAPI definition files.
connection "openapi" {
plugin = "openapi"
# Paths is a list of locations to search for OpenAPI definition files
# Paths can be configured with a local directory, a remote Git repository URL, or an S3 bucket URL
# Refer https://hub.steampipe.io/plugins/turbot/openapi#supported-path-formats for more information
# Wildcard based searches are supported, including recursive searches
# Local paths are resolved relative to the current working directory (CWD)
# For example:
# - "*.json" matches all OpenAPI definition files in the CWD
# - "**/*.json" matches all OpenAPI definition files in the CWD and all sub-directories
# - "../*.json" matches all OpenAPI definition files in the CWD's parent directory
# - "steampipe*.json" matches all OpenAPI definition files starting with "steampipe" in the CWD
# - "/path/to/dir/*.json" matches all OpenAPI definition files in a specific directory
# - "/path/to/dir/main.json" matches a specific file
# If paths includes "*", all files (including non-OpenAPI definition files) in
# the CWD will be matched, which may cause errors if incompatible file types exist
# Defaults to CWD
paths = [ "*.json" ]
}
Run steampipe:
steampipe query
Query all the endpoints available for an API:
select
api_path,
operation_id,
summary,
deprecated,
tags
from
openapi_path;
+----------+---------------------+--------------------------+------------+--------+
| api_path | operation_id | summary | deprecated | tags |
+----------+---------------------+--------------------------+------------+--------+
| /get | listVersionsv2 | List API versions | false | <null> |
| /v2/get | getVersionDetailsv2 | Show API version details | false | <null> |
+----------+---------------------+--------------------------+------------+--------+
Developing
Prerequisites:
Clone:
git clone https://github.com/turbot/steampipe-plugin-openapi.git
cd steampipe-plugin-openapi
Build, which automatically installs the new version to your ~/.steampipe/plugins directory:
make
Configure the plugin:
cp config/* ~/.steampipe/config
vi ~/.steampipe/config/openapi.spc
Try it!
steampipe query
> .inspect openapi
Further reading:
Contributing
Please see the contribution guidelines and our code of conduct. All contributions are subject to the Apache 2.0 open source license.
help wanted issues: