skillfed

openapi-spec-validator

OpenAPI 2.0 (aka Swagger) and OpenAPI 3 spec validator

openapi-spec-validator Permissive license Apache-2.0 Active 407 v0.9.0 released

Install

openapi-spec-validator on PyPI

pip

pip install openapi-spec-validator

uv

uv add openapi-spec-validator

poetry

poetry add openapi-spec-validator

Package 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

Development Status :: 4 - BetaIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

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

Read as markdown · JSON record · Source repository · Docs

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.
openapi spec validationswagger schema validatoropenapi 3 compliance checkervalidate openapi yamlopenapi specification validatorapi spec validation toolopenapi schema compliance

Similar packages