Swaggertest
This is a very simple tool which tests swagger (OpenAPI) specifications. In particular, it checks the schemas provided in the 'components/schemas' section of the document against any examples provided along with the schemas.
Installation
$ pip install swaggertest
Usage
$ swaggertest --help
usage: swaggertest [--version] [-v | -q] [--log-file LOG_FILE] [-h] [--debug]
[--pdb]
Swagger testing tool
optional arguments:
--version show program's version number and exit
-v, --verbose Increase verbosity of output. Can be repeated.
-q, --quiet Suppress output except warnings and errors.
--log-file LOG_FILE Specify a file to log output. Disabled by default.
-h, --help Show help message and exit.
--debug Show tracebacks on errors.
--pdb
Commands:
complete print bash completion command (cliff)
help print detailed help for another command (cliff)
test-schemas Validate examples against schemas
The main sub-command is test-schemas:
$ swaggertest help test-schemas
usage: swaggertest test-schemas [-h] [-d] [-p PATH] [-s] filename
Validate examples against schemas
positional arguments:
filename
optional arguments:
-h, --help show this help message and exit
-d, --detail
-p PATH, --path PATH Path to where the schemas are located
-s, --strict Default to 'allowExtraProperties: false'
To test a spec, just provide it as the filename argument. You can also
provide a path argument to specify where the schemas are to be found:
$ swaggertest test petstore.json --path '/definitions' --detail --strict
Validated 6 schemas:
- 0 had errors
Metadata
Release files for swaggertest 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| swaggertest-0.1.1.tar.gz | 4.5 kB | Without provenance | Details for swaggertest-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| swaggertest-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for swaggertest-0.1.1-py3-none-any.whl |
Total release size: 13.8 kB
Release files / swaggertest-0.1.1.tar.gz
| Download URL | swaggertest-0.1.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
387c251e323e19daf80d3e0599f8d43c1e6032c1be96d9edc41e6bc8eb8359b0
|
|
BLAKE2b-256 checksum How to use checksums |
e1159c842bf962fac38bef86f0d992ea193b45c21b33ea3d2eddac3627593857
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
|
Release files / swaggertest-0.1.1-py3-none-any.whl
| Download URL | swaggertest-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff2f9d40b82be796546650df0816606be3d8baeea064c07194f0a180fc8f6b34
|
|
BLAKE2b-256 checksum How to use checksums |
bbe2d20e5e018c77b9e20da3ee270485672235672d26887ff314711f76502c08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
|
Security for swaggertest 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.