api: omit missing Created field from ImageInspect response
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
This commit is contained in:
parent
c70d7905fb
commit
881260148f
4 changed files with 18 additions and 8 deletions
|
@ -1746,9 +1746,13 @@ definitions:
|
||||||
Created:
|
Created:
|
||||||
description: |
|
description: |
|
||||||
Date and time at which the image was created, formatted in
|
Date and time at which the image was created, formatted in
|
||||||
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds, or empty if the field was not set in the image config.
|
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
|
||||||
|
|
||||||
|
This information is only available if present in the image,
|
||||||
|
and omitted otherwise.
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
format: "dateTime"
|
||||||
|
x-nullable: true
|
||||||
example: "2022-02-04T21:20:12.497794809Z"
|
example: "2022-02-04T21:20:12.497794809Z"
|
||||||
Container:
|
Container:
|
||||||
description: |
|
description: |
|
||||||
|
|
|
@ -72,7 +72,10 @@ type ImageInspect struct {
|
||||||
|
|
||||||
// Created is the date and time at which the image was created, formatted in
|
// Created is the date and time at which the image was created, formatted in
|
||||||
// RFC 3339 nano-seconds (time.RFC3339Nano).
|
// RFC 3339 nano-seconds (time.RFC3339Nano).
|
||||||
Created string
|
//
|
||||||
|
// This information is only available if present in the image,
|
||||||
|
// and omitted otherwise.
|
||||||
|
Created string `json:",omitempty"`
|
||||||
|
|
||||||
// Container is the ID of the container that was used to create the image.
|
// Container is the ID of the container that was used to create the image.
|
||||||
//
|
//
|
||||||
|
|
|
@ -1742,9 +1742,13 @@ definitions:
|
||||||
Created:
|
Created:
|
||||||
description: |
|
description: |
|
||||||
Date and time at which the image was created, formatted in
|
Date and time at which the image was created, formatted in
|
||||||
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds, or empty if the field was not set in the image config.
|
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
|
||||||
|
|
||||||
|
This information is only available if present in the image,
|
||||||
|
and omitted otherwise.
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
format: "dateTime"
|
||||||
|
x-nullable: true
|
||||||
example: "2022-02-04T21:20:12.497794809Z"
|
example: "2022-02-04T21:20:12.497794809Z"
|
||||||
Container:
|
Container:
|
||||||
description: |
|
description: |
|
||||||
|
|
|
@ -86,9 +86,8 @@ keywords: "API, Docker, rcli, REST, documentation"
|
||||||
`SecondaryIPv6Addresses` available in `NetworkSettings` when calling `GET /containers/{id}/json` are
|
`SecondaryIPv6Addresses` available in `NetworkSettings` when calling `GET /containers/{id}/json` are
|
||||||
deprecated and will be removed in a future release. You should instead look for the default network in
|
deprecated and will be removed in a future release. You should instead look for the default network in
|
||||||
`NetworkSettings.Networks`.
|
`NetworkSettings.Networks`.
|
||||||
* `GET /images/{id}/json` now responds with an empty `Created` field
|
* `GET /images/{id}/json` omits the `Created` field (previously it was `0001-01-01T00:00:00Z`)
|
||||||
(previously it was `0001-01-01T00:00:00Z`) if the `Created` field is missing
|
if the `Created` field is missing from the image config.
|
||||||
from the image config.
|
|
||||||
|
|
||||||
## v1.43 API changes
|
## v1.43 API changes
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue