Browse code

Adjust minimum API version for templated configs/secrets

Also adds a note to the API version history

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2018/02/21 21:50:48
Showing 2 changed files
... ...
@@ -373,7 +373,7 @@ func (sr *swarmRouter) createSecret(ctx context.Context, w http.ResponseWriter,
373 373
 		return err
374 374
 	}
375 375
 	version := httputils.VersionFromContext(ctx)
376
-	if secret.Templating != nil && versions.LessThan(version, "1.36") {
376
+	if secret.Templating != nil && versions.LessThan(version, "1.37") {
377 377
 		return errdefs.InvalidParameter(errors.Errorf("secret templating is not supported on the specified API version: %s", version))
378 378
 	}
379 379
 
... ...
@@ -445,7 +445,7 @@ func (sr *swarmRouter) createConfig(ctx context.Context, w http.ResponseWriter,
445 445
 	}
446 446
 
447 447
 	version := httputils.VersionFromContext(ctx)
448
-	if config.Templating != nil && versions.LessThan(version, "1.36") {
448
+	if config.Templating != nil && versions.LessThan(version, "1.37") {
449 449
 		return errdefs.InvalidParameter(errors.Errorf("config templating is not supported on the specified API version: %s", version))
450 450
 	}
451 451
 
... ...
@@ -18,6 +18,10 @@ keywords: "API, Docker, rcli, REST, documentation"
18 18
 [Docker Engine API v1.37](https://docs.docker.com/engine/api/v1.36/) documentation
19 19
 
20 20
 * `POST /containers/create` and `POST /services/create` now supports exposing SCTP ports.
21
+* `POST /configs/create` and `POST /configs/{id}/create` now accept a `Templating` driver.
22
+* `GET /configs` and `GET /configs/{id}` now return the `Templating` driver of the config.
23
+* `POST /secrets/create` and `POST /secrets/{id}/create` now accept a `Templating` driver.
24
+* `GET /secrets` and `GET /secrets/{id}` now return the `Templating` driver of the secret.
21 25
 
22 26
 ## v1.36 API changes
23 27