1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #40491 from thaJeztah/remove_deprecated_filters_opt

API: remove deprecated "filter" parameter for API v1.41 and up
This commit is contained in:
Sebastiaan van Stijn 2020-02-11 11:22:44 +01:00 committed by GitHub
commit cb3ec99b16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View file

@ -231,10 +231,12 @@ func (s *imageRouter) getImagesJSON(ctx context.Context, w http.ResponseWriter,
return err
}
filterParam := r.Form.Get("filter")
// FIXME(vdemeester) This has been deprecated in 1.13, and is target for removal for v17.12
if filterParam != "" {
imageFilters.Add("reference", filterParam)
version := httputils.VersionFromContext(ctx)
if versions.LessThan(version, "1.41") {
filterParam := r.Form.Get("filter")
if filterParam != "" {
imageFilters.Add("reference", filterParam)
}
}
images, err := s.backend.Images(imageFilters, httputils.BoolValue(r, "all"), false)

View file

@ -17,6 +17,9 @@ keywords: "API, Docker, rcli, REST, 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/{id}` now returns `Capabilities` as part of the `ContainerSpec`.
* `POST /services/create` now accepts `Capabilities` as part of the `ContainerSpec`.