pass
                    return f"Array<{ref_name}>"
                else:
                    pass
                if isinstance(items, Schema):
                    array_type = cls.from_schema(
                        schema=items,
                        name=f"{name}Item",
                        required=True,  # TODO: Add required
                        spec=spec,
                        references_used=references_used,
                    )
                    return f"Array<{array_type.type}>"
            return "array"
[docs]        @classmethod
        def from_schema(
            cls,
            schema: Schema,
            name: str,
            required: bool,
            spec: OpenAPISpec,
            references_used: Optional[List[str]] = None,
        ) -> "APIRequestBodyProperty":
            """Recursively populate from an OpenAPI Schema."""
            if references_used is None:
                references_used = []
            schema_type = schema.type
            properties: List[APIRequestBodyProperty] = []
            if schema_type == "object" and schema.properties:
                schema_type, properties = cls._process_object_schema(
                    schema, spec, references_used
                )
            elif schema_type == "array":
                schema_type = cls._process_array_schema(
                    schema, name, spec, references_used
                )
            elif schema_type in PRIMITIVE_TYPES:
                # Use the primitive type directly
                pass
            elif schema_type is None:
                # No typing specified/parsed. WIll map to 'any'
                pass
            else:
                raise ValueError(f"Unsupported type: {schema_type}")
            return cls(
                name=name,
                required=required,
                type=schema_type,
                default=schema.default,
                description=schema.description,
                properties=properties,
                references_used=references_used,
            )