Skip to main content

cornice-apispec

Docs

OpenAPI spec generation for Cornice/Pyramid with Marshmallow and OneOfSchema support.

Documentation: https://cartaorobbin.github.io/cornice-apispec/

Forked from pycornmarsh with a fix for OneOfSchema component name collisions when multiple API versions define schemas with the same class name.

Installation

pip install cornice-apispec

The Problem

When using marshmallow-oneofschema with multiple API versions (e.g. v1.PartSchema and v3.PartSchema), the OpenAPI spec generator would raise DuplicateComponentNameError because both schemas resolve to the same component name PartSchema.

The Fix

OneofOpenAPIConverter now detects name collisions and automatically qualifies the component name with a version prefix extracted from the schema's module path (e.g. V3PartSchema).

Usage

from cornice_apispec import get_spec

# In your Pyramid app
config.include("cornice_apispec")

See Getting started for the per-version spec module and the pcm_* view predicates.

Development

Reopen this repository in the dev container (Python 3.12, Poetry). After the container is created, dependencies are installed with poetry install.

poetry run pytest
poetry run ruff check src/
poetry run mkdocs serve

License

BSD-3-Clause

Metadata

Release files for cornice-apispec 0.1.1

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

Source distribution (sdist)

Source distribution for cornice-apispec 0.1.1
File Size Uploaded Provenance Actions
cornice_apispec-0.1.1.tar.gz 7.4 kB With provenance Details for cornice_apispec-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cornice-apispec 0.1.1
File Interpreter ABI Platform Actions
cornice_apispec-0.1.1-py3-none-any.whl Python 3 none any Details for cornice_apispec-0.1.1-py3-none-any.whl

Total release size: 16.3 kB

Release files / cornice_apispec-0.1.1.tar.gz

Download URL cornice_apispec-0.1.1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3641761b7678da11810af559930c8b995e7e1768f3d1fae9ec1837029ca74e85
BLAKE2b-256 checksum
How to use checksums
74008cf9010c306697afdb67bab7a80bcbd37e3eb24ecbdab7a29c73aa6a73e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / cornice_apispec-0.1.1-py3-none-any.whl

Download URL cornice_apispec-0.1.1-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7317644cb9b20c6449419a375bcfc55197e8916a37d47e06cc7f160862e6f94f
BLAKE2b-256 checksum
How to use checksums
b91ed71b3bd9cc5e72c4d61f2453e2b8d8dccd7fc6b4acbb82e2a54a4f9b3c6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for cornice-apispec 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cornice_apispec-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

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

0.1.1 This release

2 release files Full provenance

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