|
|
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Union |
|
|
|
from fastapi import FastAPI |
|
|
|
from fastapi.testclient import TestClient |
|
|
|
from inline_snapshot import snapshot |
|
|
|
from pydantic import BaseModel, Field, Tag |
|
|
|
from pydantic import BaseModel, Field |
|
|
|
from typing_extensions import Annotated, Literal |
|
|
|
|
|
|
|
from .utils import needs_pydanticv2 |
|
|
|
@ -11,6 +11,8 @@ from .utils import needs_pydanticv2 |
|
|
|
|
|
|
|
@needs_pydanticv2 |
|
|
|
def test_discriminator_pydantic_v2() -> None: |
|
|
|
from pydantic import Tag |
|
|
|
|
|
|
|
app = FastAPI() |
|
|
|
|
|
|
|
class FirstItem(BaseModel): |
|
|
|
|