{
    "openapi": "3.1.0",
    "info": {
        "title": "URSY.games Public API",
        "version": "1.0.0",
        "description": "Free, keyless, read-only game discovery and embed metadata. Individual games retain the licence named in each response."
    },
    "servers": [
        {
            "url": "https://ursy.games/wp-json/ursy-games/v1"
        }
    ],
    "paths": {
        "/games": {
            "get": {
                "summary": "List and filter public games",
                "parameters": [
                    {
                        "name": "category",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "mode",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "solo",
                                "vs-computer",
                                "local-2-player"
                            ]
                        }
                    },
                    {
                        "name": "engine",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "native",
                                "iframe"
                            ]
                        }
                    },
                    {
                        "name": "license",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "input",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "keyboard",
                                "pointer",
                                "touch"
                            ]
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "featured",
                        "in": "query",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "view",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "compact",
                                "full"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated game collection"
                    }
                }
            }
        },
        "/games/{slug}": {
            "get": {
                "summary": "Get one game and its editorial metadata",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Game detail"
                    },
                    "404": {
                        "description": "Unknown game"
                    }
                }
            }
        },
        "/manifest": {
            "get": {
                "summary": "Get the complete compact release manifest",
                "responses": {
                    "200": {
                        "description": "Complete manifest"
                    }
                }
            }
        },
        "/categories": {
            "get": {
                "summary": "List categories and counts",
                "responses": {
                    "200": {
                        "description": "Category list"
                    }
                }
            }
        },
        "/licenses": {
            "get": {
                "summary": "List licence groups and source notices",
                "responses": {
                    "200": {
                        "description": "Licence groups"
                    }
                }
            }
        },
        "/daily": {
            "get": {
                "summary": "Get the deterministic game of the day",
                "responses": {
                    "200": {
                        "description": "Daily game"
                    }
                }
            }
        },
        "/status": {
            "get": {
                "summary": "Get release and API health",
                "responses": {
                    "200": {
                        "description": "Status"
                    }
                }
            }
        }
    }
}
