--- id: openapi-pydantic version: "0.5.1" license: MIT license_treatment: permissive maintenance: aging --- # openapi-pydantic — Pydantic OpenAPI schema implementation License: permissive · Maintenance: aging · Popularity: top 1,000 on PyPI ## Install pip install openapi-pydantic uv add openapi-pydantic poetry add openapi-pydantic ## Description # openapi-pydantic [![PyPI](https://img.shields.io/pypi/v/openapi-pydantic)](https://pypi.org/project/openapi-pydantic/) [![PyPI - License](https://img.shields.io/pypi/l/openapi-pydantic)](https://github.com/mike-oakley/openapi-pydantic/blob/main/LICENSE) OpenAPI schema implemented in [Pydantic](https://github.com/samuelcolvin/pydantic). Both Pydantic 1.8+ and 2.x are supported. The naming of the classes follows the schema in [OpenAPI specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.1.md#schema). > This library is forked from [OpenAPI Schema Pydantic](https://github.com/kuimono/openapi-schema-pydantic) (at version [1.2.4](https://github.com/kuimono/openapi-schema-pydantic/releases/tag/v1.2.4)) which is no longer actively maintained. ## Installation `pip install openapi-pydantic` ## Try me ```python from openapi_pydantic import OpenAPI, Info, PathItem, Operation, Response # Construct OpenAPI by pydantic objects open_api = OpenAPI( info=Info( title="My own API", version="v0.0.1", ), paths={ "/ping": PathItem( get=Operation( responses={ "200":... ## AI interpretation — verify before relying Provides Pydantic data models for the OpenAPI 3.1.1 specification, enabling programmatic construction, validation, and serialization of OpenAPI schemas with full support for Pydantic 1.8+ and 2.x. Verdict: A stable, low-friction library for working with OpenAPI schemas as typed Pydantic objects. No known vulnerabilities and permissive licensing make it safe to adopt. Maintenance has slowed but the project remains active and compatible with current Pydantic versions. [View on SkillFed](https://skillfed.io/packages/openapi-pydantic) · [View on PyPI](https://pypi.org/project/openapi-pydantic/)