openapi-spec-validator
OpenAPI 2.0 (aka Swagger) and OpenAPI 3 spec validator
Install
openapi-spec-validator on PyPI
pip
pip install openapi-spec-validatoruv
uv add openapi-spec-validatorpoetry
poetry add openapi-spec-validatorPackage facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — jsonschema, jsonschema-path, lazy-object-proxy, openapi-schema-validator, pydantic, pydantic-settings |
| Maintenance | actively maintained — 85 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: openapi_spec_validator-0.9.0-py3-none-any.whl
Keywords: openapi, swagger, schema
About openapi-spec-validator
from the package's own PyPI description — quoted content, verbatim
OpenAPI Spec validator
.. image:: https://img.shields.io/docker/v/pythonopenapi/openapi-spec-validator.svg?color=%23086DD7&label=docker%20hub&sort=semver :target: https://hub.docker.com/r/pythonopenapi/openapi-spec-validator .. image:: https://img.shields.io/pypi/v/openapi-spec-validator.svg :target: https://pypi.python.org/pypi/openapi-spec-validator .. image:: https://img.shields.io/codecov/c/github/python-openapi/openapi-spec-validator/master.svg?style=flat :target: https://codecov.io/github/python-openapi/openapi-spec-validator?branch=master .. image:: https://img.shields.io/pypi/pyversions/openapi-spec-validator.svg :target: https://pypi.python.org/pypi/openapi-spec-validator .. image:: https://img.shields.io/pypi/format/openapi-spec-validator.svg :target: https://pypi.python.org/pypi/openapi-spec-validator .. image:: https://img.shields.io/pypi/status/openapi-spec-validator.svg :target: https://pypi.python.org/pypi/openapi-spec-validator
About
OpenAPI Spec Validator is a CLI, pre-commit hook and python package that validates OpenAPI Specs against the `OpenAPI 2.0 (aka...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Validates OpenAPI specifications (2.0, 3.0, 3.1, and 3.2) for compliance with the official OpenAPI standard, available as a Python package, CLI tool, and pre-commit hook.
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release (85 days ago) and active repository status, though it carries six runtime dependencies including jsonschema, pydantic, and openapi-schema-validator.
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.
Usage
pip install openapi-spec-validator
from openapi_spec_validator import validate
from openapi_spec_validator.readers import read_from_filename
spec_dict, base_uri = read_from_filename('openapi.yaml')
validate(spec_dict)
Requires Python 3.10 or later (supports 3.10–3.14); the optional jsonschema-rs backend requires separate installation if performance tuning via OPENAPI_SPEC_VALIDATOR_SCHEMA_VALIDATOR_BACKEND=jsonschema-rs is desired.
Verdict: A well-maintained, actively developed validator for OpenAPI specifications across all major versions, with low install friction and permissive licensing. No known vulnerabilities, broad Python 3.10+ support, and top-1000 PyPI popularity make it a reliable choice for API spec validation in CI/CD pipelines and development workflows.
Needs verification
- Whether the six runtime dependencies (jsonschema, jsonschema-path, lazy-object-proxy, openapi-schema-validator, pydantic, pydantic-settings) introduce any transitive security concerns or version conflicts in typical deployments.
- Performance characteristics and memory footprint when validating large or complex OpenAPI specifications.
Similar packages
permissive · top 1,000 on PyPI
openapi-pydanticpermissive · top 1,000 on PyPI
kubernetespermissive · top 1,000 on PyPI
jsonschema-pathpermissive · top 1,000 on PyPI
rfc3339-validatorpermissive · top 1,000 on PyPI
referencingpermissive · top 100 on PyPI
rfc3986-validatorpermissive · top 1,000 on PyPI
fastapipermissive · top 100 on PyPI
fastjsonschemapermissive · top 1,000 on PyPI
argparsepermissive · top 1,000 on PyPI