# generated by datamodel-codegen:
#   filename:  usable_discriminator_invalid_dotted_models.yaml
# generated by datamodel-codegen:
#   filename:  usable_discriminator_invalid_dotted_models.yaml

from typing import Literal

from pydantic import BaseModel, Field


class Cat(BaseModel):
    type: Literal['cat']


class Dog(BaseModel):
    type: Literal['dog']


class PetOwner(BaseModel):
    pet: Cat | Dog | None = Field(None, discriminator='type')


class Literal1(BaseModel):
    bar: str | None = None
# generated by datamodel-codegen:
#   filename:  usable_discriminator_invalid_dotted_models.yaml
# generated by datamodel-codegen:
#   filename:  usable_discriminator_invalid_dotted_models.yaml

from pydantic import BaseModel


class Literal(BaseModel):
    foo: str | None = None
# generated by datamodel-codegen:
#   filename:  usable_discriminator_invalid_dotted_models.yaml
