swarmctl hand-mirrored the controller's forge make-admin response and the /api/schedules bodies. Both now import them from a new serde-only crate, swarm-controller-api, the way hivectl and hive-c0re share hive-host-sock. ToSchema sits behind its schema feature, which only the controller turns on. The wire format is unchanged: round-trip tests in the new crate pin each type against the JSON the controller and swarmctl produced, and the controller's OpenAPI document for these routes is byte-identical. Files: swarm-controller-api/ is the new crate; swarm-controller and swarmctl (src, Cargo.toml, Cargo.lock, root Cargo.toml) switch to it; CLAUDE.md lists the crate and which swarmctl shapes are still local mirrors; swarmctl/README.md says the forge and schedule bodies come from the crate, so none of its lines still call them mirrored. Part of #5472.
20 lines
445 B
TOML
20 lines
445 B
TOML
[package]
|
|
name = "swarm-controller-api"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
readme = "README.md"
|
|
|
|
[features]
|
|
# `ToSchema` on every type, for swarm-controller, whose `OpenAPI` spec
|
|
# describes them. Off by default so swarmctl does not link utoipa.
|
|
schema = ["dep:utoipa"]
|
|
|
|
[dependencies]
|
|
serde.workspace = true
|
|
utoipa = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
serde_json.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|