Skip to content

refactor: take the config API from the web library - #275

Merged
blaipr merged 1 commit into
mainfrom
refactor/shared-config-api
Oct 30, 2026
Merged

blaipr merged 1 commit into
mainfrom
refactor/shared-config-api

Conversation

@blaipr

@blaipr blaipr commented Oct 30, 2026

Copy link
Copy Markdown
Member

The config store and the logic of the /api/v1/config routes now come from web-rs v0.2.0 (OpusProjects/web) instead of a copy in each service: which files make up the directory, staging and atomic commits (FsConfigStore, built with this service's loader by fs_store), ConfigErrors, and every route's logic (If-Match, ETags, validate, commit, reload).

What stays here: the route functions with their OpenAPI annotations, ConfigSummary and ReloadInfo, and a ConfigHost saying what a reload does and which API keys it leaves in force. The responses are unchanged; in the OpenAPI document WriteResult and ValidationResult appear under their instantiated names (WriteResult_ConfigSummary_ReloadInfo, ValidationResult_ConfigSummary). The end-to-end config API tests pass unchanged; the store's unit tests moved to web-rs with it.

The config store and the logic of the /api/v1/config routes now come from web-rs v0.2.0 (OpusProjects/web) instead of a copy in each service: which files make up the directory, staging and atomic commits (FsConfigStore, built with this service's loader by fs_store), ConfigErrors, and every route's logic (If-Match, ETags, validate, commit, reload).

What stays here: the route functions with their OpenAPI annotations, ConfigSummary and ReloadInfo, and a ConfigHost saying what a reload does and which API keys it leaves in force. The responses are unchanged; in the OpenAPI document WriteResult and ValidationResult appear under their instantiated names (WriteResult_ConfigSummary_ReloadInfo, ValidationResult_ConfigSummary). The end-to-end config API tests pass unchanged; the store's unit tests moved to web-rs with it.
@blaipr
blaipr merged commit d721469 into main Oct 30, 2026
5 checks passed
@blaipr
blaipr deleted the refactor/shared-config-api branch October 30, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant