Open
Description
Describe the bug
When array type is nested under anyOf it is rendered in quite a raw state, no description is shown at all.
Expected behavior
Description of currently selected array should be visible.
Minimal reproducible OpenAPI snippet(if possible)
Api file:
api.json
Generated with Python script
from fastapi import FastAPI
import json
from typing import Annotated
from pydantic import RootModel, Field
class Euler3(RootModel[Annotated[list[float], Field(min_length=3, max_length=3)]]):
"""Euler angles in degrees"""
class Quaternion(RootModel[Annotated[list[float], Field(min_length=4, max_length=4)]]):
"""Orientation defined by quaternion XYZW. It should be normalized."""
class Rotation(RootModel[Euler3 | Quaternion]):
"""Rotation in 3D world"""
app = FastAPI(
title="Test",
)
@app.post("/rotation")
async def rotation(r: Rotation) -> Rotation:
return Rotation
schema = app.openapi()
if __name__ == "__main__":
import sys
json.dump(app.openapi(), sys.stdout)
Screenshots
ReDoc view generated by https://redocly.github.io/redoc/:
For reference, view generated with swagger keeps the descriptions: https://editor.swagger.io/
Additional context
I've tried with explicit hideOneOfDescription = false
, no change.