$npx skillfedfor your agent

apispec-oneofschema

Plugin for apispec providing support for Marshmallow-OneOfSchema schemas

With conditionsPyPI Application FrameworksReleased Jul 2025237.7K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — apispec_oneofschema-3.0.2-py3-none-any.whl
v3.0.2 · released 2025-07-28 · 3 runtime deps: apispec, marshmallow, marshmallow-oneofschema

Yes, if you use Marshmallow OneOfSchema and need to generate OpenAPI 3.0+ documentation. The plugin fills a specific gap—apispec does not natively handle OneOfSchema discriminators—and has no known vulnerabilities. The aging maintenance status is a minor concern but not a blocker for a stable, focused tool. Install if this matches your stack; skip if you don't use OneOfSchema or target earlier OpenAPI versions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires OpenAPI version 3.0.0 or greater; earlier versions do not support discriminator name-to-definition mapping.
  • Low friction installation with three straightforward runtime dependencies.
  • Maintenance status is aging—last release was 382 days ago—but the repository remains active and unarchived, suggesting the package is stable rather than abandoned.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.

last release 2025-07-28 (382 days) · last repo commit 2025-07-28 · 12 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 237,688 downloads/mo, #8,954 on PyPI

Verify before relying

pip install apispec-oneofschema

from apispec import APISpec
from apispec_oneofschema import MarshmallowPlugin
from marshmallow_oneofschema import OneOfSchema

spec = APISpec(
    title='Example',
    version='1.0.0',
    openapi_version='3.0.0',
    plugins=[MarshmallowPlugin()]
)
spec.components.schema('MySchema', schema=YourOneOfSchema)
  • Whether the package works with current versions of apispec and marshmallow-oneofschema without breaking changes.
  • Python version compatibility (requires_python is unspecified in metadata).
Same gist for agents: .md · .json

What it is and what it does

apispec-oneofschema is a plugin for apispec that bridges Marshmallow's OneOfSchema polymorphic type system with OpenAPI 3.0+ documentation. It automatically generates discriminator-based schema definitions in your OpenAPI spec, mapping polymorphic types to their corresponding schemas with proper references.

When you register a OneOfSchema with apispec using this plugin, it produces OpenAPI components that include a discriminator object with a propertyName and a mapping of type values to schema references. This lets API consumers understand which schema variant applies based on a discriminator field in the JSON payload, and it enables code generation tools to handle polymorphic responses correctly.

Use it for

  • Document REST APIs with polymorphic request or response bodies where the type is determined by a discriminator field.
  • Generate OpenAPI specs for services using Marshmallow OneOfSchema for type-safe serialization of union types.
  • Enable API client generators to produce correct deserialization code for discriminator-based polymorphic types.
  • Validate and document complex data models with multiple schema variants in a single endpoint.
  • Integrate Marshmallow schema definitions directly into OpenAPI documentation without manual discriminator mapping.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you use Marshmallow OneOfSchema and need to generate OpenAPI 3.0+ documentation.

The plugin fills a specific gap—apispec does not natively handle OneOfSchema discriminators—and has no known vulnerabilities. The aging maintenance status is a minor concern but not a blocker for a stable, focused tool. Install if this matches your stack; skip if you don't use OneOfSchema or target earlier OpenAPI versions.

Install

apispec-oneofschema on PyPI

Before you install

Low friction installation with three straightforward runtime dependencies. Maintenance status is aging—last release was 382 days ago—but the repository remains active and unarchived, suggesting the package is stable rather than abandoned.

Requires OpenAPI version 3.0.0 or greater; earlier versions do not support discriminator name-to-definition mapping.

License in practice

MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.

Quickstart

pip install apispec-oneofschema

from apispec import APISpec
from apispec_oneofschema import MarshmallowPlugin
from marshmallow_oneofschema import OneOfSchema

spec = APISpec(
    title='Example',
    version='1.0.0',
    openapi_version='3.0.0',
    plugins=[MarshmallowPlugin()]
)
spec.components.schema('MySchema', schema=YourOneOfSchema)

Verify before relying

  • Whether the package works with current versions of apispec and marshmallow-oneofschema without breaking changes.
  • Python version compatibility (requires_python is unspecified in metadata).

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
apispecmarshmallowmarshmallow-oneofschema
MaintenanceAging 382 days since the last release
Last repo commit
First released
Downloads237,688 / month, #8,954 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: apispec_oneofschema-3.0.2-py3-none-any.whl

Tags

Capabilities
apispec marshmallow pluginopenapi oneof schemapolymorphic schema documentationmarshmallow discriminatorapi spec schema generationopenapi 3.0 discriminator
Topics
openapi-generationschema-validation

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “apispec marshmallow plugin”

  • apispec-oneofschemaExtends apispec to generate OpenAPI 3.0+ documentation for…
  • apispecGenerates OpenAPI specification documents from Python code,…
  • flask-apispecflask-apispec decorates Flask view functions and classes to…

Give your agent the search over MCP, or paste the wish link into any chat.

More Application Frameworks packages

fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
textual Worth it
PyPI · Application Frameworks · released Jun 2026

Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.

Install it if you're developing CLI tools, dashboards, or interactive terminal applications.

MITpure Python
443.6Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
mcp Worth it
PyPI · Application Frameworks · released Jul 2026

Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.

Install it if you need to build or connect to servers.

MITpure Python · 3.10+
319.3Mdownloads / mo
Werkzeug Worth it
PyPI · Application Frameworks · released Apr 2026

Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.

BSD-3-Clausepure Python · 3.9+
268.1Mdownloads / mo

See also marshmallow-oneofschema · marshmallow-fastoneofschema · apispec · apispec-webframeworks · marshmallow-jsonschema · marshmallow-polyfield · flask-apispec · dataclasses-jsonschema · voluptuous-openapi · marshmallow-mongoengine