{
  "openapi": "3.1.0",
  "info": {
    "title": "Vessel RDP Website API",
    "version": "1.0.0",
    "summary": "Read-only release metadata for the Vessel RDP Linux RDP client.",
    "description": "Static, unauthenticated JSON endpoints describing the latest Vessel RDP release and its changelog, plus Markdown content negotiation for site pages. Errors are returned as RFC 9457 problem details.",
    "contact": {
      "name": "Vessel RDP Support",
      "url": "https://vesselrdp.com/support/"
    },
    "termsOfService": "https://vesselrdp.com/terms/"
  },
  "servers": [
    {
      "url": "https://vesselrdp.com"
    }
  ],
  "tags": [
    {
      "name": "Releases",
      "description": "Release and download metadata."
    },
    {
      "name": "Content",
      "description": "Site pages as HTML or Markdown."
    }
  ],
  "paths": {
    "/api/v1/release.json": {
      "get": {
        "operationId": "getLatestRelease",
        "tags": [
          "Releases"
        ],
        "summary": "Get the latest release",
        "description": "Version, release status, and AppImage download URL of the current Vessel RDP release.",
        "responses": {
          "200": {
            "description": "The latest release.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Release"
                }
              }
            }
          },
          "404": {
            "description": "No resource exists at this URL.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and HEAD are supported.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/changelog.json": {
      "get": {
        "operationId": "listReleases",
        "tags": [
          "Releases"
        ],
        "summary": "List all releases with their changelog",
        "description": "Every published release, newest first, with categorized change notes.",
        "responses": {
          "200": {
            "description": "All releases, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Changelog"
                }
              }
            }
          },
          "404": {
            "description": "No resource exists at this URL.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and HEAD are supported.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "operationId": "getHomepage",
        "tags": [
          "Content"
        ],
        "summary": "Get the homepage",
        "description": "Returns HTML by default. Send `Accept: text/markdown` to receive the same content as Markdown. Every page on the site supports this negotiation and also exposes its Markdown at `<page>/index.md`.",
        "responses": {
          "200": {
            "description": "The homepage, in the representation selected by the Accept header.",
            "headers": {
              "Vary": {
                "description": "Always includes `Accept`.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "description": "Only GET and HEAD are supported.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Release": {
        "type": "object",
        "required": [
          "name",
          "version",
          "softwareVersion",
          "releaseLabel",
          "status",
          "releaseDate",
          "platform",
          "architecture",
          "packageFormat",
          "downloadUrl",
          "changelogUrl",
          "docsUrl"
        ],
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "Vessel RDP"
            ]
          },
          "version": {
            "type": "string",
            "description": "Semantic version.",
            "examples": [
              "0.4.0"
            ]
          },
          "softwareVersion": {
            "type": "string",
            "description": "Version including pre-release suffix.",
            "examples": [
              "0.4.0-beta"
            ]
          },
          "releaseLabel": {
            "type": "string",
            "examples": [
              "v0.4.0"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ReleaseStatus"
          },
          "releaseDate": {
            "type": "string",
            "format": "date"
          },
          "platform": {
            "type": "string",
            "const": "linux"
          },
          "architecture": {
            "type": "string",
            "const": "x86_64"
          },
          "packageFormat": {
            "type": "string",
            "const": "AppImage"
          },
          "downloadUrl": {
            "type": "string",
            "format": "uri",
            "description": "Stable URL that always serves the latest AppImage."
          },
          "versionedDownloadUrl": {
            "type": "string",
            "format": "uri",
            "description": "Immutable URL of exactly this release's AppImage. Present when the release was published with a checksum."
          },
          "tag": {
            "type": "string",
            "description": "Git tag of this release.",
            "examples": [
              "v0.4.1-beta.1"
            ]
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "SHA-256 of the AppImage."
          },
          "size": {
            "type": "integer",
            "description": "Size of the AppImage in bytes."
          },
          "changelogUrl": {
            "type": "string",
            "format": "uri"
          },
          "docsUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "ReleaseStatus": {
        "type": "string",
        "enum": [
          "beta",
          "stable"
        ]
      },
      "Changelog": {
        "type": "object",
        "required": [
          "releases"
        ],
        "properties": {
          "releases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChangelogRelease"
            }
          }
        }
      },
      "ChangelogRelease": {
        "type": "object",
        "required": [
          "version",
          "releaseDate",
          "status",
          "sections"
        ],
        "properties": {
          "version": {
            "type": "string"
          },
          "releaseDate": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "$ref": "#/components/schemas/ReleaseStatus"
          },
          "sections": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "category",
                "label",
                "items"
              ],
              "properties": {
                "category": {
                  "type": "string",
                  "enum": [
                    "feature",
                    "improvement",
                    "security",
                    "fix",
                    "legal"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "title",
                      "description"
                    ],
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details, extended with a machine-readable `code` and a resolution `hint`.",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "hint"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri-reference",
            "examples": [
              "about:blank"
            ]
          },
          "title": {
            "type": "string",
            "examples": [
              "Not Found"
            ]
          },
          "status": {
            "type": "integer",
            "examples": [
              404
            ]
          },
          "code": {
            "type": "string",
            "enum": [
              "not_found",
              "method_not_allowed"
            ]
          },
          "detail": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          }
        }
      }
    }
  }
}
