from typing import Tuple
from typing import Dict


def make_schema(endpoints: Tuple[str]) -> Dict:
    """Generate a Swagger 2.0 schema with the given endpoints.

    Example:
        If `endpoints` is ("success", "failure")
        then the app will contain GET /success and GET /failure
    """
    template = {
        "swagger": "2.0",
        "info": {"title": "Example API", "description": "An API to test Schemathesis", "version": "1.0.0"},
        "host": "127.0.0.1:8888",
        "basePath": "/api",
        "schemes": ["http"],
        "paths": {},
    }
    for endpoint in endpoints:
        template["paths"][f"/{endpoint}"] = {
            "get": {"summary": "Endpoint", "produces": ["application/json"], "responses": {200: {"description": "OK"}}}
        }
    return template