Metadata-Version: 2.4
Name: cornice-apispec
Version: 0.1.0
Summary: OpenAPI spec generation for Cornice/Pyramid with Marshmallow and OneOfSchema support
License: BSD-3-Clause
License-File: LICENSE
Keywords: pyramid,openapi,apispec,marshmallow,cornice,swagger
Author: Robbin
Requires-Python: >=3.11,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pyramid
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: apispec (>=6.0.0)
Requires-Dist: cornice (>=6.0.0)
Requires-Dist: marshmallow (>=3.13.0,<4.0.0)
Requires-Dist: marshmallow-oneofschema (>=3.0.1,<4.0.0)
Requires-Dist: pyramid-apispec (>=0.4)
Project-URL: Homepage, https://github.com/cartaorobbin/cornice-apispec
Project-URL: Repository, https://github.com/cartaorobbin/cornice-apispec
Description-Content-Type: text/markdown

# cornice-apispec

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

Forked from [pycornmarsh](https://github.com/niccolofanton/pycornmarsh) with a fix for `OneOfSchema` component name collisions when multiple API versions define schemas with the same class name.

## Installation

```bash
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

```python
from cornice_apispec import get_spec

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

## License

BSD-3-Clause

