{
  "openapi": "3.1.0",
  "info": {
    "title": "ForHub API",
    "version": "1.0.0",
    "description": "GitHub-style hosting for maker projects. Every page in the web UI is backed by these endpoints, so an agent can do everything a person can. Projects are real git repos: clone/push at /{owner}/{slug}.git (HTTP basic auth: handle + token)."
  },
  "servers": [
    {
      "url": "https://forhub.org"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/api": {
      "get": {
        "summary": "API index with links to docs, OpenAPI and MCP",
        "operationId": "get__api",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/schema/manifest": {
      "get": {
        "summary": "JSON schema of forhub.yaml",
        "operationId": "get_schema_manifest",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/schema/guide": {
      "get": {
        "summary": "JSON schema of a guide YAML file",
        "operationId": "get_schema_guide",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/me": {
      "get": {
        "summary": "The user the token belongs to",
        "operationId": "get_me",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/users": {
      "post": {
        "summary": "Sign up without an identity check: local demo servers only. Elsewhere sign in with GitHub at /auth/github",
        "operationId": "post_users",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "handle": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "bio": {
                    "type": "string"
                  },
                  "is_agent": {
                    "type": "boolean",
                    "description": "mark the account as an AI agent"
                  }
                },
                "required": [
                  "handle"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "get": {
        "summary": "List users (on a real server: those who own a project)",
        "operationId": "get_users",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/tokens": {
      "post": {
        "summary": "Create another token for yourself (e.g. a read-only one for an agent)",
        "operationId": "post_tokens",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string"
                  },
                  "scope": {
                    "enum": [
                      "read",
                      "write"
                    ]
                  }
                },
                "required": []
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "get": {
        "summary": "Your tokens (label, scope, created, last used; the secret itself is only shown once, at creation)",
        "operationId": "get_tokens",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/tokens/{id}": {
      "delete": {
        "summary": "Revoke one of your tokens",
        "operationId": "delete_tokens_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/connected-apps": {
      "get": {
        "summary": "AI apps you connected with OAuth (Claude, ChatGPT, Gemini...): name, access (read | write), when connected and last used",
        "operationId": "get_connected_apps",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/connected-apps/{id}": {
      "delete": {
        "summary": "Disconnect an app: its tokens stop working at once",
        "operationId": "delete_connected_apps_id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/demo/login": {
      "post": {
        "summary": "Demo only: get a token for an existing user without a password. On only when the server is bound to loopback (or FORHUB_DEMO=1)",
        "operationId": "post_demo_login",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "handle": {
                    "type": "string"
                  }
                },
                "required": [
                  "handle"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/auth-config": {
      "get": {
        "summary": "Which sign-in methods this server offers (the sign-in page reads this)",
        "operationId": "get_auth_config",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/users/{handle}": {
      "get": {
        "summary": "User profile with projects, stars and makes",
        "operationId": "get_users_handle",
        "parameters": [
          {
            "name": "handle",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/activity": {
      "get": {
        "summary": "Site-wide activity feed",
        "operationId": "get_activity",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "max items",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects": {
      "get": {
        "summary": "Search and list projects",
        "operationId": "get_projects",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "text search",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "description": "filter by tag",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "description": "filter by owner",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "printed | electronics | craft | software | mixed",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "verified",
            "in": "query",
            "description": "true: only projects with proof that they work",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "updated | stars | new",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "max results",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "post": {
        "summary": "Create a project (git repo + forhub.yaml from a template)",
        "operationId": "post_projects",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "written into forhub.yaml; lower case, at most 12"
                  },
                  "template": {
                    "enum": [
                      "starter",
                      "empty"
                    ],
                    "default": "starter"
                  }
                },
                "required": [
                  "slug"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}": {
      "get": {
        "summary": "Everything about a project: manifest, BOM total, checks, readiness, stats, clone URLs",
        "operationId": "get_projects_owner_slug",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "branch, tag or sha",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "patch": {
        "summary": "Update title / summary / tags (committed to forhub.yaml)",
        "operationId": "patch_projects_owner_slug",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": []
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "summary": "Delete a project (owner only)",
        "operationId": "delete_projects_owner_slug",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/context": {
      "get": {
        "summary": "The whole project as one markdown document for an LLM (same as /{owner}/{slug}/llms.txt)",
        "operationId": "get_projects_owner_slug_context",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "e.g. variant/<id>",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/manifest": {
      "get": {
        "summary": "Parsed forhub.yaml plus raw text and warnings",
        "operationId": "get_projects_owner_slug_manifest",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "branch, tag or sha",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/bom": {
      "get": {
        "summary": "Bill of materials with totals. ?country=XX adds for_country: the shop per part that sells or ships to that country, totals per currency, parts with no shop yet. ?format=csv for a spreadsheet (with country: that country's shops)",
        "operationId": "get_projects_owner_slug_bom",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO code, default: the author's",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "json | csv",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/models": {
      "get": {
        "summary": "3D models: printable parts with settings, G-code, assembly, sources",
        "operationId": "get_projects_owner_slug_models",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/guides": {
      "get": {
        "summary": "List build guides",
        "operationId": "get_projects_owner_slug_guides",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/guides/{id}": {
      "get": {
        "summary": "One guide with all steps",
        "operationId": "get_projects_owner_slug_guides_id",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/tree": {
      "get": {
        "summary": "List a directory (or read a file) at a ref",
        "operationId": "get_projects_owner_slug_tree",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "directory, default root",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/file": {
      "get": {
        "summary": "Read one file as JSON (text content inline; binary gives raw_url)",
        "operationId": "get_projects_owner_slug_file",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "file path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/search": {
      "get": {
        "summary": "Search file names and contents",
        "operationId": "get_projects_owner_slug_search",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "description": "text",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/commits": {
      "get": {
        "summary": "Commit history",
        "operationId": "get_projects_owner_slug_commits",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "only commits touching this path",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "post": {
        "summary": "Commit file changes (add, edit, delete) in one atomic commit",
        "operationId": "post_projects_owner_slug_commits",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "path"
                      ],
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string",
                          "description": "new file content"
                        },
                        "encoding": {
                          "enum": [
                            "utf8",
                            "base64"
                          ],
                          "default": "utf8"
                        },
                        "delete": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "branch": {
                    "type": "string"
                  },
                  "expect_parent": {
                    "type": "string",
                    "description": "refuse with 409 if the branch head is not this sha"
                  }
                },
                "required": [
                  "message",
                  "files"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/commits/{sha}": {
      "get": {
        "summary": "One commit with changed files, diff and comments",
        "operationId": "get_projects_owner_slug_commits_sha",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sha",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/releases": {
      "get": {
        "summary": "Releases (annotated git tags) with zip links",
        "operationId": "get_projects_owner_slug_releases",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "post": {
        "summary": "Tag a release",
        "operationId": "post_projects_owner_slug_releases",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tag": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "ref": {
                    "type": "string"
                  }
                },
                "required": [
                  "tag"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/releases/{tag}": {
      "get": {
        "summary": "One release and what changed since the previous release: commits (with \"Changed parts:\"), version/spec/printed-part/BOM/check changes, and the file diff (text patches, STL before/after with size/volume/mass and geometry-unchanged detection, images)",
        "operationId": "get_projects_owner_slug_releases_tag",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "description": "compare with this tag/ref instead of the previous release",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/issues": {
      "get": {
        "summary": "List issues",
        "operationId": "get_projects_owner_slug_issues",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "open | closed | all",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "post": {
        "summary": "Open an issue",
        "operationId": "post_projects_owner_slug_issues",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/issues/{number}": {
      "get": {
        "summary": "One issue with its comments",
        "operationId": "get_projects_owner_slug_issues_number",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "patch": {
        "summary": "Close / reopen / relabel an issue",
        "operationId": "patch_projects_owner_slug_issues_number",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {
                    "enum": [
                      "open",
                      "closed"
                    ]
                  },
                  "title": {
                    "type": "string"
                  },
                  "labels": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": []
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/comments": {
      "get": {
        "summary": "Comments on the project, a commit, a guide step (target_id \"guide#n\"), an issue, a make or a file",
        "operationId": "get_projects_owner_slug_comments",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target_type",
            "in": "query",
            "description": "project | commit | step | issue | make | file | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "target_id",
            "in": "query",
            "description": "sha, \"guide#n\", issue number, make id, file path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "post": {
        "summary": "Add a comment",
        "operationId": "post_projects_owner_slug_comments",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "target_type": {
                    "type": "string"
                  },
                  "target_id": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string",
                    "description": "markdown"
                  }
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/makes": {
      "get": {
        "summary": "\"I made this\" posts from people who built it",
        "operationId": "get_projects_owner_slug_makes",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "post": {
        "summary": "Post a make (photo as base64)",
        "operationId": "post_projects_owner_slug_makes",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "body": {
                    "type": "string"
                  },
                  "changes": {
                    "type": "string",
                    "description": "what you changed from the design"
                  },
                  "image_base64": {
                    "type": "string"
                  },
                  "image_ext": {
                    "type": "string"
                  },
                  "video_url": {
                    "type": "string",
                    "description": "YouTube, Vimeo or other https link"
                  },
                  "proof": {
                    "type": "boolean",
                    "description": "this make is evidence that the project works (needs a photo or video_url)"
                  },
                  "claims": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "proof.claims ids it shows working"
                  }
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/claim": {
      "post": {
        "summary": "Is it your project? Ask to move an imported project to your account. An admin decides; the request records whether your GitHub login matches the original author",
        "operationId": "post_projects_owner_slug_claim",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {
                    "type": "string",
                    "description": "how you can show it is yours: link to your profile on the original site, etc."
                  }
                },
                "required": []
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/claims": {
      "get": {
        "summary": "Your claim requests; an admin sees all (filter by status: pending | approved | rejected | withdrawn; mine=1 for only your own)",
        "operationId": "get_claims",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "pending | approved | rejected | withdrawn",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mine",
            "in": "query",
            "description": "1: only your own requests, even for an admin",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/claims/{id}/withdraw": {
      "post": {
        "summary": "Take back your own claim request while it is still pending (id from GET /api/claims). You can ask again later",
        "operationId": "post_claims_id_withdraw",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/imports": {
      "post": {
        "summary": "Importer accounts only: import an open project from another site into the open-source account. Body is the import record (title, url, author, license{raw}, files[{src, role, content|content_base64|url}] ...). The licence gate refuses NC, ND, unlicensed and unknown licences with a reason. dry_run=true checks without writing. update=true refreshes an existing import in place (same slug and source url, history kept, original importer or admin only; dry_run shows the diff). Limits: 40 MB per file, 100 MB total, 60 files; file url must be https from hacksterio.s3.amazonaws.com, raw.githubusercontent.com, github.com, files.printables.com or media.printables.com",
        "operationId": "post_imports",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "author": {
                    "type": "string"
                  },
                  "license": {
                    "type": "object",
                    "description": "{ raw: \"GPL3+\" or \"CC BY-SA\", scope: \"all\"|\"code-and-schematics\" }"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "dry_run": {
                    "type": "boolean"
                  },
                  "update": {
                    "type": "boolean",
                    "description": "refresh an existing import in place"
                  }
                },
                "required": [
                  "title",
                  "url",
                  "author",
                  "license"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/claims/{id}/decision": {
      "post": {
        "summary": "Admin only: approve (moves the project to the requester) or reject a claim request. {id} is the request id from GET /api/claims; a request that is no longer pending answers 409",
        "operationId": "post_claims_id_decision",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "approve": {
                    "type": "boolean",
                    "description": "true: move the project to the requester; false: reject the request. Required, there is no default"
                  },
                  "note": {
                    "type": "string",
                    "description": "optional reason, shown to the requester"
                  }
                },
                "required": [
                  "approve"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/verification": {
      "get": {
        "summary": "Verified block: level, claims with status, evidence with who recorded it and whether the design changed since",
        "operationId": "get_projects_owner_slug_verification",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "branch, tag or sha",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/star": {
      "post": {
        "summary": "Star",
        "operationId": "post_projects_owner_slug_star",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      },
      "delete": {
        "summary": "Unstar",
        "operationId": "delete_projects_owner_slug_star",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/fork": {
      "post": {
        "summary": "Fork into your account (full git history)",
        "operationId": "post_projects_owner_slug_fork",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string"
                  }
                },
                "required": []
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/collaborators": {
      "post": {
        "summary": "Give another user (or agent account) write access",
        "operationId": "post_projects_owner_slug_collaborators",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "handle": {
                    "type": "string"
                  }
                },
                "required": [
                  "handle"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/activity": {
      "get": {
        "summary": "Project activity feed",
        "operationId": "get_projects_owner_slug_activity",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/checked": {
      "post": {
        "summary": "Mark this version (or a variant branch via ref) as checked by you today: links alive, parts still sold, it still prints/builds. Writes the checked block in forhub.yaml",
        "operationId": "post_projects_owner_slug_checked",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ref": {
                    "type": "string",
                    "description": "branch, e.g. variant/<id>; default branch if omitted"
                  },
                  "note": {
                    "type": "string"
                  },
                  "scope": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": []
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/variants": {
      "get": {
        "summary": "Variants: alternative builds (branches variant/<id>) with BOM changes, changed files, design-check status (incl. stale) and \"built with it\" confirmations",
        "operationId": "get_projects_owner_slug_variants",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "post": {
        "summary": "Create a variant branch from a ref (committing files) or from a fork",
        "operationId": "post_projects_owner_slug_variants",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "summary": {
                    "type": "string"
                  },
                  "changes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "replaces": {
                    "type": "object"
                  },
                  "region": {
                    "type": "string"
                  },
                  "from": {
                    "type": "string",
                    "description": "ref to branch from, default main"
                  },
                  "from_project": {
                    "type": "string",
                    "description": "owner/slug of a fork to import"
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "required": [
                        "path"
                      ],
                      "properties": {
                        "path": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string",
                          "description": "new file content"
                        },
                        "encoding": {
                          "enum": [
                            "utf8",
                            "base64"
                          ],
                          "default": "utf8"
                        },
                        "delete": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/variants/{id}": {
      "get": {
        "summary": "One variant compared with main",
        "operationId": "get_projects_owner_slug_variants_id",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "delete": {
        "summary": "Delete a variant branch (owner)",
        "operationId": "delete_projects_owner_slug_variants_id",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/variants/{id}/confirm": {
      "post": {
        "summary": "Report building a variant: works, or fails with a note",
        "operationId": "post_projects_owner_slug_variants_id_confirm",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "verdict": {
                    "enum": [
                      "works",
                      "fails"
                    ]
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "verdict"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/variants/{id}/diff": {
      "get": {
        "summary": "What a variant changed vs the default branch: unified patch for text, before/after URLs plus size/volume/mass change for STL models, before/after for images",
        "operationId": "get_projects_owner_slug_variants_id_diff",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "limit to one file or folder",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/compare": {
      "get": {
        "summary": "Compare two refs (three-dot): same output as the variant diff. For one commit use base=<sha>^ head=<sha>",
        "operationId": "get_projects_owner_slug_compare",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "base",
            "in": "query",
            "description": "ref",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "head",
            "in": "query",
            "description": "ref",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "optional",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/parts/{item}/impact": {
      "get": {
        "summary": "What changing one BOM part affects: interface, resolved printed parts / parameters / firmware / guide steps, accepted alternatives, variants that replace it",
        "operationId": "get_projects_owner_slug_parts_item_impact",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    },
    "/api/projects/{owner}/{slug}/sources": {
      "post": {
        "summary": "Suggest another shop for the same part (e.g. in your country); the owner accepts it into the BOM",
        "operationId": "post_projects_owner_slug_sources",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "item_id": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string",
                    "description": "ISO code of the shop"
                  },
                  "supplier": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "unit_price": {
                    "type": "number"
                  },
                  "currency": {
                    "type": "string"
                  },
                  "ships_to": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "country codes, EU, worldwide"
                  },
                  "notes": {
                    "type": "string"
                  }
                },
                "required": [
                  "item_id",
                  "country",
                  "supplier"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/bom/{item}/link": {
      "post": {
        "summary": "Owner: change a shop link (main or s<n>), e.g. to an affiliate link; committed and labelled",
        "operationId": "post_projects_owner_slug_bom_item_link",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "description": "main | s0 | s1 ..."
                  },
                  "url": {
                    "type": "string"
                  },
                  "affiliate": {
                    "type": "boolean"
                  },
                  "unit_price": {
                    "type": "number"
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/alternatives": {
      "get": {
        "summary": "Suggested part alternatives with confirmations",
        "operationId": "get_projects_owner_slug_alternatives",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "item_id",
            "in": "query",
            "description": "BOM item id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "open | accepted | rejected",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "description": "product | source",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      },
      "post": {
        "summary": "Suggest an alternative for a BOM part (fit: drop-in, or variant with a variant id)",
        "operationId": "post_projects_owner_slug_alternatives",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "item_id": {
                    "type": "string"
                  },
                  "product": {
                    "type": "string"
                  },
                  "supplier": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "unit_price": {
                    "type": "number"
                  },
                  "region": {
                    "type": "string"
                  },
                  "fit": {
                    "enum": [
                      "drop-in",
                      "variant"
                    ]
                  },
                  "variant": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  }
                },
                "required": [
                  "item_id",
                  "product"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/alternatives/{id}/decision": {
      "post": {
        "summary": "Owner: accept (commits it into forhub.yaml) or reject",
        "operationId": "post_projects_owner_slug_alternatives_id_decision",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "decision": {
                    "enum": [
                      "accept",
                      "reject"
                    ]
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "decision"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/alternatives/{id}/confirm": {
      "post": {
        "summary": "Report using an alternative: works, or fails with a note",
        "operationId": "post_projects_owner_slug_alternatives_id_confirm",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "verdict": {
                    "enum": [
                      "works",
                      "fails"
                    ]
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "verdict"
                ]
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ]
      }
    },
    "/api/projects/{owner}/{slug}/scaffold.sh": {
      "get": {
        "summary": "Generated setup script: clone + every setup step from forhub.yaml",
        "operationId": "get_projects_owner_slug_scaffold_sh",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {}
            }
          },
          "4XX": {
            "description": "{ error, status }"
          }
        }
      }
    }
  }
}