Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: document w (width) and h (height) query params as required
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 amends the swagger to reflect that these parameters are required. Signed-off-by: Sebastiaan van Stijn <[email protected]>
- Loading branch information