Skip to content

Commit

Permalink
feat all: support kill switches in API schema (#54)
Browse files Browse the repository at this point in the history
* Add lists with kill switches in response of `/configs/values`
* Add lists with kill switches in response of `/configs/values`
* Add lists with kill switches in request of `/admin/v1/configs`
  • Loading branch information
Dangerio authored Nov 8, 2024
1 parent 4ef7a5b commit bc5201a
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion docs/api/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ paths:
post:
description: |
A handle for getting config values.
Returns configs changed since updated_since and last update time.
If any changed configs are Kill Switches,
returns additional lists of enabled and disabled Kill Switches.
A config with a changed Kill Switch flag is considered changed.
requestBody:
description: |
Parameters for config values
Expand Down Expand Up @@ -50,6 +54,18 @@ paths:
type: object
additionalProperties: true
description: Map of received configs
kill_switches_enabled:
type: array
description: Enabled Kill Switches
items:
type: string
description: Config id
kill_switches_disabled:
type: array
description: Disabled Kill Switches
items:
type: string
description: Config id
updated_at:
type: string
description: Time of last update
Expand All @@ -63,7 +79,11 @@ paths:
/admin/v1/configs:
post:
description: |
Handle for adding (editing) configs
Handle for adding (editing) configs.
Changes (sets) config values and optionally their Kill Switch flags.
The configs specified in kill_switches_disabled and kill_switches_enabled
become disabled and enabled kill switches, respectively.
The rest become regular dynamic configs.
requestBody:
description: |
Config parameters (you can add bulk)
Expand All @@ -81,6 +101,22 @@ paths:
description: |
Map key-values, config name and its value,
you can have multiple configs at the same time
kill_switches_enabled:
type: array
description: |
Enabled Kill Switches,
must consist of ids from configs
items:
type: string
description: Config id
kill_switches_disabled:
type: array
description: |
Disabled Kill Switches,
must consist of ids from configs
items:
type: string
description: Config id
service:
type: string
description: The name of the service to create/update for configs for
Expand Down

0 comments on commit bc5201a

Please sign in to comment.