Validate OpenAPI specs by sending traffic
Project description
OpenAPI Traffic Validator
CLI Tool that validates an OpenAPI specification against a live application using Newman. Optionally generates the OpenAPI spec from code using NightVision.
Cheatsheet
api-validator yolo \
--config-file config.yml \
--swagger-file juice-shop.yml \
--server http://localhost:3000 \
--app-name juice-shop
It will generate a file called ./summary.md in the current directory.
You can split it up into smaller parts too:
# Install prerequisites
api-validator install
# Extract an API with NightVision
api-validator generate \
--server https://api.example.com \
--output openapi-spec.yml
# Convert from OpenAPI to Postman collection
api-validator convert \
--server http://localhost:3000 \
--swagger-file examples/nv-juice-shop.yml \
--postman-file examples/collection.json
# Skip postman request
api-validator exclude postman-request \
--postman-file examples/collection.json \
--config-file examples/config.yml \
--app-name juice-shop
# Run newman
api-validator validate \
--postman-file examples/collection.json \
--output-dir examples/newman-data \
--app-name juice-shop
# Generate a markdown report
api-validator report \
--data-dir examples/newman-data \
--output-file examples/juice-shop-summary.md \
--config-file examples/config.yml
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
api-validator-0.1.0.tar.gz
(17.4 kB
view hashes)
Built Distribution
Close
Hashes for api_validator-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3557c1cd84ee29b12b814f6e0411ed204c817fc54fec9be2e9b853eb5b8f1ba |
|
MD5 | 88e5e0790611e04c911b29bcec9361bd |
|
BLAKE2b-256 | de249adaf87f01d65a05a7b2ed557d05ac4e4f6057d1e506854dac8cffc44398 |