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