from typing import Dict
from typing import Any
from typing import List


def schema_to_query_params(schema: Dict[str, Any]) -> List[Dict[str, Any]]:
    """Convert schema to `query` parameters list compatible with OpenAPI.

    Args:
        schema: A schema dictionary

    Returns:
        A List of parameter dictionaries.

    """
    retval = []
    for k, w in schema["properties"].items():
        temp = {}
        w.pop("title")
        if "required" in w:
            temp["required"] = w.pop("required")
        temp["name"] = k
        temp["in"] = "query"
        temp["schema"] = w
        retval.append(temp)
    return retval