mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
API: remove deprecated "filter" parameter for API v1.41 and up
This query-parameter was deprecated in docker 1.13 in commit
820b809e70
, and scheduled for
removal in docker 17.12, so we should remove it for the next
API version.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
adf066416f
commit
4a1900915a
2 changed files with 9 additions and 4 deletions
|
@ -231,10 +231,12 @@ func (s *imageRouter) getImagesJSON(ctx context.Context, w http.ResponseWriter,
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
filterParam := r.Form.Get("filter")
|
version := httputils.VersionFromContext(ctx)
|
||||||
// FIXME(vdemeester) This has been deprecated in 1.13, and is target for removal for v17.12
|
if versions.LessThan(version, "1.41") {
|
||||||
if filterParam != "" {
|
filterParam := r.Form.Get("filter")
|
||||||
imageFilters.Add("reference", filterParam)
|
if filterParam != "" {
|
||||||
|
imageFilters.Add("reference", filterParam)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
images, err := s.backend.Images(imageFilters, httputils.BoolValue(r, "all"), false)
|
images, err := s.backend.Images(imageFilters, httputils.BoolValue(r, "all"), false)
|
||||||
|
|
|
@ -17,6 +17,9 @@ keywords: "API, Docker, rcli, REST, documentation"
|
||||||
|
|
||||||
[Docker Engine API v1.41](https://docs.docker.com/engine/api/v1.41/) documentation
|
[Docker Engine API v1.41](https://docs.docker.com/engine/api/v1.41/) documentation
|
||||||
|
|
||||||
|
* The `filter` (singular) query parameter, which was deprecated in favor of the
|
||||||
|
`filters` option in Docker 1.13, has now been removed from the `GET /images/json`
|
||||||
|
endpoint. The parameter remains available when using API version 1.40 or below.
|
||||||
* `GET /services` now returns `Capabilities` as part of the `ContainerSpec`.
|
* `GET /services` now returns `Capabilities` as part of the `ContainerSpec`.
|
||||||
* `GET /services/{id}` now returns `Capabilities` as part of the `ContainerSpec`.
|
* `GET /services/{id}` now returns `Capabilities` as part of the `ContainerSpec`.
|
||||||
* `POST /services/create` now accepts `Capabilities` as part of the `ContainerSpec`.
|
* `POST /services/create` now accepts `Capabilities` as part of the `ContainerSpec`.
|
||||||
|
|
Loading…
Add table
Reference in a new issue