Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

https://img.shields.io/docker/v/p1c2u/openapi-spec-validator.svg?color=%23086DD7&label=docker%20hub&sort=semver https://img.shields.io/pypi/v/openapi-spec-validator.svg https://travis-ci.org/python-openapi/openapi-spec-validator.svg?branch=master https://img.shields.io/codecov/c/github/python-openapi/openapi-spec-validator/master.svg?style=flat https://img.shields.io/pypi/pyversions/openapi-spec-validator.svg https://img.shields.io/pypi/format/openapi-spec-validator.svg https://img.shields.io/pypi/status/openapi-spec-validator.svg

About

OpenAPI Spec Validator is a Python library that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger), OpenAPI 3.0 and OpenAPI 3.1 specification. The validator aims to check for full compliance with the Specification.

Documentation

Check documentation to see more details about the features. All documentation is in the “docs” directory and online at openapi-spec-validator.readthedocs.io

Installation

pip install openapi-spec-validator

Alternatively you can download the code and install from the repository:

pip install -e git+https://github.com/python-openapi/openapi-spec-validator.git#egg=openapi_spec_validator

Usage

CLI (Command Line Interface)

Straight forward way:

openapi-spec-validator openapi.yaml

pipes way:

cat openapi.yaml | openapi-spec-validator -

docker way:

docker run -v path/to/openapi.yaml:/openapi.yaml --rm p1c2u/openapi-spec-validator /openapi.yaml

or more pythonic way:

python -m openapi_spec_validator openapi.yaml

For more details, read about CLI (Command Line Interface).

Python package

from openapi_spec_validator import validate_spec
from openapi_spec_validator.readers import read_from_filename

spec_dict, spec_url = read_from_filename('openapi.yaml')

# If no exception is raised by validate_spec(), the spec is valid.
validate_spec(spec_dict)

validate_spec({'openapi': '3.1.0'})

Traceback (most recent call last):
    ...
OpenAPIValidationError: 'info' is a required property

For more details, read about Python package.

License

Copyright (c) 2017-2023, Artur Maciag, All rights reserved. Apache v2

Metadata

Release files for openapi-spec-validator 0.6.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openapi-spec-validator 0.6.0a1
File Size Uploaded Provenance
openapi_spec_validator-0.6.0a1.tar.gz 33.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for openapi-spec-validator 0.6.0a1
File Interpreter ABI Platform
openapi_spec_validator-0.6.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 66.0 kB

Release files / openapi_spec_validator-0.6.0a1.tar.gz

Download URL openapi_spec_validator-0.6.0a1.tar.gz
Size 33.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a146d51505103616e292333474bde90bc45b24be320675fad0e529c643aaa4bd
BLAKE2b-256 checksum
How to use checksums
cd69f17be3de82b1c4967c2fbe6458a36b9e35daecb79372f57806ae3b0745bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1039-azure

Release files / openapi_spec_validator-0.6.0a1-py3-none-any.whl

Download URL openapi_spec_validator-0.6.0a1-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38e8c3d081fe33cfee717559c037df5755b012c728c61484ef7992ed806cfcbb
BLAKE2b-256 checksum
How to use checksums
e8c743dea3fb70e9cf6df732c119a416f77e4b96a8ff2c2149d6066c244c7cd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Linux/5.15.0-1039-azure

Security for openapi-spec-validator 0.6.0a1

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page