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
Metadata
Release files for vedro-spec-compare 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vedro_spec_compare-0.9.0.tar.gz | 14.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vedro_spec_compare-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.5 kB
Release files / vedro_spec_compare-0.9.0.tar.gz
| Download URL | vedro_spec_compare-0.9.0.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b2eb1411c6ee37208236fce2628ef51d15257538931a7afb6dd23bf2e77f78c
|
|
BLAKE2b-256 checksum How to use checksums |
41e65efe300d0580556c0b8cbe61b013efdfec8164be3911a94090ca8849b345
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / vedro_spec_compare-0.9.0-py3-none-any.whl
| Download URL | vedro_spec_compare-0.9.0-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd6c84c8c3b2804c5cea332d1b91ef7a882e17bdc5b9f33ef3be65d26f6475de
|
|
BLAKE2b-256 checksum How to use checksums |
b14cc3a16bcd36fbf2eb7c866362b89ba9b7aa47f44b1efd79355cc2f7b25fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|