{
  "openapi": "3.1.0",
  "info": {
    "title": "Drunk Monk Studios Site API",
    "version": "1.0.0",
    "description": "Read-only description of the public Drunk Monk Studios website. It does not start games or change data. The API catalog is at /.well-known/api-catalog."
  },
  "servers": [
    {
      "url": "https://drunkmonkstudios.com"
    }
  ],
  "externalDocs": {
    "description": "Human-readable documentation",
    "url": "https://drunkmonkstudios.com/site-api"
  },
  "paths": {
    "/api/site": {
      "get": {
        "operationId": "getSiteApi",
        "summary": "Site API entry point",
        "responses": {
          "200": {
            "description": "Links to the health check, documentation, and this specification.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteApiIndex"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and HEAD are allowed."
          }
        }
      }
    },
    "/api/site/health": {
      "get": {
        "operationId": "getSiteApiHealth",
        "summary": "Health status",
        "responses": {
          "200": {
            "description": "The API is reachable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and HEAD are allowed."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SiteApiIndex": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "description",
          "health",
          "documentation",
          "specification"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "health": {
            "type": "string",
            "format": "uri"
          },
          "documentation": {
            "type": "string",
            "format": "uri"
          },
          "specification": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Health": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "const": "ok"
          }
        }
      }
    }
  }
}
