Skip to main content

OpenAPI spec compare

Project description

vedro-spec-compare

PyPI Python Version

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} ...

vedro-spec-compare commands

positional arguments:
  {coverage,discrepancy}
                        Available commands
    coverage            Generate coverage report
    discrepancy         Generate discrepancy report

options:
  -h, --help            show this help message and exit

Coverage

Coverage report

The coverage command compares a "golden" OpenAPI spec with a "testing" spec and generates a coverage 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

Discrepancy report

The discrepancy command highlights differences or inconsistencies between a "golden" spec and a "testing" spec.

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 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vedro_spec_compare-0.2.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vedro_spec_compare-0.2.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file vedro_spec_compare-0.2.0.tar.gz.

File metadata

  • Download URL: vedro_spec_compare-0.2.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for vedro_spec_compare-0.2.0.tar.gz
Algorithm Hash digest
SHA256 702875def7a2b6b45d8fabc0177e961a6eae5ef76b99d3cbadb022b7c08a362f
MD5 2cd6728fce972c1f29036135dbea9027
BLAKE2b-256 1b374c07bf6d72ad12d3bdb07d33fb6d674682282dbdea8ee53fe528b2d2b307

See more details on using hashes here.

File details

Details for the file vedro_spec_compare-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vedro_spec_compare-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36d78ac3c0460360f2b208392437cda6e3bd208b344da03100bfef90038f675a
MD5 9b2b6c5ca0bdd1c7ade654a38c51ae29
BLAKE2b-256 a2bb35b288a9fe2a3065ca736a5653dcfaefefd5f500217c6e1d2e9c2d81c400

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page