{
  "openapi": "3.1.0",
  "info": {
    "title": "SemverKit",
    "version": "0.1.0",
    "description": "Semantic Versioning 2.0.0 parse, compare, npm range check, sort/max-satisfying and bump; results match node-semver 7. Pure computation; nothing stored; no API key. About 60 checks per minute per IP. Precedence follows SemVer 2.0.0 item 11: numeric MAJOR.MINOR.PATCH, then a release sorts after its prereleases, prerelease identifiers compare numerically when numeric and in ASCII order otherwise, and build metadata is ignored. Ranges follow npm (node-semver 7): ^ allows changes that keep the left-most non-zero part, ~ allows patch changes (minor when only a major is given), 1.x / 1.2.* / * are wildcards, \"a - b\" is inclusive, || means OR and spaces mean AND. A prerelease such as 2.0.0-rc.1 only matches a range that names a prerelease on the same 2.0.0, unless includePrerelease is true. SemverKit is not affiliated with, endorsed by or sponsored by semver.org, npm, GitHub, the OpenJS Foundation, Meta, Anthropic, OpenAI or Anysphere. It reimplements the published Semantic Versioning 2.0.0 rules and npm range syntax and is tested against node-semver 7.",
    "contact": {
      "email": "digitalpromohub.support@gmail.com"
    }
  },
  "servers": [
    {
      "url": "https://semverkit.mike-tusa.workers.dev"
    }
  ],
  "paths": {
    "/api/parse": {
      "get": {
        "operationId": "parseVersion",
        "summary": "Validate and split a version",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": true,
            "description": "Semantic version. Alias: v.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "example": "v2.0.0-rc.1+build.5"
          }
        ],
        "responses": {
          "200": {
            "description": "Parsed version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Parse"
                }
              }
            }
          },
          "400": {
            "description": "invalid_input, invalid_version or invalid_range (missing/oversized input is rejected before the rate limiter)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "parseVersionPostNotAllowed",
        "summary": "Not supported (use GET)",
        "responses": {
          "405": {
            "description": "method_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/compare": {
      "get": {
        "operationId": "compareVersions",
        "summary": "Precedence and change type of two versions",
        "parameters": [
          {
            "name": "a",
            "in": "query",
            "required": true,
            "description": "Semantic version.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "example": "1.2.3"
          },
          {
            "name": "b",
            "in": "query",
            "required": true,
            "description": "Semantic version.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "example": "1.10.0"
          }
        ],
        "responses": {
          "200": {
            "description": "Comparison",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Compare"
                }
              }
            }
          },
          "400": {
            "description": "invalid_input, invalid_version or invalid_range (missing/oversized input is rejected before the rate limiter)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "compareVersionsPostNotAllowed",
        "summary": "Not supported (use GET)",
        "responses": {
          "405": {
            "description": "method_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/satisfies": {
      "get": {
        "operationId": "checkRange",
        "summary": "Does a version satisfy an npm range?",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": true,
            "description": "Semantic version. Alias: v.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "example": "1.4.2"
          },
          {
            "name": "range",
            "in": "query",
            "required": true,
            "description": "npm-style range. Alias: r.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "example": "^1.2.0"
          },
          {
            "name": "includePrerelease",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Range check",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Satisfies"
                }
              }
            }
          },
          "400": {
            "description": "invalid_input, invalid_version or invalid_range (missing/oversized input is rejected before the rate limiter)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "checkRangePostNotAllowed",
        "summary": "Not supported (use GET)",
        "responses": {
          "405": {
            "description": "method_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/resolve": {
      "get": {
        "operationId": "resolveVersions",
        "summary": "Sort versions; matching, max/min satisfying, latest stable",
        "parameters": [
          {
            "name": "versions",
            "in": "query",
            "required": true,
            "description": "1-200 versions separated by commas (or repeat v=).",
            "schema": {
              "type": "string",
              "maxLength": 51400
            },
            "example": "1.0.0,1.2.3,1.10.0,2.0.0-rc.1"
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "description": "npm-style range. Alias: r.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512
            },
            "example": "^1.2.0"
          },
          {
            "name": "includePrerelease",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resolution",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resolve"
                }
              }
            }
          },
          "400": {
            "description": "invalid_input, invalid_version or invalid_range (missing/oversized input is rejected before the rate limiter)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "resolveVersionsPostNotAllowed",
        "summary": "Not supported (use GET)",
        "responses": {
          "405": {
            "description": "method_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/bump": {
      "get": {
        "operationId": "bumpVersion",
        "summary": "Next version for a release type (like semver.inc)",
        "parameters": [
          {
            "name": "version",
            "in": "query",
            "required": true,
            "description": "Semantic version. Alias: v.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "example": "1.2.3"
          },
          {
            "name": "release",
            "in": "query",
            "required": false,
            "description": "Alias: type.",
            "schema": {
              "type": "string",
              "enum": [
                "major",
                "minor",
                "patch",
                "premajor",
                "preminor",
                "prepatch",
                "prerelease",
                "release"
              ],
              "default": "patch"
            }
          },
          {
            "name": "preid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "example": "beta"
          }
        ],
        "responses": {
          "200": {
            "description": "Next version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bump"
                }
              }
            }
          },
          "400": {
            "description": "invalid_input, invalid_version or invalid_range (missing/oversized input is rejected before the rate limiter)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "500": {
            "description": "internal_error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "bumpVersionPostNotAllowed",
        "summary": "Not supported (use GET)",
        "responses": {
          "405": {
            "description": "method_not_allowed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "health",
        "summary": "Health and version",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "version"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp/server-card.json": {
      "get": {
        "operationId": "serverCard",
        "summary": "Static MCP server card (same tools as tools/list)",
        "responses": {
          "200": {
            "description": "Server card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "Remote MCP server (JSON-RPC 2.0 over Streamable HTTP, stateless)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "JSON-RPC 2.0 request, notification or batch (max 10, at most one tools/call)"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 response (or batch array)"
                }
              }
            }
          },
          "202": {
            "description": "Notification or client response accepted (empty body)"
          },
          "400": {
            "description": "Parse error, invalid request or protocol/header mismatch",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 response (or batch array)"
                }
              }
            }
          },
          "403": {
            "description": "Origin not allowed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 response (or batch array)"
                }
              }
            }
          },
          "404": {
            "description": "Method not found (2026-07-28 requests)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 response (or batch array)"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 response (or batch array)"
                }
              }
            }
          },
          "429": {
            "description": "Too many MCP requests (Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC 2.0 response (or batch array)"
                }
              }
            }
          },
          "500": {
            "description": "Internal error"
          },
          "503": {
            "description": "Temporarily unavailable"
          }
        }
      },
      "get": {
        "operationId": "mcpGet",
        "summary": "Not supported (no SSE stream)",
        "responses": {
          "405": {
            "description": "Method not allowed",
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST, OPTIONS"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "mcpDelete",
        "summary": "Not supported (no sessions)",
        "responses": {
          "405": {
            "description": "Method not allowed",
            "headers": {
              "Allow": {
                "schema": {
                  "type": "string",
                  "const": "POST, OPTIONS"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_input",
                  "invalid_version",
                  "invalid_range",
                  "rate_limited",
                  "method_not_allowed",
                  "not_found",
                  "internal_error"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "Parse": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "major": {
            "type": "integer"
          },
          "minor": {
            "type": "integer"
          },
          "patch": {
            "type": "integer"
          },
          "prerelease": {
            "type": "array",
            "items": {
              "type": [
                "string",
                "integer"
              ]
            }
          },
          "build": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isPrerelease": {
            "type": "boolean"
          },
          "isStable": {
            "type": "boolean"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apiVersion": {
            "type": "string"
          }
        },
        "required": [
          "version",
          "major",
          "minor",
          "patch",
          "isPrerelease",
          "apiVersion"
        ]
      },
      "Compare": {
        "type": "object",
        "properties": {
          "a": {
            "type": "string"
          },
          "b": {
            "type": "string"
          },
          "result": {
            "type": "integer"
          },
          "relation": {
            "type": "string"
          },
          "diff": {
            "type": [
              "string",
              "null"
            ]
          },
          "buildDiffers": {
            "type": "boolean"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apiVersion": {
            "type": "string"
          }
        },
        "required": [
          "result",
          "relation",
          "diff",
          "apiVersion"
        ]
      },
      "Satisfies": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "range": {
            "type": "string"
          },
          "normalized": {
            "type": "string"
          },
          "satisfies": {
            "type": "boolean"
          },
          "includePrerelease": {
            "type": "boolean"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apiVersion": {
            "type": "string"
          }
        },
        "required": [
          "satisfies",
          "normalized",
          "apiVersion"
        ]
      },
      "Resolve": {
        "type": "object",
        "properties": {
          "range": {
            "type": [
              "string",
              "null"
            ]
          },
          "normalized": {
            "type": [
              "string",
              "null"
            ]
          },
          "includePrerelease": {
            "type": "boolean"
          },
          "sorted": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "count": {
            "type": "integer"
          },
          "matching": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxSatisfying": {
            "type": [
              "string",
              "null"
            ]
          },
          "minSatisfying": {
            "type": [
              "string",
              "null"
            ]
          },
          "latestStable": {
            "type": [
              "string",
              "null"
            ]
          },
          "invalid": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "duplicatesRemoved": {
            "type": "integer"
          },
          "apiVersion": {
            "type": "string"
          }
        },
        "required": [
          "sorted",
          "matching",
          "maxSatisfying",
          "apiVersion"
        ]
      },
      "Bump": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "release": {
            "type": "string"
          },
          "preid": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": "string"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "apiVersion": {
            "type": "string"
          }
        },
        "required": [
          "from",
          "version",
          "apiVersion"
        ]
      }
    }
  }
}