|
|
|
@ -4,8 +4,6 @@ don't accumulate duplicate $ref entries in anyOf arrays. |
|
|
|
See https://github.com/fastapi/fastapi/pull/14463 |
|
|
|
""" |
|
|
|
|
|
|
|
from typing import Union |
|
|
|
|
|
|
|
from fastapi import FastAPI |
|
|
|
from fastapi.testclient import TestClient |
|
|
|
from inline_snapshot import snapshot |
|
|
|
@ -23,7 +21,7 @@ class ModelB(BaseModel): |
|
|
|
app = FastAPI( |
|
|
|
responses={ |
|
|
|
500: { |
|
|
|
"model": Union[ModelA, ModelB], |
|
|
|
"model": ModelA | ModelB, |
|
|
|
"content": {"application/json": {"examples": {"Case A": {"value": "a"}}}}, |
|
|
|
} |
|
|
|
} |
|
|
|
|