From 2a45b940d7ea0e4749c10130843a1d969a28d360 Mon Sep 17 00:00:00 2001 From: Kirill Mokevnin Date: Sun, 27 Sep 2026 15:26:12 -0400 Subject: [PATCH] fix: container create body carries HostConfig and NetworkingConfig The Engine API takes ContainerConfig together with HostConfig and NetworkingConfig in one create body; the spec had only ContainerConfig, so callers passed host settings around the types. Co-Authored-By: Claude Opus 5.5 --- models/containers.tsp | 10 ++++++++++ routes/containers.tsp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/models/containers.tsp b/models/containers.tsp index 602f01b..3b960cd 100644 --- a/models/containers.tsp +++ b/models/containers.tsp @@ -1299,3 +1299,13 @@ alias GenericResources = { Value?: int64; }; }[]; + +/** + * Тело создания контейнера: конфиг контейнера и в том же объекте настройки хоста и сети, + * как в `ContainerCreate` Engine API. + */ +model ContainerCreateRequest { + ...ContainerConfig; + HostConfig?: HostConfig; + NetworkingConfig?: NetworkingConfig; +} diff --git a/routes/containers.tsp b/routes/containers.tsp index 212e80a..75cd9c2 100644 --- a/routes/containers.tsp +++ b/routes/containers.tsp @@ -17,7 +17,7 @@ op ContainerList(@query all?: boolean, @query limit?: int32, @query size?: boole /** Create a container */ @post @route("/containers/create") -op ContainerCreate(@query name?: string, @query platform?: string, @body body: ContainerConfig): ContainerCreateResponse; +op ContainerCreate(@query name?: string, @query platform?: string, @body body: ContainerCreateRequest): ContainerCreateResponse; /** Inspect a container */ @get