Open
Description
When allOf
refers to schema that is not an object but a string, sphinx-build fails when generating examples with a following error
File "/home/stativ/development/workdir/astra-open-api/.venv/lib/python3.13/site-packages/sphinxcontrib/openapi/schema_utils.py", line 67, in example_from_schema
example.update(example_from_schema(sub_schema))
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: dictionary update sequence element #0 has length 1; 2 is required
Minimal Example
test.yaml
openapi: 3.0.3
info:
version: 1.0.0
title: Bug example
paths:
/test:
get:
responses:
'200':
description: Success.
content:
application/json:
schema:
title: SomeTitle
type: object
properties:
timestamp:
allOf:
- $ref: '#/components/schemas/Timestamp'
components:
schemas:
Timestamp:
type: string
example: 2022-09-12 13:09:16:18
index.rst
.. openapi:: test.yaml
:generate-examples-from-schemas:
SW Versions
- sphinx-openapi commit e2c4473
- sphinx 8.2.3
Metadata
Metadata
Assignees
Labels
No labels