Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ tags:
description: Issue dependency management
- name: labels
description: Label management
- name: config
description: Arc configuration management
- name: comments
description: Comments and audit events
- name: teams
Expand Down Expand Up @@ -970,6 +972,50 @@ paths:
"500":
$ref: "#/components/responses/InternalError"

# ====================
# Config (singleton)
# ====================
/config:
get:
operationId: getConfig
tags: [config]
summary: Get the current arc configuration
responses:
"200":
description: Current configuration
content:
application/json:
schema:
$ref: "#/components/schemas/ConfigResponse"
"500":
$ref: "#/components/responses/InternalError"

put:
operationId: putConfig
tags: [config]
summary: Replace the arc configuration
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Config"
responses:
"200":
description: Updated configuration
content:
application/json:
schema:
$ref: "#/components/schemas/ConfigResponse"
"400":
description: Validation error
content:
application/json:
schema:
$ref: "#/components/schemas/ConfigValidationError"
"500":
$ref: "#/components/responses/InternalError"

# ====================
# Shares (author keyring)
# ====================
Expand Down Expand Up @@ -2208,6 +2254,81 @@ components:
additionalProperties: true
description: Array of transcript entries

# ====================
# Config Schemas
# ====================
Config:
type: object
required: [cli, server, share, updates]
properties:
cli:
$ref: "#/components/schemas/CLIConfig"
server:
$ref: "#/components/schemas/ServerConfig"
share:
$ref: "#/components/schemas/ShareConfig"
updates:
$ref: "#/components/schemas/UpdatesConfig"

CLIConfig:
type: object
properties:
server:
type: string
description: URL the CLI uses to talk to the arc server.

ServerConfig:
type: object
properties:
port:
type: integer
minimum: 1
maximum: 65535
db_path:
type: string

ShareConfig:
type: object
properties:
author:
type: string
server:
type: string

UpdatesConfig:
type: object
properties:
channel:
type: string
enum: [stable, rc, nightly]

ConfigResponse:
type: object
required: [cli, server, share, updates, meta]
allOf:
- $ref: "#/components/schemas/Config"
- type: object
properties:
meta:
type: object
required: [path, requires_restart]
properties:
path:
type: string
requires_restart:
type: array
items:
type: string

ConfigValidationError:
type: object
required: [errors]
properties:
errors:
type: object
additionalProperties:
type: string

# ====================
# Plan Schemas
# ====================
Expand Down
Loading
Loading