mirror of
https://github.com/moby/moby.git
synced 2026-07-08 23:57:50 +00:00
Query parameters default to being _optional_ in swagger, but for these
endpoints, they were required. Omitting these parameters (or passing an
empty value) produces a 400 (bad request);
docker run -d --name foo nginx:alpine
curl -XPOST --unix-socket /var/run/docker.sock 'http://localhost/v1.47/containers/foo/resize'
{"message":"strconv.Atoi: parsing \"\": invalid syntax"}
curl -XPOST --unix-socket /var/run/docker.sock 'http://localhost/v1.47/containers/foo/resize?w='
{"message":"strconv.Atoi: parsing \"\": invalid syntax"}
curl -XPOST --unix-socket /var/run/docker.sock 'http://localhost/v1.47/containers/foo/resize?w=&h='
{"message":"strconv.Atoi: parsing \"\": invalid syntax"}
curl -XPOST --unix-socket /var/run/docker.sock 'http://localhost/v1.47/containers/foo/resize?w=100&h='
{"message":"strconv.Atoi: parsing \"\": invalid syntax"}
curl -XPOST --unix-socket /var/run/docker.sock 'http://localhost/v1.47/containers/foo/resize?w=100&h=100'
This patch updates the swagger to reflect that these parameters are required.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>