This repository has been archived on 2026-04-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core/server/static/openapi.yaml
Jeffrey Smith 45291860c5
Some checks failed
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Failing after 6s
CI/CD / test-sqlite (push) Failing after 25s
CI/CD / test-go-pg (push) Failing after 26s
CI/CD / build-and-deploy (push) Has been skipped
steps 5-8: deep gut — purge chat/notes/projects/providers from code
main.go: remove ~300 lines of stale routes referencing deleted handlers
  (channels, messages, folders, personas, notes, projects, memories,
   models, providers, tasks, roles, usage, routing, capabilities, etc.)
  Fix branding: "Chat Switchboard" → "Switchboard Core"

pages: remove chat/notes/projects surface manifests and templates
  Keep: admin, settings, team-admin, workflow, workflow-landing

frontend: delete chat/, notes/, projects/ surface directories (19 files)
  Delete 5 CSS files (4,144 lines): sw-chat-*, sw-notes-*, sw-projects-*
  SDK: strip gutted API domains (594→287 lines), remove chatPane/notesPane

tests: remove integration_test.go (5,194 lines, broken imports to deleted
  packages) and perm_enforcement_test.go (551 lines, depended on deleted
  test helpers). Fix testmain_test.go (remove providers import).

openapi.yaml: replace 12,491-line stale spec with kernel auth stub.
  Full ICD rebuild is Step 8 proper.

Auth (builtin, mTLS, OIDC) untouched throughout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:47:32 +00:00

106 lines
2.8 KiB
YAML

openapi: 3.0.3
info:
title: Switchboard Core API
description: |
Self-hosted extension platform. Identity, teams, permissions, workflows,
and a package system. Everything else ships as installable extensions.
## Authentication
Three authentication modes, selected by the `AUTH_MODE` environment variable.
All three produce the same JWT-based session.
**Builtin (default):** Username/password via `POST /api/v1/auth/login`.
**mTLS:** Client certificate presented via reverse proxy headers.
**OIDC:** Authorization code flow against an external IdP (e.g. Keycloak).
Access tokens expire in 15 minutes. Refresh tokens expire in 7 days.
Use `POST /api/v1/auth/refresh` to rotate.
version: '${VERSION}'
servers:
- url: '{scheme}://{host}{basePath}'
variables:
scheme:
default: https
host:
default: localhost:8080
basePath:
default: ''
paths:
/health:
get:
summary: Health check
operationId: healthCheck
tags: [System]
responses:
'200':
description: OK
/api/v1/auth/login:
post:
summary: Login (builtin auth)
operationId: login
tags: [Auth]
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
login:
type: string
password:
type: string
required: [login, password]
responses:
'200':
description: JWT tokens returned
/api/v1/auth/register:
post:
summary: Register new user (builtin auth)
operationId: register
tags: [Auth]
responses:
'201':
description: User created
/api/v1/auth/refresh:
post:
summary: Refresh access token
operationId: refreshToken
tags: [Auth]
responses:
'200':
description: New token pair
/api/v1/auth/oidc/login:
get:
summary: Initiate OIDC login
operationId: oidcLogin
tags: [Auth]
responses:
'302':
description: Redirect to IdP
/api/v1/auth/oidc/callback:
get:
summary: OIDC callback
operationId: oidcCallback
tags: [Auth]
responses:
'200':
description: JWT tokens returned
# ═══════════════════════════════════════════════════════
# TODO: Step 8 — Generate full kernel-only ICD from
# the route registrations in main.go. This stub keeps
# /api/docs functional during the transition.
# ═══════════════════════════════════════════════════════