elif schema is None:
                return None
            elif not isinstance(schema, Schema):
                raise ValueError(f"Error dereferencing schema: {schema}")
            return schema
[docs]        @staticmethod
        def is_supported_location(location: str) -> bool:
            """Return whether the provided location is supported."""
            try:
                return APIPropertyLocation.from_str(location) in SUPPORTED_LOCATIONS
            except ValueError:
                return False
[docs]        @classmethod
        def from_parameter(
            cls, parameter: Parameter, spec: OpenAPISpec
        ) -> "APIProperty":
            """Instantiate from an OpenAPI Parameter."""
            location = APIPropertyLocation.from_str(parameter.param_in)
            cls._validate_location(
                location,
                parameter.name,
            )
            cls._validate_content(parameter.content)
            schema = cls._get_schema(parameter, spec)
            schema_type = cls._get_schema_type(parameter, schema)
            default_val = schema.default if schema is not None else None
            return cls(
                name=parameter.name,
                location=location,
                default=default_val,
                description=parameter.description,
                required=parameter.required,
                type=schema_type,
            )
    class APIRequestBodyProperty(APIPropertyBase):
        """A model for a request body property."""
        properties: List["APIRequestBodyProperty"] = Field(alias="properties")
        """The sub-properties of the property."""
        # This is useful for handling nested property cycles.
        # We can define separate types in that case.
        references_used: List[str] = Field(alias="references_used")
        """The references used by the property."""
        @classmethod
        def _process_object_schema(