}
INVALID_LOCATION_TEMPL = (
    'Unsupported APIPropertyLocation "{location}"'
    " for parameter {name}. "
    + f"Valid values are {[loc.value for loc in SUPPORTED_LOCATIONS]}"
)
SCHEMA_TYPE = Union[str, Type, tuple, None, Enum]
[docs]class APIPropertyBase(BaseModel):
    """Base model for an API property."""
    # The name of the parameter is required and is case-sensitive.
    # If "in" is "path", the "name" field must correspond to a template expression
    # within the path field in the Paths Object.
    # If "in" is "header" and the "name" field is "Accept", "Content-Type",
    # or "Authorization", the parameter definition is ignored.
    # For all other cases, the "name" corresponds to the parameter
    # name used by the "in" property.
    name: str = Field(alias="name")
    """The name of the property."""
    required: bool = Field(alias="required")
    """Whether the property is required."""
    type: SCHEMA_TYPE = Field(alias="type")
    """The type of the property.
    
    Either a primitive type, a component/parameter type,
    or an array or 'object' (dict) of the above."""
    default: Optional[Any] = Field(alias="default", default=None)
    """The default value of the property."""
    description: Optional[str] = Field(alias="description", default=None)
    """The description of the property."""
if _PYDANTIC_MAJOR_VERSION == 1:
    if TYPE_CHECKING:
        from openapi_schema_pydantic import (
            MediaType,
            Parameter,
            RequestBody,
            Schema,
        )