OpenAPI spec compare
Project description
vedro-spec-compare
Description
vedro-spec-compare is a tool for comparing two OpenAPI specifications and generating reports.
Installation
pip3 install vedro-spec-compare
Usage
Help
vsc --help
usage: vsc [-h] {coverage,discrepancy,changes} ...
vedro-spec-compare commands
positional arguments:
{coverage,discrepancy,changes}
Available commands
coverage Generate coverage report
discrepancy Generate discrepancy report
changes Generate changes report
options:
-h, --help show this help message and exit
Coverage
The coverage command compares a "golden" OpenAPI spec with a "testing" spec and generates a coverage report.
Sample report.
vsc coverage --help
usage: vsc coverage [-h] [--report-path REPORT_PATH] golden_spec_path testing_spec_path
positional arguments:
golden_spec_path Path to the golden OpenAPI spec
testing_spec_path Path to the testing OpenAPI spec
options:
-h, --help show this help message and exit
--report-path REPORT_PATH
The path of the coverage report
Examples
From yml files
vsc coverage golden_spec.yml testing_spec.yml
google-chrome coverage.html
From json files
vsc coverage golden_spec.json testing_spec.json
google-chrome coverage.html
From urls
vsc coverage https://raw.githubusercontent.com/kvs8/vedro-spec-compare/refs/heads/main/tests/e2e/test_data/coverage/golden.yml https://raw.githubusercontent.com/kvs8/vedro-spec-compare/refs/heads/main/tests/e2e/test_data/coverage/testing.yml
google-chrome coverage.html
With report path
vsc coverage golden_spec.yml testing_spec.yml --report-path coverage_report.html
google-chrome coverage_report.html
Discrepancy
The discrepancy command highlights differences or inconsistencies between a "golden" spec and a "testing" spec.
Sample report.
vsc discrepancy --help
usage: vsc discrepancy [-h] [--report-path REPORT_PATH] golden_spec_path testing_spec_path
positional arguments:
golden_spec_path Path to the golden OpenAPI spec
testing_spec_path Path to the testing OpenAPI spec
options:
-h, --help show this help message and exit
--report-path REPORT_PATH
The path of the discrepancy report
Examples
From yml files
vsc discrepancy golden_spec.yml testing_spec.yml
google-chrome discrepancy.html
From json files
vsc discrepancy golden_spec.json testing_spec.json
google-chrome discrepancy.html
From urls
vsc discrepancy https://raw.githubusercontent.com/kvs8/vedro-spec-compare/refs/heads/main/tests/e2e/test_data/discrepancy/golden.yml https://raw.githubusercontent.com/kvs8/vedro-spec-compare/refs/heads/main/tests/e2e/test_data/discrepancy/testing.yml
google-chrome discrepancy.html
With report path
vsc discrepancy golden_spec.yml testing_spec.yml --report-path coverage_report.html
google-chrome discrepancy.html
Changes
The changes command shows the changes between two versions of the specification: the current and the previous.
Sample report.
vsc changes --help
usage: vsc changes [-h] [--report-path REPORT_PATH] current_spec_path previous_spec_path
positional arguments:
current_spec_path Path to the current OpenAPI spec
previous_spec_path Path to the previous OpenAPI spec
options:
-h, --help show this help message and exit
--report-path REPORT_PATH
The path of the changes report
Examples
From yml files
vsc changes current_spec.yml previous_spec.yml
google-chrome changes.html
From json files
vsc changes current_spec.json previous_spec.json
google-chrome changes.html
From urls
vsc changes https://raw.githubusercontent.com/kvs8/vedro-spec-compare/refs/heads/main/tests/e2e/test_data/changes/current.yml https://raw.githubusercontent.com/kvs8/vedro-spec-compare/refs/heads/main/tests/e2e/test_data/changes/previous.yml
google-chrome changes.html
With report path
vsc changes current_spec.yml previous_spec.yml --report-path changes_report.html
google-chrome changes.html
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vedro_spec_compare-0.5.0.tar.gz.
File metadata
- Download URL: vedro_spec_compare-0.5.0.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a3dac45e18fc1e4ab15f702ced95380cf3e6bedd66e9a6efbfc4fbf9e654a82
|
|
| MD5 |
067a5f0fdf10fbb2a7540a4df50985fc
|
|
| BLAKE2b-256 |
fe9bd84d0dd4af92c0749b9121d372f2d8fdd25d4a06760b89beb95c74b3c3fd
|
File details
Details for the file vedro_spec_compare-0.5.0-py3-none-any.whl.
File metadata
- Download URL: vedro_spec_compare-0.5.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0490105616e6435e8bc28ea0170d5f691a1eb66453cb83cb2f43ab56e3054b67
|
|
| MD5 |
ab53869f494e0b9e2629f1a2875428f2
|
|
| BLAKE2b-256 |
4d0608de62c92593d283156cbce68bf7a34c3f86a33e97a3a0e84434b31565db
|