topology: require --parent/--root explicitly + fix stale form doc (#492 nits)
This commit is contained in:
parent
5456377622
commit
3dbef583a7
2 changed files with 11 additions and 3 deletions
|
|
@ -852,9 +852,13 @@ struct RequestSpawnForm {
|
|||
|
||||
/// `POST /api/topology/set-parent` body. `child` is required.
|
||||
/// `new_parent` may be:
|
||||
/// - omitted entirely (form field absent) → no-op error,
|
||||
/// - empty string → promote to root,
|
||||
/// - absent or empty / whitespace-only → promote to root,
|
||||
/// - non-empty → new parent's logical name.
|
||||
///
|
||||
/// (The CLI surface gates "no parent specified" behind an explicit
|
||||
/// `--root` flag for safety; the HTTP surface is permissive
|
||||
/// because the dashboard form encodes "no value" as the empty
|
||||
/// string for the optional radio-group input.)
|
||||
#[derive(Deserialize)]
|
||||
struct SetParentForm {
|
||||
child: String,
|
||||
|
|
|
|||
Loading…
Reference in a new issue