From 843abeb899becc8a3a0da6116fb4342c02f0ed12 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Sun, 24 Apr 2022 23:12:22 +0200 Subject: [PATCH 1/3] Pull documentation/description updates from the most recent swagger.yaml. See https://github.com/moby/moby/blob/e78f6f9c68fee84430b76738c328d5b51d9c853a/api/swagger.yaml --- api-model-v1-41/docker-engine-api-v1.41.yaml | 446 +++++++++++++----- api-model-v1-41/docs/ContainerConfig.md | 6 +- api-model-v1-41/docs/GraphDriverData.md | 4 +- api-model-v1-41/docs/HostConfig.md | 4 +- api-model-v1-41/docs/HostConfigAllOf.md | 2 +- api-model-v1-41/docs/Resources.md | 2 +- .../docker/remote/api/ContainerConfig.kt | 10 +- .../docker/remote/api/GraphDriverData.kt | 8 +- .../gesellix/docker/remote/api/HostConfig.kt | 6 +- .../docker/remote/api/HostConfigAllOf.kt | 2 +- .../docker/remote/api/ImageSummary.kt | 32 +- .../gesellix/docker/remote/api/MountPoint.kt | 26 +- .../gesellix/docker/remote/api/Resources.kt | 4 +- 13 files changed, 401 insertions(+), 151 deletions(-) diff --git a/api-model-v1-41/docker-engine-api-v1.41.yaml b/api-model-v1-41/docker-engine-api-v1.41.yaml index fcbedd89..3cc940a6 100644 --- a/api-model-v1-41/docker-engine-api-v1.41.yaml +++ b/api-model-v1-41/docker-engine-api-v1.41.yaml @@ -202,24 +202,66 @@ definitions: MountPoint: type: "object" - description: "A mount point inside a container" + description: | + MountPoint represents a mount point configuration inside the container. + This is used for reporting the mountpoints in use by a container. properties: Type: + description: | + The mount type: + + - `bind` a mount of a file or directory from the host into the container. + - `volume` a docker volume with the given `Name`. + - `tmpfs` a `tmpfs`. + - `npipe` a named pipe from the host into the container. type: "string" Name: + description: | + Name is the name reference to the underlying data defined by `Source` + e.g., the volume name. type: "string" + example: "myvolume" Source: + description: | + Source location of the mount. + + For volumes, this contains the storage location of the volume (within + `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains + the source (host) part of the bind-mount. For `tmpfs` mount points, this + field is empty. type: "string" + example: "/var/lib/docker/volumes/myvolume/_data" Destination: + description: | + Destination is the path relative to the container root (`/`) where + the `Source` is mounted inside the container. type: "string" + example: "/usr/share/nginx/html/" Driver: + description: | + Driver is the volume driver used to create the volume (if it is a volume). type: "string" + example: "local" Mode: + description: | + Mode is a comma separated list of options supplied by the user when + creating the bind/volume mount. + + The default is platform-specific (`"z"` on Linux, empty on Windows). type: "string" + example: "z" RW: + description: | + Whether the mount is mounted writable (read-write). type: "boolean" + example: true Propagation: + description: | + Propagation describes how mounts are propagated from the host into the + mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) + for details. This field is not used on Windows. type: "string" + example: "" DeviceMapping: type: "object" @@ -541,7 +583,12 @@ definitions: format: "int64" example: 209715200 KernelMemoryTCP: - description: "Hard limit for kernel TCP buffer memory (in bytes)." + description: | + Hard limit for kernel TCP buffer memory (in bytes). Depending on the + OCI runtime in use, this option may be ignored. It is no longer supported + by the default (runc) runtime. + + This field is omitted when empty. type: "integer" format: "int64" MemoryReservation: @@ -1029,8 +1076,9 @@ definitions: description: "Mount the container's root filesystem as read only." SecurityOpt: type: "array" - description: "A list of string values to customize labels for MLS - systems, such as SELinux." + description: | + A list of string values to customize labels for MLS systems, such + as SELinux. items: type: "string" StorageOpt: @@ -1111,14 +1159,25 @@ definitions: type: "string" ContainerConfig: - description: "Configuration for a container that is portable between hosts" + description: | + Configuration for a container that is portable between hosts. + + When used as `ContainerConfig` field in an image, `ContainerConfig` is an + optional field containing the configuration of the container that was last + committed when creating the image. + + Previous versions of Docker builder used this field to store build cache, + and it is not in active use anymore. type: "object" properties: Hostname: - description: "The hostname to use for the container, as a valid RFC 1123 hostname." + description: | + The hostname to use for the container, as a valid RFC 1123 hostname. type: "string" + example: "439f4e91bd1d" Domainname: - description: "The domain name to use for the container." + description: | + The domain name to use for the container. type: "string" User: description: "The user that commands are run as inside the container." @@ -1146,6 +1205,10 @@ definitions: enum: - {} default: {} + example: { + "80/tcp": {}, + "443/tcp": {} + } Tty: description: | Attach standard streams to a TTY, including `stdin` if it is not closed. @@ -1167,12 +1230,15 @@ definitions: type: "array" items: type: "string" + example: + - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" Cmd: description: | Command to run specified as a string or an array of strings. type: "array" items: type: "string" + example: ["/bin/sh"] Healthcheck: $ref: "#/definitions/HealthConfig" ArgsEscaped: @@ -1180,8 +1246,10 @@ definitions: type: "boolean" Image: description: | - The name of the image to use when creating the container/ + The name (or reference) of the image to use when creating the container, + or which was used when the container was created. type: "string" + example: "example-image:1.0" Volumes: description: | An object mapping mount point paths inside the container to empty @@ -1195,6 +1263,7 @@ definitions: WorkingDir: description: "The working directory for commands to run in." type: "string" + example: "/public/" Entrypoint: description: | The entry point for the container as a string or an array of strings. @@ -1205,6 +1274,7 @@ definitions: type: "array" items: type: "string" + example: [] NetworkDisabled: description: "Disable networking for the container." type: "boolean" @@ -1217,11 +1287,15 @@ definitions: type: "array" items: type: "string" + example: [] Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" StopSignal: description: | Signal to stop a container as a string or unsigned integer. @@ -1237,6 +1311,7 @@ definitions: type: "array" items: type: "string" + example: ["/bin/sh", "-c"] NetworkingConfig: description: | @@ -1493,107 +1568,209 @@ definitions: example: "4443" GraphDriverData: - description: "Information about a container's graph driver." + description: | + Information about the storage driver used to store the container's and + image's filesystem. type: "object" required: [Name, Data] properties: Name: + description: "Name of the storage driver." type: "string" x-nullable: false + example: "overlay2" Data: + description: | + Low-level storage metadata, provided as key/value pairs. + + This information is driver-specific, and depends on the storage-driver + in use, and should be used for informational purposes only. type: "object" x-nullable: true additionalProperties: type: "string" + example: { + "MergedDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/merged", + "UpperDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/diff", + "WorkDir": "/var/lib/docker/overlay2/ef749362d13333e65fc95c572eb525abbe0052e16e086cb64bc3b98ae9aa6d74/work" + } - Image: + ImageInspect: + description: | + Information about an image in the local image cache. type: "object" - required: - - Id - - Parent - - Comment - - Created - - Container - - DockerVersion - - Author - - Architecture - - Os - - Size - - VirtualSize - - GraphDriver - - RootFS properties: Id: + description: | + ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. type: "string" x-nullable: false + example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" RepoTags: + description: | + List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image, and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. type: "array" items: type: "string" + example: + - "example:1.0" + - "example:latest" + - "example:stable" + - "internal.registry.example.com:5000/example:1.0" RepoDigests: + description: | + List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. type: "array" items: type: "string" + example: + - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" + - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" Parent: + description: | + ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. type: "string" x-nullable: false + example: "" Comment: + description: | + Optional message that was set when committing or importing the image. type: "string" x-nullable: false + example: "" Created: + description: | + Date and time at which the image was created, formatted in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" x-nullable: false + example: "2022-02-04T21:20:12.497794809Z" Container: + description: | + The ID of the container that was used to create the image. + + Depending on how the image was created, this field may be empty. type: "string" x-nullable: false + example: "65974bc86f1770ae4bff79f651ebdbce166ae9aada632ee3fa9af3a264911735" ContainerConfig: $ref: "#/definitions/ContainerConfig" DockerVersion: + description: | + The version of Docker that was used to build the image. + + Depending on how the image was created, this field may be empty. type: "string" x-nullable: false + example: "20.10.7" Author: + description: | + Name of the author that was specified when committing the image, or as + specified through MAINTAINER (deprecated) in the Dockerfile. type: "string" x-nullable: false + example: "" Config: $ref: "#/definitions/ContainerConfig" Architecture: + description: | + Hardware CPU architecture that the image runs on. type: "string" x-nullable: false + example: "arm" Os: + description: | + Operating System the image is built to run on. type: "string" x-nullable: false + example: "linux" OsVersion: + description: | + Operating System version the image is built to run on (especially + for Windows). type: "string" + example: "" Size: + description: | + Total size of the image including all layers it is composed of. type: "integer" format: "int64" x-nullable: false + example: 1239828 VirtualSize: + description: | + Total size of the image including all layers it is composed of. + + In versions of Docker before v1.10, this field was calculated from + the image itself and all of its parent images. Docker v1.10 and up + store images self-contained, and no longer use a parent-chain, making + this field an equivalent of the Size field. + + This field is kept for backward compatibility, but may be removed in + a future version of the API. type: "integer" format: "int64" x-nullable: false + example: 1239828 GraphDriver: $ref: "#/definitions/GraphDriverData" RootFS: + description: | + Information about the image's RootFS, including the layer IDs. type: "object" required: [Type] properties: Type: type: "string" x-nullable: false + example: "layers" Layers: type: "array" items: type: "string" + example: + - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" + - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" BaseLayer: type: "string" Metadata: + description: | + Additional metadata of the image in the local cache. This information + is local to the daemon, and not part of the image itself. type: "object" properties: LastTagTime: + description: | + Date and time at which the image was last tagged in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + + This information is only available if the image was tagged locally, + and omitted otherwise. type: "string" format: "dateTime" - + example: "2022-02-28T14:40:02.623929178Z" ImageSummary: type: "object" required: @@ -1609,41 +1786,99 @@ definitions: - Containers properties: Id: + description: | + ID is the content-addressable ID of an image. + + This identifier is a content-addressable digest calculated from the + image's configuration (which includes the digests of layers used by + the image). + + Note that this digest differs from the `RepoDigests` below, which + holds digests of image manifests that reference the image. type: "string" x-nullable: false + example: "sha256:ec3f0931a6e6b6855d76b2d7b0be30e81860baccd891b2e243280bf1cd8ad710" ParentId: + description: | + ID of the parent image. + + Depending on how the image was created, this field may be empty and + is only set for images that were built/created locally. This field + is empty if the image was pulled from an image registry. type: "string" x-nullable: false + example: "" RepoTags: + description: | + List of image names/tags in the local image cache that reference this + image. + + Multiple image tags can refer to the same image and this list may be + empty if no tags reference the image, in which case the image is + "untagged", in which case it can still be referenced by its ID. type: "array" x-nullable: true items: type: "string" + example: + - "example:1.0" + - "example:latest" + - "example:stable" + - "internal.registry.example.com:5000/example:1.0" RepoDigests: + description: | + List of content-addressable digests of locally available image manifests + that the image is referenced from. Multiple manifests can refer to the + same image. + + These digests are usually only available if the image was either pulled + from a registry, or if the image was pushed to a registry, which is when + the manifest is generated and its digest calculated. type: "array" x-nullable: true items: type: "string" + example: + - "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb" + - "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" Created: + description: | + Date and time at which the image was created as a Unix timestamp + (number of seconds sinds EPOCH). type: "integer" x-nullable: false + example: "1644009612" Size: type: "number" x-nullable: false + example: 172064416 SharedSize: type: "number" x-nullable: false + example: 1239828 VirtualSize: type: "number" x-nullable: false + example: 172064416 Labels: + description: "User-defined key/value metadata." type: "object" x-nullable: true additionalProperties: type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" Containers: + description: | + Number of containers using this image. Includes both stopped and running + containers. + + This size is not calculated by default, and depends on which API endpoint + is used. `-1` indicates that the value has not been set / calculated. x-nullable: false type: "integer" + example: 2 AuthConfig: type: "object" @@ -1685,18 +1920,22 @@ definitions: type: "string" description: "Name of the volume." x-nullable: false + example: "tardis" Driver: type: "string" description: "Name of the volume driver used by the volume." x-nullable: false + example: "custom" Mountpoint: type: "string" description: "Mount path of the volume on the host." x-nullable: false + example: "/var/lib/docker/volumes/tardis" CreatedAt: type: "string" format: "dateTime" description: "Date/Time the volume was created." + example: "2016-06-07T20:31:11.853781916Z" Status: type: "object" description: | @@ -1708,12 +1947,17 @@ definitions: does not support this feature. additionalProperties: type: "object" + example: + hello: "world" Labels: type: "object" description: "User-defined key/value metadata." x-nullable: true additionalProperties: type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" Scope: type: "string" description: | @@ -1722,6 +1966,7 @@ definitions: default: "local" x-nullable: true enum: ["local", "global"] + example: "local" Options: type: "object" x-nullable: true @@ -1729,6 +1974,10 @@ definitions: The driver specific options used when creating the volume. additionalProperties: type: "string" + example: + device: "tmpfs" + o: "size=100m,uid=1000" + type: "tmpfs" UsageData: type: "object" x-nullable: true @@ -3645,6 +3894,7 @@ definitions: ServiceSpec: description: "User modifiable configuration for a service." + type: object properties: Name: description: "Name of the service." @@ -4282,6 +4532,29 @@ definitions: x-nullable: true $ref: "#/definitions/Health" + ContainerWaitResponse: + description: "OK response to ContainerWait operation" + type: "object" + x-go-name: "ContainerWaitOKBody" + title: "ContainerWaitResponse" + required: [StatusCode, Error] + properties: + StatusCode: + description: "Exit code of the container" + type: "integer" + x-nullable: false + Error: + $ref: "#/definitions/ContainerWaitExitError" + + ContainerWaitExitError: + description: "container waiting error, if any" + type: "object" + x-go-name: "ContainerWaitOKBodyError" + properties: + Message: + description: "Details of an error" + type: "string" + SystemVersion: type: "object" description: | @@ -5179,6 +5452,7 @@ definitions: PeerNode: description: "Represents a peer-node in the swarm" + type: "object" properties: NodeID: description: "Unique identifier of for this node in the swarm." @@ -6605,7 +6879,8 @@ paths: type: "string" - name: "signal" in: "query" - description: "Signal to send to the container as an integer or string (e.g. `SIGINT`)" + description: | + Signal to send to the container as an integer or string (e.g. `SIGINT`). type: "string" default: "SIGKILL" tags: ["Container"] @@ -7044,8 +7319,9 @@ paths: - name: "condition" in: "query" description: | - Wait until a container state reaches the given condition, either - 'not-running' (default), 'next-exit', or 'removed'. + Wait until a container state reaches the given condition. + + Defaults to `not-running` if omitted or empty. type: "string" default: "not-running" tags: ["Container"] @@ -7203,7 +7479,10 @@ paths: tags: ["Container"] put: summary: "Extract an archive of files or folders to a directory in a container" - description: "Upload a tar archive to be extracted to a path in the filesystem of container id." + description: | + Upload a tar archive to be extracted to a path in the filesystem of container id. + `path` parameter is asserted to be a directory. If it exists as a file, 400 error + will be returned with message "not a directory". operationId: "PutContainerArchive" consumes: ["application/x-tar", "application/octet-stream"] responses: @@ -7213,6 +7492,9 @@ paths: description: "Bad parameter" schema: $ref: "#/definitions/ErrorResponse" + examples: + application/json: + message: "not a directory" 403: description: "Permission denied, the volume or container rootfs is marked as read-only." schema: @@ -7314,35 +7596,6 @@ paths: type: "array" items: $ref: "#/definitions/ImageSummary" - examples: - application/json: - - Id: "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8" - ParentId: "" - RepoTags: - - "ubuntu:12.04" - - "ubuntu:precise" - RepoDigests: - - "ubuntu@sha256:992069aee4016783df6345315302fa59681aae51a8eeb2f889dea59290f21787" - Created: 1474925151 - Size: 103579269 - VirtualSize: 103579269 - SharedSize: 0 - Labels: {} - Containers: 2 - - Id: "sha256:3e314f95dcace0f5e4fd37b10862fe8398e3c60ed36600bc0ca5fda78b087175" - ParentId: "" - RepoTags: - - "ubuntu:12.10" - - "ubuntu:quantal" - RepoDigests: - - "ubuntu@sha256:002fba3e3255af10be97ea26e476692a7ebed0bb074a9ab960b2e7a1526b15d7" - - "ubuntu@sha256:68ea0200f0b90df725d99d823905b04cf844f6039ef60c60bf3e019915017bd3" - Created: 1403128455 - Size: 172064416 - VirtualSize: 172064416 - SharedSize: 0 - Labels: {} - Containers: 5 500: description: "server error" schema: @@ -7679,7 +7932,22 @@ paths: type: "string" - name: "platform" in: "query" - description: "Platform in the format os[/arch[/variant]]" + description: | + Platform in the format os[/arch[/variant]]. + + When used in combination with the `fromImage` option, the daemon checks + if the given image is present in the local image cache with the given + OS and Architecture, and otherwise attempts to pull the image. If the + option is not set, the host's native OS and Architecture are used. + If the given image does not exist in the local image cache, the daemon + attempts to pull the image with the host's native OS and Architecture. + If the given image does exists in the local image cache, but its OS or + architecture does not match, a warning is produced. + + When used with the `fromSrc` option to import an image from an archive, + this option sets the platform information for the imported image. If + the option is not set, the host's native OS and Architecture are used + for the imported image. type: "string" default: "" tags: ["Image"] @@ -8773,12 +9041,22 @@ paths: if `tty` was specified as part of creating and starting the exec instance. operationId: "ExecResize" responses: + 200: + description: "No error" 201: description: "No error" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" 404: description: "No such exec instance" schema: $ref: "#/definitions/ErrorResponse" + 500: + description: "Server error" + schema: + $ref: "#/definitions/ErrorResponse" parameters: - name: "id" in: "path" @@ -8894,23 +9172,6 @@ paths: Warnings that occurred when fetching the list of volumes. items: type: "string" - - examples: - application/json: - Volumes: - - CreatedAt: "2017-07-19T12:00:26Z" - Name: "tardis" - Driver: "local" - Mountpoint: "/var/lib/docker/volumes/tardis" - Labels: - com.example.some-label: "some-value" - com.example.some-other-label: "some-other-value" - Scope: "local" - Options: - device: "tmpfs" - o: "size=100m,uid=1000" - type: "tmpfs" - Warnings: [] 500: description: "Server error" schema: @@ -8955,38 +9216,7 @@ paths: required: true description: "Volume configuration" schema: - type: "object" - description: "Volume configuration" - title: "VolumeConfig" - properties: - Name: - description: | - The new volume's name. If not specified, Docker generates a name. - type: "string" - x-nullable: false - Driver: - description: "Name of the volume driver to use." - type: "string" - default: "local" - x-nullable: false - DriverOpts: - description: | - A mapping of driver options and values. These options are - passed directly to the driver and are driver specific. - type: "object" - additionalProperties: - type: "string" - Labels: - description: "User-defined key/value metadata." - type: "object" - additionalProperties: - type: "string" - example: - Name: "tardis" - Labels: - com.example.some-label: "some-value" - com.example.some-other-label: "some-other-value" - Driver: "custom" + $ref: "#/definitions/VolumeCreateOptions" tags: ["Volume"] /volumes/{name}: diff --git a/api-model-v1-41/docs/ContainerConfig.md b/api-model-v1-41/docs/ContainerConfig.md index 2f902beb..6b7817b5 100644 --- a/api-model-v1-41/docs/ContainerConfig.md +++ b/api-model-v1-41/docs/ContainerConfig.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hostname** | **kotlin.String** | The hostname to use for the container, as a valid RFC 1123 hostname. | [optional] -**domainname** | **kotlin.String** | The domain name to use for the container. | [optional] +**hostname** | **kotlin.String** | The hostname to use for the container, as a valid RFC 1123 hostname. | [optional] +**domainname** | **kotlin.String** | The domain name to use for the container. | [optional] **user** | **kotlin.String** | The user that commands are run as inside the container. | [optional] **attachStdin** | **kotlin.Boolean** | Whether to attach to `stdin`. | [optional] **attachStdout** | **kotlin.Boolean** | Whether to attach to `stdout`. | [optional] @@ -18,7 +18,7 @@ Name | Type | Description | Notes **cmd** | **kotlin.collections.MutableList<kotlin.String>** | Command to run specified as a string or an array of strings. | [optional] **healthcheck** | [**HealthConfig**](HealthConfig.md) | | [optional] **argsEscaped** | **kotlin.Boolean** | Command is already escaped (Windows only) | [optional] -**image** | **kotlin.String** | The name of the image to use when creating the container/ | [optional] +**image** | **kotlin.String** | The name (or reference) of the image to use when creating the container, or which was used when the container was created. | [optional] **volumes** | [**kotlin.collections.MutableMap<kotlin.String, kotlin.Any>**](kotlin.Any.md) | An object mapping mount point paths inside the container to empty objects. | [optional] **workingDir** | **kotlin.String** | The working directory for commands to run in. | [optional] **entrypoint** | **kotlin.collections.MutableList<kotlin.String>** | The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). | [optional] diff --git a/api-model-v1-41/docs/GraphDriverData.md b/api-model-v1-41/docs/GraphDriverData.md index 76ec7193..688e7ea0 100644 --- a/api-model-v1-41/docs/GraphDriverData.md +++ b/api-model-v1-41/docs/GraphDriverData.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **kotlin.String** | | -**`data`** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | | +**name** | **kotlin.String** | Name of the storage driver. | +**`data`** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. | diff --git a/api-model-v1-41/docs/HostConfig.md b/api-model-v1-41/docs/HostConfig.md index ace35548..146a472a 100644 --- a/api-model-v1-41/docs/HostConfig.md +++ b/api-model-v1-41/docs/HostConfig.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes **deviceCgroupRules** | **kotlin.collections.MutableList<kotlin.String>** | a list of cgroup rules to apply to the container | [optional] **deviceRequests** | [**kotlin.collections.MutableList<DeviceRequest>**](DeviceRequest.md) | A list of requests for devices to be sent to device drivers. | [optional] **kernelMemory** | **kotlin.Long** | Kernel memory limit in bytes. <p><br /></p> > **Deprecated**: This field is deprecated as the kernel 5.4 deprecated > `kmem.limit_in_bytes`. | [optional] -**kernelMemoryTCP** | **kotlin.Long** | Hard limit for kernel TCP buffer memory (in bytes). | [optional] +**kernelMemoryTCP** | **kotlin.Long** | Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. | [optional] **memoryReservation** | **kotlin.Long** | Memory soft limit in bytes. | [optional] **memorySwap** | **kotlin.Long** | Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. | [optional] **memorySwappiness** | **kotlin.Long** | Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. | [optional] @@ -62,7 +62,7 @@ Name | Type | Description | Notes **privileged** | **kotlin.Boolean** | Gives the container full access to the host. | [optional] **publishAllPorts** | **kotlin.Boolean** | Allocates an ephemeral host port for all of a container's exposed ports. Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container. The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`. | [optional] **readonlyRootfs** | **kotlin.Boolean** | Mount the container's root filesystem as read only. | [optional] -**securityOpt** | **kotlin.collections.MutableList<kotlin.String>** | A list of string values to customize labels for MLS systems, such as SELinux. | [optional] +**securityOpt** | **kotlin.collections.MutableList<kotlin.String>** | A list of string values to customize labels for MLS systems, such as SELinux. | [optional] **storageOpt** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | Storage driver options for this container, in the form `{\"size\": \"120G\"}`. | [optional] **tmpfs** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: ``` { \"/run\": \"rw,noexec,nosuid,size=65536k\" } ``` | [optional] **utSMode** | **kotlin.String** | UTS namespace to use for the container. | [optional] diff --git a/api-model-v1-41/docs/HostConfigAllOf.md b/api-model-v1-41/docs/HostConfigAllOf.md index 0fca5c44..123827af 100644 --- a/api-model-v1-41/docs/HostConfigAllOf.md +++ b/api-model-v1-41/docs/HostConfigAllOf.md @@ -30,7 +30,7 @@ Name | Type | Description | Notes **privileged** | **kotlin.Boolean** | Gives the container full access to the host. | [optional] **publishAllPorts** | **kotlin.Boolean** | Allocates an ephemeral host port for all of a container's exposed ports. Ports are de-allocated when the container stops and allocated when the container starts. The allocated port might be changed when restarting the container. The port is selected from the ephemeral port range that depends on the kernel. For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`. | [optional] **readonlyRootfs** | **kotlin.Boolean** | Mount the container's root filesystem as read only. | [optional] -**securityOpt** | **kotlin.collections.MutableList<kotlin.String>** | A list of string values to customize labels for MLS systems, such as SELinux. | [optional] +**securityOpt** | **kotlin.collections.MutableList<kotlin.String>** | A list of string values to customize labels for MLS systems, such as SELinux. | [optional] **storageOpt** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | Storage driver options for this container, in the form `{\"size\": \"120G\"}`. | [optional] **tmpfs** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | A map of container directories which should be replaced by tmpfs mounts, and their corresponding mount options. For example: ``` { \"/run\": \"rw,noexec,nosuid,size=65536k\" } ``` | [optional] **utSMode** | **kotlin.String** | UTS namespace to use for the container. | [optional] diff --git a/api-model-v1-41/docs/Resources.md b/api-model-v1-41/docs/Resources.md index 3a1a75a3..bab9bf80 100644 --- a/api-model-v1-41/docs/Resources.md +++ b/api-model-v1-41/docs/Resources.md @@ -23,7 +23,7 @@ Name | Type | Description | Notes **deviceCgroupRules** | **kotlin.collections.MutableList<kotlin.String>** | a list of cgroup rules to apply to the container | [optional] **deviceRequests** | [**kotlin.collections.MutableList<DeviceRequest>**](DeviceRequest.md) | A list of requests for devices to be sent to device drivers. | [optional] **kernelMemory** | **kotlin.Long** | Kernel memory limit in bytes. <p><br /></p> > **Deprecated**: This field is deprecated as the kernel 5.4 deprecated > `kmem.limit_in_bytes`. | [optional] -**kernelMemoryTCP** | **kotlin.Long** | Hard limit for kernel TCP buffer memory (in bytes). | [optional] +**kernelMemoryTCP** | **kotlin.Long** | Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. | [optional] **memoryReservation** | **kotlin.Long** | Memory soft limit in bytes. | [optional] **memorySwap** | **kotlin.Long** | Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. | [optional] **memorySwappiness** | **kotlin.Long** | Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. | [optional] diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerConfig.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerConfig.kt index 1ed964fb..0e405887 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerConfig.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerConfig.kt @@ -24,7 +24,7 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** - * Configuration for a container that is portable between hosts + * Configuration for a container that is portable between hosts. When used as `ContainerConfig` field in an image, `ContainerConfig` is an optional field containing the configuration of the container that was last committed when creating the image. Previous versions of Docker builder used this field to store build cache, and it is not in active use anymore. * * @param hostname The hostname to use for the container, as a valid RFC 1123 hostname. * @param domainname The domain name to use for the container. @@ -40,7 +40,7 @@ import com.squareup.moshi.JsonClass * @param cmd Command to run specified as a string or an array of strings. * @param healthcheck * @param argsEscaped Command is already escaped (Windows only) - * @param image The name of the image to use when creating the container/ + * @param image The name (or reference) of the image to use when creating the container, or which was used when the container was created. * @param volumes An object mapping mount point paths inside the container to empty objects. * @param workingDir The working directory for commands to run in. * @param entrypoint The entry point for the container as a string or an array of strings. If the array consists of exactly one empty string (`[\"\"]`) then the entry point is reset to system default (i.e., the entry point used by docker when there is no `ENTRYPOINT` instruction in the `Dockerfile`). @@ -55,11 +55,11 @@ import com.squareup.moshi.JsonClass @JsonClass(generateAdapter = true) data class ContainerConfig( - /* The hostname to use for the container, as a valid RFC 1123 hostname. */ + /* The hostname to use for the container, as a valid RFC 1123 hostname. */ @Json(name = "Hostname") var hostname: kotlin.String? = null, - /* The domain name to use for the container. */ + /* The domain name to use for the container. */ @Json(name = "Domainname") var domainname: kotlin.String? = null, @@ -110,7 +110,7 @@ data class ContainerConfig( @Json(name = "ArgsEscaped") var argsEscaped: kotlin.Boolean? = null, - /* The name of the image to use when creating the container/ */ + /* The name (or reference) of the image to use when creating the container, or which was used when the container was created. */ @Json(name = "Image") var image: kotlin.String? = null, diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/GraphDriverData.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/GraphDriverData.kt index af13adc5..5e3bff19 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/GraphDriverData.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/GraphDriverData.kt @@ -24,17 +24,19 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** - * Information about a container's graph driver. + * Information about the storage driver used to store the container's and image's filesystem. * - * @param name - * @param `data` + * @param name Name of the storage driver. + * @param `data` Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. */ @JsonClass(generateAdapter = true) data class GraphDriverData( + /* Name of the storage driver. */ @Json(name = "Name") var name: kotlin.String, + /* Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. */ @Json(name = "Data") var `data`: kotlin.collections.MutableMap? diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/HostConfig.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/HostConfig.kt index efb4500f..c81736cc 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/HostConfig.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/HostConfig.kt @@ -45,7 +45,7 @@ import com.squareup.moshi.JsonClass * @param deviceCgroupRules a list of cgroup rules to apply to the container * @param deviceRequests A list of requests for devices to be sent to device drivers. * @param kernelMemory Kernel memory limit in bytes.


> **Deprecated**: This field is deprecated as the kernel 5.4 deprecated > `kmem.limit_in_bytes`. - * @param kernelMemoryTCP Hard limit for kernel TCP buffer memory (in bytes). + * @param kernelMemoryTCP Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. * @param memoryReservation Memory soft limit in bytes. * @param memorySwap Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. * @param memorySwappiness Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. @@ -176,7 +176,7 @@ data class HostConfig( @Json(name = "KernelMemory") var kernelMemory: kotlin.Long? = null, - /* Hard limit for kernel TCP buffer memory (in bytes). */ + /* Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. */ @Json(name = "KernelMemoryTCP") var kernelMemoryTCP: kotlin.Long? = null, @@ -330,7 +330,7 @@ data class HostConfig( @Json(name = "ReadonlyRootfs") var readonlyRootfs: kotlin.Boolean? = null, - /* A list of string values to customize labels for MLS systems, such as SELinux. */ + /* A list of string values to customize labels for MLS systems, such as SELinux. */ @Json(name = "SecurityOpt") var securityOpt: kotlin.collections.MutableList? = null, diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/HostConfigAllOf.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/HostConfigAllOf.kt index f5769db3..f4fefd95 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/HostConfigAllOf.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/HostConfigAllOf.kt @@ -170,7 +170,7 @@ data class HostConfigAllOf( @Json(name = "ReadonlyRootfs") var readonlyRootfs: kotlin.Boolean? = null, - /* A list of string values to customize labels for MLS systems, such as SELinux. */ + /* A list of string values to customize labels for MLS systems, such as SELinux. */ @Json(name = "SecurityOpt") var securityOpt: kotlin.collections.MutableList? = null, diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt index ee9022a0..07ffffef 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt @@ -1,7 +1,7 @@ /** * Docker Engine API * - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.41) is used. For example, calling `/info` is the same as calling `/v1.41/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.41) is used. For example, calling `/info` is the same as calling `/v1.41/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.41 * @@ -26,47 +26,57 @@ import com.squareup.moshi.JsonClass /** * * - * @param id - * @param parentId - * @param repoTags - * @param repoDigests - * @param created - * @param propertySize - * @param sharedSize - * @param virtualSize - * @param labels - * @param containers + * @param id ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. + * @param parentId ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. + * @param repoTags List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. + * @param repoDigests List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. + * @param created Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). + * @param propertySize Total size of the image including all layers it is composed of. + * @param sharedSize Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. + * @param virtualSize Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. + * @param labels User-defined key/value metadata. + * @param containers Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. */ @JsonClass(generateAdapter = true) data class ImageSummary( + /* ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. */ @Json(name = "Id") var id: kotlin.String, + /* ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. */ @Json(name = "ParentId") var parentId: kotlin.String, + /* List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same imagem and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. */ @Json(name = "RepoTags") var repoTags: kotlin.collections.MutableList?, + /* List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. */ @Json(name = "RepoDigests") var repoDigests: kotlin.collections.MutableList?, + /* Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). */ @Json(name = "Created") var created: kotlin.Int, + /* Total size of the image including all layers it is composed of. */ @Json(name = "Size") var propertySize: java.math.BigDecimal, + /* Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. */ @Json(name = "SharedSize") var sharedSize: java.math.BigDecimal, + /* Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. */ @Json(name = "VirtualSize") var virtualSize: java.math.BigDecimal, + /* User-defined key/value metadata. */ @Json(name = "Labels") var labels: kotlin.collections.MutableMap?, + /* Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. */ @Json(name = "Containers") var containers: kotlin.Int diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/MountPoint.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/MountPoint.kt index d54d91ce..57e68c97 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/MountPoint.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/MountPoint.kt @@ -24,41 +24,49 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** - * A mount point inside a container + * MountPoint represents a mount point configuration inside the container. This is used for reporting the mountpoints in use by a container. * - * @param type - * @param name - * @param source - * @param destination - * @param driver - * @param mode - * @param RW - * @param propagation + * @param type The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. + * @param name Name is the name reference to the underlying data defined by `Source` e.g., the volume name. + * @param source Source location of the mount. For volumes, this contains the storage location of the volume (within `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part of the bind-mount. For `tmpfs` mount points, this field is empty. + * @param destination Destination is the path relative to the container root (`/`) where the `Source` is mounted inside the container. + * @param driver Driver is the volume driver used to create the volume (if it is a volume). + * @param mode Mode is a comma separated list of options supplied by the user when creating the bind/volume mount. The default is platform-specific (`\"z\"` on Linux, empty on Windows). + * @param RW Whether the mount is mounted writable (read-write). + * @param propagation Propagation describes how mounts are propagated from the host into the mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) for details. This field is not used on Windows. */ @JsonClass(generateAdapter = true) data class MountPoint( + /* The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. */ @Json(name = "Type") var type: kotlin.String? = null, + /* Name is the name reference to the underlying data defined by `Source` e.g., the volume name. */ @Json(name = "Name") var name: kotlin.String? = null, + /* Source location of the mount. For volumes, this contains the storage location of the volume (within `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part of the bind-mount. For `tmpfs` mount points, this field is empty. */ @Json(name = "Source") var source: kotlin.String? = null, + /* Destination is the path relative to the container root (`/`) where the `Source` is mounted inside the container. */ @Json(name = "Destination") var destination: kotlin.String? = null, + /* Driver is the volume driver used to create the volume (if it is a volume). */ @Json(name = "Driver") var driver: kotlin.String? = null, + /* Mode is a comma separated list of options supplied by the user when creating the bind/volume mount. The default is platform-specific (`\"z\"` on Linux, empty on Windows). */ @Json(name = "Mode") var mode: kotlin.String? = null, + /* Whether the mount is mounted writable (read-write). */ @Json(name = "RW") var RW: kotlin.Boolean? = null, + /* Propagation describes how mounts are propagated from the host into the mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) for details. This field is not used on Windows. */ @Json(name = "Propagation") var propagation: kotlin.String? = null diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Resources.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Resources.kt index b09b4d1d..518b7d50 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Resources.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Resources.kt @@ -45,7 +45,7 @@ import com.squareup.moshi.JsonClass * @param deviceCgroupRules a list of cgroup rules to apply to the container * @param deviceRequests A list of requests for devices to be sent to device drivers. * @param kernelMemory Kernel memory limit in bytes.


> **Deprecated**: This field is deprecated as the kernel 5.4 deprecated > `kmem.limit_in_bytes`. - * @param kernelMemoryTCP Hard limit for kernel TCP buffer memory (in bytes). + * @param kernelMemoryTCP Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. * @param memoryReservation Memory soft limit in bytes. * @param memorySwap Total memory limit (memory + swap). Set as `-1` to enable unlimited swap. * @param memorySwappiness Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100. @@ -138,7 +138,7 @@ data class Resources( @Json(name = "KernelMemory") var kernelMemory: kotlin.Long? = null, - /* Hard limit for kernel TCP buffer memory (in bytes). */ + /* Hard limit for kernel TCP buffer memory (in bytes). Depending on the OCI runtime in use, this option may be ignored. It is no longer supported by the default (runc) runtime. This field is omitted when empty. */ @Json(name = "KernelMemoryTCP") var kernelMemoryTCP: kotlin.Long? = null, From 4be0c9187d0fa28e4cf0356bafdb432ac43415be Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Mon, 25 Apr 2022 00:20:46 +0200 Subject: [PATCH 2/3] Pull type fixes/constraints from the most recent swagger.yaml. See https://github.com/moby/moby/blob/e78f6f9c68fee84430b76738c328d5b51d9c853a/api/swagger.yaml --- api-model-v1-41/.openapi-generator/FILES | 24 +- api-model-v1-41/README.md | 12 +- api-model-v1-41/docker-engine-api-v1.41.yaml | 228 ++++++++---------- api-model-v1-41/docs/ContainerSummary.md | 2 +- ...onseError.md => ContainerWaitExitError.md} | 2 +- api-model-v1-41/docs/ContainerWaitResponse.md | 4 +- api-model-v1-41/docs/IPAM.md | 2 +- api-model-v1-41/docs/IPAMConfig.md | 13 + api-model-v1-41/docs/Image.md | 28 --- api-model-v1-41/docs/ImageInspect.md | 28 +++ api-model-v1-41/docs/ImageInspectMetadata.md | 10 + .../{ImageRootFS.md => ImageInspectRootFS.md} | 2 +- api-model-v1-41/docs/ImageMetadata.md | 10 - api-model-v1-41/docs/ImageSummary.md | 20 +- api-model-v1-41/docs/InlineResponse400.md | 11 - api-model-v1-41/docs/MountPoint.md | 23 +- ...VolumeConfig.md => VolumeCreateOptions.md} | 2 +- api-model-v1-41/docs/VolumeUsageData.md | 2 +- .../docker/remote/api/ContainerSummary.kt | 2 +- ...onseError.kt => ContainerWaitExitError.kt} | 2 +- .../remote/api/ContainerWaitResponse.kt | 4 +- .../de/gesellix/docker/remote/api/IPAM.kt | 2 +- .../api/{ImageMetadata.kt => IPAMConfig.kt} | 20 +- .../de/gesellix/docker/remote/api/Image.kt | 109 --------- .../docker/remote/api/ImageInspect.kt | 123 ++++++++++ ...Response400.kt => ImageInspectMetadata.kt} | 16 +- .../{ImageRootFS.kt => ImageInspectRootFS.kt} | 4 +- .../docker/remote/api/ImageSummary.kt | 6 +- .../gesellix/docker/remote/api/MountPoint.kt | 17 +- ...VolumeConfig.kt => VolumeCreateOptions.kt} | 2 +- .../docker/remote/api/VolumeUsageData.kt | 2 +- 31 files changed, 369 insertions(+), 363 deletions(-) rename api-model-v1-41/docs/{ContainerWaitResponseError.md => ContainerWaitExitError.md} (86%) create mode 100644 api-model-v1-41/docs/IPAMConfig.md delete mode 100644 api-model-v1-41/docs/Image.md create mode 100644 api-model-v1-41/docs/ImageInspect.md create mode 100644 api-model-v1-41/docs/ImageInspectMetadata.md rename api-model-v1-41/docs/{ImageRootFS.md => ImageInspectRootFS.md} (93%) delete mode 100644 api-model-v1-41/docs/ImageMetadata.md delete mode 100644 api-model-v1-41/docs/InlineResponse400.md rename api-model-v1-41/docs/{VolumeConfig.md => VolumeCreateOptions.md} (96%) rename api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/{ContainerWaitResponseError.kt => ContainerWaitExitError.kt} (98%) rename api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/{ImageMetadata.kt => IPAMConfig.kt} (87%) delete mode 100644 api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Image.kt create mode 100644 api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspect.kt rename api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/{InlineResponse400.kt => ImageInspectMetadata.kt} (81%) rename api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/{ImageRootFS.kt => ImageInspectRootFS.kt} (97%) rename api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/{VolumeConfig.kt => VolumeCreateOptions.kt} (99%) diff --git a/api-model-v1-41/.openapi-generator/FILES b/api-model-v1-41/.openapi-generator/FILES index cbf87bba..f10cc969 100644 --- a/api-model-v1-41/.openapi-generator/FILES +++ b/api-model-v1-41/.openapi-generator/FILES @@ -22,8 +22,8 @@ docs/ContainerSummaryHostConfig.md docs/ContainerSummaryNetworkSettings.md docs/ContainerTopResponse.md docs/ContainerUpdateResponse.md +docs/ContainerWaitExitError.md docs/ContainerWaitResponse.md -docs/ContainerWaitResponseError.md docs/CreateImageInfo.md docs/DeviceMapping.md docs/DeviceRequest.md @@ -53,18 +53,18 @@ docs/HostConfig.md docs/HostConfigAllOf.md docs/HostConfigAllOfLogConfig.md docs/IPAM.md +docs/IPAMConfig.md docs/IdResponse.md -docs/Image.md docs/ImageApi.md docs/ImageDeleteResponseItem.md docs/ImageID.md -docs/ImageMetadata.md +docs/ImageInspect.md +docs/ImageInspectMetadata.md +docs/ImageInspectRootFS.md docs/ImagePruneResponse.md -docs/ImageRootFS.md docs/ImageSearchResponseItem.md docs/ImageSummary.md docs/IndexInfo.md -docs/InlineResponse400.md docs/JoinTokens.md docs/Limit.md docs/LocalNodeState.md @@ -197,7 +197,7 @@ docs/ThrottleDevice.md docs/UnlockKeyResponse.md docs/Volume.md docs/VolumeApi.md -docs/VolumeConfig.md +docs/VolumeCreateOptions.md docs/VolumeListResponse.md docs/VolumePruneResponse.md docs/VolumeUsageData.md @@ -226,8 +226,8 @@ src/main/kotlin/de/gesellix/docker/remote/api/ContainerSummaryHostConfig.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerSummaryNetworkSettings.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerTopResponse.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerUpdateResponse.kt +src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitExitError.kt src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitResponse.kt -src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitResponseError.kt src/main/kotlin/de/gesellix/docker/remote/api/CreateImageInfo.kt src/main/kotlin/de/gesellix/docker/remote/api/DeviceMapping.kt src/main/kotlin/de/gesellix/docker/remote/api/DeviceRequest.kt @@ -255,17 +255,17 @@ src/main/kotlin/de/gesellix/docker/remote/api/HostConfig.kt src/main/kotlin/de/gesellix/docker/remote/api/HostConfigAllOf.kt src/main/kotlin/de/gesellix/docker/remote/api/HostConfigAllOfLogConfig.kt src/main/kotlin/de/gesellix/docker/remote/api/IPAM.kt +src/main/kotlin/de/gesellix/docker/remote/api/IPAMConfig.kt src/main/kotlin/de/gesellix/docker/remote/api/IdResponse.kt -src/main/kotlin/de/gesellix/docker/remote/api/Image.kt src/main/kotlin/de/gesellix/docker/remote/api/ImageDeleteResponseItem.kt src/main/kotlin/de/gesellix/docker/remote/api/ImageID.kt -src/main/kotlin/de/gesellix/docker/remote/api/ImageMetadata.kt +src/main/kotlin/de/gesellix/docker/remote/api/ImageInspect.kt +src/main/kotlin/de/gesellix/docker/remote/api/ImageInspectMetadata.kt +src/main/kotlin/de/gesellix/docker/remote/api/ImageInspectRootFS.kt src/main/kotlin/de/gesellix/docker/remote/api/ImagePruneResponse.kt -src/main/kotlin/de/gesellix/docker/remote/api/ImageRootFS.kt src/main/kotlin/de/gesellix/docker/remote/api/ImageSearchResponseItem.kt src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt src/main/kotlin/de/gesellix/docker/remote/api/IndexInfo.kt -src/main/kotlin/de/gesellix/docker/remote/api/InlineResponse400.kt src/main/kotlin/de/gesellix/docker/remote/api/JoinTokens.kt src/main/kotlin/de/gesellix/docker/remote/api/Limit.kt src/main/kotlin/de/gesellix/docker/remote/api/LocalNodeState.kt @@ -388,7 +388,7 @@ src/main/kotlin/de/gesellix/docker/remote/api/TaskStatusContainerStatus.kt src/main/kotlin/de/gesellix/docker/remote/api/ThrottleDevice.kt src/main/kotlin/de/gesellix/docker/remote/api/UnlockKeyResponse.kt src/main/kotlin/de/gesellix/docker/remote/api/Volume.kt -src/main/kotlin/de/gesellix/docker/remote/api/VolumeConfig.kt +src/main/kotlin/de/gesellix/docker/remote/api/VolumeCreateOptions.kt src/main/kotlin/de/gesellix/docker/remote/api/VolumeListResponse.kt src/main/kotlin/de/gesellix/docker/remote/api/VolumePruneResponse.kt src/main/kotlin/de/gesellix/docker/remote/api/VolumeUsageData.kt diff --git a/api-model-v1-41/README.md b/api-model-v1-41/README.md index da8abedc..0cd18243 100644 --- a/api-model-v1-41/README.md +++ b/api-model-v1-41/README.md @@ -166,8 +166,8 @@ Class | Method | HTTP request | Description - [de.gesellix.docker.remote.api.ContainerSummaryNetworkSettings](docs/ContainerSummaryNetworkSettings.md) - [de.gesellix.docker.remote.api.ContainerTopResponse](docs/ContainerTopResponse.md) - [de.gesellix.docker.remote.api.ContainerUpdateResponse](docs/ContainerUpdateResponse.md) + - [de.gesellix.docker.remote.api.ContainerWaitExitError](docs/ContainerWaitExitError.md) - [de.gesellix.docker.remote.api.ContainerWaitResponse](docs/ContainerWaitResponse.md) - - [de.gesellix.docker.remote.api.ContainerWaitResponseError](docs/ContainerWaitResponseError.md) - [de.gesellix.docker.remote.api.CreateImageInfo](docs/CreateImageInfo.md) - [de.gesellix.docker.remote.api.DeviceMapping](docs/DeviceMapping.md) - [de.gesellix.docker.remote.api.DeviceRequest](docs/DeviceRequest.md) @@ -195,17 +195,17 @@ Class | Method | HTTP request | Description - [de.gesellix.docker.remote.api.HostConfigAllOf](docs/HostConfigAllOf.md) - [de.gesellix.docker.remote.api.HostConfigAllOfLogConfig](docs/HostConfigAllOfLogConfig.md) - [de.gesellix.docker.remote.api.IPAM](docs/IPAM.md) + - [de.gesellix.docker.remote.api.IPAMConfig](docs/IPAMConfig.md) - [de.gesellix.docker.remote.api.IdResponse](docs/IdResponse.md) - - [de.gesellix.docker.remote.api.Image](docs/Image.md) - [de.gesellix.docker.remote.api.ImageDeleteResponseItem](docs/ImageDeleteResponseItem.md) - [de.gesellix.docker.remote.api.ImageID](docs/ImageID.md) - - [de.gesellix.docker.remote.api.ImageMetadata](docs/ImageMetadata.md) + - [de.gesellix.docker.remote.api.ImageInspect](docs/ImageInspect.md) + - [de.gesellix.docker.remote.api.ImageInspectMetadata](docs/ImageInspectMetadata.md) + - [de.gesellix.docker.remote.api.ImageInspectRootFS](docs/ImageInspectRootFS.md) - [de.gesellix.docker.remote.api.ImagePruneResponse](docs/ImagePruneResponse.md) - - [de.gesellix.docker.remote.api.ImageRootFS](docs/ImageRootFS.md) - [de.gesellix.docker.remote.api.ImageSearchResponseItem](docs/ImageSearchResponseItem.md) - [de.gesellix.docker.remote.api.ImageSummary](docs/ImageSummary.md) - [de.gesellix.docker.remote.api.IndexInfo](docs/IndexInfo.md) - - [de.gesellix.docker.remote.api.InlineResponse400](docs/InlineResponse400.md) - [de.gesellix.docker.remote.api.JoinTokens](docs/JoinTokens.md) - [de.gesellix.docker.remote.api.Limit](docs/Limit.md) - [de.gesellix.docker.remote.api.LocalNodeState](docs/LocalNodeState.md) @@ -328,7 +328,7 @@ Class | Method | HTTP request | Description - [de.gesellix.docker.remote.api.ThrottleDevice](docs/ThrottleDevice.md) - [de.gesellix.docker.remote.api.UnlockKeyResponse](docs/UnlockKeyResponse.md) - [de.gesellix.docker.remote.api.Volume](docs/Volume.md) - - [de.gesellix.docker.remote.api.VolumeConfig](docs/VolumeConfig.md) + - [de.gesellix.docker.remote.api.VolumeCreateOptions](docs/VolumeCreateOptions.md) - [de.gesellix.docker.remote.api.VolumeListResponse](docs/VolumeListResponse.md) - [de.gesellix.docker.remote.api.VolumePruneResponse](docs/VolumePruneResponse.md) - [de.gesellix.docker.remote.api.VolumeUsageData](docs/VolumeUsageData.md) diff --git a/api-model-v1-41/docker-engine-api-v1.41.yaml b/api-model-v1-41/docker-engine-api-v1.41.yaml index 3cc940a6..c51bf5e1 100644 --- a/api-model-v1-41/docker-engine-api-v1.41.yaml +++ b/api-model-v1-41/docker-engine-api-v1.41.yaml @@ -215,6 +215,12 @@ definitions: - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. type: "string" + enum: + - "bind" + - "volume" + - "tmpfs" + - "npipe" + example: "volume" Name: description: | Name is the name reference to the underlying data defined by `Source` @@ -1849,15 +1855,36 @@ definitions: x-nullable: false example: "1644009612" Size: - type: "number" + description: | + Total size of the image including all layers it is composed of. + type: "integer" + format: "int64" x-nullable: false example: 172064416 SharedSize: - type: "number" + description: | + Total size of image layers that are shared between this image and other + images. + + This size is not calculated by default. `-1` indicates that the value + has not been set / calculated. + type: "integer" + format: "int64" x-nullable: false example: 1239828 VirtualSize: - type: "number" + description: | + Total size of the image including all layers it is composed of. + + In versions of Docker before v1.10, this field was calculated from + the image itself and all of its parent images. Docker v1.10 and up + store images self-contained, and no longer use a parent-chain, making + this field an equivalent of the Size field. + + This field is kept for backward compatibility, but may be removed in + a future version of the API. + type: "integer" + format: "int64" x-nullable: false example: 172064416 Labels: @@ -1988,6 +2015,7 @@ definitions: properties: Size: type: "integer" + format: "int64" default: -1 description: | Amount of disk space used by the volume (in bytes). This information @@ -2003,17 +2031,43 @@ definitions: is set to `-1` if the reference-count is not available. x-nullable: false - example: - Name: "tardis" - Driver: "custom" - Mountpoint: "/var/lib/docker/volumes/tardis" - Status: - hello: "world" + VolumeCreateOptions: + description: "Volume configuration" + type: "object" + title: "VolumeConfig" + x-go-name: "VolumeCreateBody" + properties: + Name: + description: | + The new volume's name. If not specified, Docker generates a name. + type: "string" + x-nullable: false + example: "tardis" + Driver: + description: "Name of the volume driver to use." + type: "string" + default: "local" + x-nullable: false + example: "custom" + DriverOpts: + description: | + A mapping of driver options and values. These options are + passed directly to the driver and are driver specific. + type: "object" + additionalProperties: + type: "string" + example: + device: "tmpfs" + o: "size=100m,uid=1000" + type: "tmpfs" Labels: - com.example.some-label: "some-value" - com.example.some-other-label: "some-other-value" - Scope: "local" - CreatedAt: "2016-06-07T20:31:11.853781916Z" + description: "User-defined key/value metadata." + type: "object" + additionalProperties: + type: "string" + example: + com.example.some-label: "some-value" + com.example.some-other-label: "some-other-value" Network: type: "object" @@ -2101,15 +2155,27 @@ definitions: ``` type: "array" items: - type: "object" - additionalProperties: - type: "string" + $ref: "#/definitions/IPAMConfig" Options: description: "Driver-specific options, specified as a map." type: "object" additionalProperties: type: "string" + IPAMConfig: + type: "object" + properties: + Subnet: + type: "string" + IPRange: + type: "string" + Gateway: + type: "string" + AuxiliaryAddresses: + type: "object" + additionalProperties: + type: "string" + NetworkContainer: type: "object" properties: @@ -4350,7 +4416,7 @@ definitions: Mounts: type: "array" items: - $ref: "#/definitions/Mount" + $ref: "#/definitions/MountPoint" Driver: description: "Driver represents a driver (network, logging, secrets)." @@ -7283,22 +7349,11 @@ paths: 200: description: "The container has exit." schema: - type: "object" - title: "ContainerWaitResponse" - description: "OK response to ContainerWait operation" - required: [StatusCode] - properties: - StatusCode: - description: "Exit code of the container" - type: "number" - x-nullable: false - Error: - description: "container waiting error, if any" - type: "object" - properties: - Message: - description: "Details of an error" - type: "string" + $ref: "#/definitions/ContainerWaitResponse" + 400: + description: "bad parameter" + schema: + $ref: "#/definitions/ErrorResponse" 404: description: "no such container" schema: @@ -7323,6 +7378,10 @@ paths: Defaults to `not-running` if omitted or empty. type: "string" + enum: + - "not-running" + - "next-exit" + - "removed" default: "not-running" tags: ["Container"] /containers/{id}: @@ -7398,17 +7457,7 @@ paths: 400: description: "Bad parameter" schema: - allOf: - - $ref: "#/definitions/ErrorResponse" - - type: "object" - properties: - message: - description: | - The error message. Either "must specify path parameter" - (path cannot be empty) or "not a directory" (path was - asserted to be a directory but exists as a file). - type: "string" - x-nullable: false + $ref: "#/definitions/ErrorResponse" 404: description: "Container or path does not exist" schema: @@ -7443,17 +7492,7 @@ paths: 400: description: "Bad parameter" schema: - allOf: - - $ref: "#/definitions/ErrorResponse" - - type: "object" - properties: - message: - description: | - The error message. Either "must specify path parameter" - (path cannot be empty) or "not a directory" (path was - asserted to be a directory but exists as a file). - type: "string" - x-nullable: false + $ref: "#/definitions/ErrorResponse" 404: description: "Container or path does not exist" schema: @@ -7962,84 +8001,7 @@ paths: 200: description: "No error" schema: - $ref: "#/definitions/Image" - examples: - application/json: - Id: "sha256:85f05633ddc1c50679be2b16a0479ab6f7637f8884e0cfe0f4d20e1ebb3d6e7c" - Container: "cb91e48a60d01f1e27028b4fc6819f4f290b3cf12496c8176ec714d0d390984a" - Comment: "" - Os: "linux" - Architecture: "amd64" - Parent: "sha256:91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" - ContainerConfig: - Tty: false - Hostname: "e611e15f9c9d" - Domainname: "" - AttachStdout: false - PublishService: "" - AttachStdin: false - OpenStdin: false - StdinOnce: false - NetworkDisabled: false - OnBuild: [] - Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" - User: "" - WorkingDir: "" - MacAddress: "" - AttachStderr: false - Labels: - com.example.license: "GPL" - com.example.version: "1.0" - com.example.vendor: "Acme" - Env: - - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - Cmd: - - "/bin/sh" - - "-c" - - "#(nop) LABEL com.example.vendor=Acme com.example.license=GPL com.example.version=1.0" - DockerVersion: "1.9.0-dev" - VirtualSize: 188359297 - Size: 0 - Author: "" - Created: "2015-09-10T08:30:53.26995814Z" - GraphDriver: - Name: "aufs" - Data: {} - RepoDigests: - - "localhost:5000/test/busybox/example@sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf" - RepoTags: - - "example:1.0" - - "example:latest" - - "example:stable" - Config: - Image: "91e54dfb11794fad694460162bf0cb0a4fa710cfa3f60979c177d920813e267c" - NetworkDisabled: false - OnBuild: [] - StdinOnce: false - PublishService: "" - AttachStdin: false - OpenStdin: false - Domainname: "" - AttachStdout: false - Tty: false - Hostname: "e611e15f9c9d" - Cmd: - - "/bin/bash" - Env: - - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - Labels: - com.example.vendor: "Acme" - com.example.version: "1.0" - com.example.license: "GPL" - MacAddress: "" - AttachStderr: false - WorkingDir: "" - User: "" - RootFS: - Type: "layers" - Layers: - - "sha256:1834950e52ce4d5a88a1bbd131c537f4d0e56d10ff0dd69e66be3b7dfa9df7e6" - - "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" + $ref: "#/definitions/ImageInspect" 404: description: "No such image" schema: diff --git a/api-model-v1-41/docs/ContainerSummary.md b/api-model-v1-41/docs/ContainerSummary.md index 3f885bc7..86afc47d 100644 --- a/api-model-v1-41/docs/ContainerSummary.md +++ b/api-model-v1-41/docs/ContainerSummary.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **status** | **kotlin.String** | Additional human-readable status of this container (e.g. `Exit 0`) | [optional] **hostConfig** | [**ContainerSummaryHostConfig**](ContainerSummaryHostConfig.md) | | [optional] **networkSettings** | [**ContainerSummaryNetworkSettings**](ContainerSummaryNetworkSettings.md) | | [optional] -**mounts** | [**kotlin.collections.MutableList<Mount>**](Mount.md) | | [optional] +**mounts** | [**kotlin.collections.MutableList<MountPoint>**](MountPoint.md) | | [optional] diff --git a/api-model-v1-41/docs/ContainerWaitResponseError.md b/api-model-v1-41/docs/ContainerWaitExitError.md similarity index 86% rename from api-model-v1-41/docs/ContainerWaitResponseError.md rename to api-model-v1-41/docs/ContainerWaitExitError.md index 80d9d133..9891f878 100644 --- a/api-model-v1-41/docs/ContainerWaitResponseError.md +++ b/api-model-v1-41/docs/ContainerWaitExitError.md @@ -1,5 +1,5 @@ -# ContainerWaitResponseError +# ContainerWaitExitError ## Properties Name | Type | Description | Notes diff --git a/api-model-v1-41/docs/ContainerWaitResponse.md b/api-model-v1-41/docs/ContainerWaitResponse.md index 96f8abd1..7e3a6dfd 100644 --- a/api-model-v1-41/docs/ContainerWaitResponse.md +++ b/api-model-v1-41/docs/ContainerWaitResponse.md @@ -4,8 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**statusCode** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | Exit code of the container | -**error** | [**ContainerWaitResponseError**](ContainerWaitResponseError.md) | | [optional] +**statusCode** | **kotlin.Int** | Exit code of the container | +**error** | [**ContainerWaitExitError**](ContainerWaitExitError.md) | | diff --git a/api-model-v1-41/docs/IPAM.md b/api-model-v1-41/docs/IPAM.md index 0b7268b9..a26095dd 100644 --- a/api-model-v1-41/docs/IPAM.md +++ b/api-model-v1-41/docs/IPAM.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **driver** | **kotlin.String** | Name of the IPAM driver to use. | [optional] -**config** | **kotlin.collections.MutableList<kotlin.collections.MutableMap<kotlin.String, kotlin.String>>** | List of IPAM configuration options, specified as a map: ``` {\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>} ``` | [optional] +**config** | [**kotlin.collections.MutableList<IPAMConfig>**](IPAMConfig.md) | List of IPAM configuration options, specified as a map: ``` {\"Subnet\": <CIDR>, \"IPRange\": <CIDR>, \"Gateway\": <IP address>, \"AuxAddress\": <device_name:IP address>} ``` | [optional] **options** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | Driver-specific options, specified as a map. | [optional] diff --git a/api-model-v1-41/docs/IPAMConfig.md b/api-model-v1-41/docs/IPAMConfig.md new file mode 100644 index 00000000..23ac27ae --- /dev/null +++ b/api-model-v1-41/docs/IPAMConfig.md @@ -0,0 +1,13 @@ + +# IPAMConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subnet** | **kotlin.String** | | [optional] +**ipRange** | **kotlin.String** | | [optional] +**gateway** | **kotlin.String** | | [optional] +**auxiliaryAddresses** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | | [optional] + + + diff --git a/api-model-v1-41/docs/Image.md b/api-model-v1-41/docs/Image.md deleted file mode 100644 index 71c8fd76..00000000 --- a/api-model-v1-41/docs/Image.md +++ /dev/null @@ -1,28 +0,0 @@ - -# Image - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **kotlin.String** | | -**parent** | **kotlin.String** | | -**comment** | **kotlin.String** | | -**created** | **kotlin.String** | | -**container** | **kotlin.String** | | -**dockerVersion** | **kotlin.String** | | -**author** | **kotlin.String** | | -**architecture** | **kotlin.String** | | -**os** | **kotlin.String** | | -**propertySize** | **kotlin.Long** | | -**virtualSize** | **kotlin.Long** | | -**graphDriver** | [**GraphDriverData**](GraphDriverData.md) | | -**rootFS** | [**ImageRootFS**](ImageRootFS.md) | | -**repoTags** | **kotlin.collections.MutableList<kotlin.String>** | | [optional] -**repoDigests** | **kotlin.collections.MutableList<kotlin.String>** | | [optional] -**containerConfig** | [**ContainerConfig**](ContainerConfig.md) | | [optional] -**config** | [**ContainerConfig**](ContainerConfig.md) | | [optional] -**osVersion** | **kotlin.String** | | [optional] -**metadata** | [**ImageMetadata**](ImageMetadata.md) | | [optional] - - - diff --git a/api-model-v1-41/docs/ImageInspect.md b/api-model-v1-41/docs/ImageInspect.md new file mode 100644 index 00000000..a4e3da36 --- /dev/null +++ b/api-model-v1-41/docs/ImageInspect.md @@ -0,0 +1,28 @@ + +# ImageInspect + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **kotlin.String** | ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. | [optional] +**repoTags** | **kotlin.collections.MutableList<kotlin.String>** | List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. | [optional] +**repoDigests** | **kotlin.collections.MutableList<kotlin.String>** | List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. | [optional] +**parent** | **kotlin.String** | ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. | [optional] +**comment** | **kotlin.String** | Optional message that was set when committing or importing the image. | [optional] +**created** | **kotlin.String** | Date and time at which the image was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. | [optional] +**container** | **kotlin.String** | The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. | [optional] +**containerConfig** | [**ContainerConfig**](ContainerConfig.md) | | [optional] +**dockerVersion** | **kotlin.String** | The version of Docker that was used to build the image. Depending on how the image was created, this field may be empty. | [optional] +**author** | **kotlin.String** | Name of the author that was specified when committing the image, or as specified through MAINTAINER (deprecated) in the Dockerfile. | [optional] +**config** | [**ContainerConfig**](ContainerConfig.md) | | [optional] +**architecture** | **kotlin.String** | Hardware CPU architecture that the image runs on. | [optional] +**os** | **kotlin.String** | Operating System the image is built to run on. | [optional] +**osVersion** | **kotlin.String** | Operating System version the image is built to run on (especially for Windows). | [optional] +**propertySize** | **kotlin.Long** | Total size of the image including all layers it is composed of. | [optional] +**virtualSize** | **kotlin.Long** | Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. | [optional] +**graphDriver** | [**GraphDriverData**](GraphDriverData.md) | | [optional] +**rootFS** | [**ImageInspectRootFS**](ImageInspectRootFS.md) | | [optional] +**metadata** | [**ImageInspectMetadata**](ImageInspectMetadata.md) | | [optional] + + + diff --git a/api-model-v1-41/docs/ImageInspectMetadata.md b/api-model-v1-41/docs/ImageInspectMetadata.md new file mode 100644 index 00000000..eb610bd6 --- /dev/null +++ b/api-model-v1-41/docs/ImageInspectMetadata.md @@ -0,0 +1,10 @@ + +# ImageInspectMetadata + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lastTagTime** | **kotlin.String** | Date and time at which the image was last tagged in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. This information is only available if the image was tagged locally, and omitted otherwise. | [optional] + + + diff --git a/api-model-v1-41/docs/ImageRootFS.md b/api-model-v1-41/docs/ImageInspectRootFS.md similarity index 93% rename from api-model-v1-41/docs/ImageRootFS.md rename to api-model-v1-41/docs/ImageInspectRootFS.md index c724cbb1..cb8dbde6 100644 --- a/api-model-v1-41/docs/ImageRootFS.md +++ b/api-model-v1-41/docs/ImageInspectRootFS.md @@ -1,5 +1,5 @@ -# ImageRootFS +# ImageInspectRootFS ## Properties Name | Type | Description | Notes diff --git a/api-model-v1-41/docs/ImageMetadata.md b/api-model-v1-41/docs/ImageMetadata.md deleted file mode 100644 index c361bc9d..00000000 --- a/api-model-v1-41/docs/ImageMetadata.md +++ /dev/null @@ -1,10 +0,0 @@ - -# ImageMetadata - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**lastTagTime** | **kotlin.String** | | [optional] - - - diff --git a/api-model-v1-41/docs/ImageSummary.md b/api-model-v1-41/docs/ImageSummary.md index 5c6fcebf..c746737d 100644 --- a/api-model-v1-41/docs/ImageSummary.md +++ b/api-model-v1-41/docs/ImageSummary.md @@ -4,16 +4,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **kotlin.String** | | -**parentId** | **kotlin.String** | | -**repoTags** | **kotlin.collections.MutableList<kotlin.String>** | | -**repoDigests** | **kotlin.collections.MutableList<kotlin.String>** | | -**created** | **kotlin.Int** | | -**propertySize** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | -**sharedSize** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | -**virtualSize** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | -**labels** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | | -**containers** | **kotlin.Int** | | +**id** | **kotlin.String** | ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. | +**parentId** | **kotlin.String** | ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. | +**repoTags** | **kotlin.collections.MutableList<kotlin.String>** | List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same imagem and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. | +**repoDigests** | **kotlin.collections.MutableList<kotlin.String>** | List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. | +**created** | **kotlin.Int** | Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). | +**propertySize** | **kotlin.Long** | Total size of the image including all layers it is composed of. | +**sharedSize** | **kotlin.Long** | Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. | +**virtualSize** | **kotlin.Long** | Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. | +**labels** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | User-defined key/value metadata. | +**containers** | **kotlin.Int** | Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. | diff --git a/api-model-v1-41/docs/InlineResponse400.md b/api-model-v1-41/docs/InlineResponse400.md deleted file mode 100644 index e22711d8..00000000 --- a/api-model-v1-41/docs/InlineResponse400.md +++ /dev/null @@ -1,11 +0,0 @@ - -# InlineResponse400 - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**errorResponse** | [**ErrorResponse**](ErrorResponse.md) | | [optional] -**message** | **kotlin.String** | The error message. Either \"must specify path parameter\" (path cannot be empty) or \"not a directory\" (path was asserted to be a directory but exists as a file). | [optional] - - - diff --git a/api-model-v1-41/docs/MountPoint.md b/api-model-v1-41/docs/MountPoint.md index ccb66642..721ebdbb 100644 --- a/api-model-v1-41/docs/MountPoint.md +++ b/api-model-v1-41/docs/MountPoint.md @@ -4,14 +4,21 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | **kotlin.String** | | [optional] -**name** | **kotlin.String** | | [optional] -**source** | **kotlin.String** | | [optional] -**destination** | **kotlin.String** | | [optional] -**driver** | **kotlin.String** | | [optional] -**mode** | **kotlin.String** | | [optional] -**RW** | **kotlin.Boolean** | | [optional] -**propagation** | **kotlin.String** | | [optional] +**type** | [**inline**](#Type) | The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. | [optional] +**name** | **kotlin.String** | Name is the name reference to the underlying data defined by `Source` e.g., the volume name. | [optional] +**source** | **kotlin.String** | Source location of the mount. For volumes, this contains the storage location of the volume (within `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains the source (host) part of the bind-mount. For `tmpfs` mount points, this field is empty. | [optional] +**destination** | **kotlin.String** | Destination is the path relative to the container root (`/`) where the `Source` is mounted inside the container. | [optional] +**driver** | **kotlin.String** | Driver is the volume driver used to create the volume (if it is a volume). | [optional] +**mode** | **kotlin.String** | Mode is a comma separated list of options supplied by the user when creating the bind/volume mount. The default is platform-specific (`\"z\"` on Linux, empty on Windows). | [optional] +**RW** | **kotlin.Boolean** | Whether the mount is mounted writable (read-write). | [optional] +**propagation** | **kotlin.String** | Propagation describes how mounts are propagated from the host into the mount point, and vice-versa. Refer to the [Linux kernel documentation](https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt) for details. This field is not used on Windows. | [optional] + + + +## Enum: Type +Name | Value +---- | ----- +type | bind, volume, tmpfs, npipe diff --git a/api-model-v1-41/docs/VolumeConfig.md b/api-model-v1-41/docs/VolumeCreateOptions.md similarity index 96% rename from api-model-v1-41/docs/VolumeConfig.md rename to api-model-v1-41/docs/VolumeCreateOptions.md index 286b4c0b..191554e9 100644 --- a/api-model-v1-41/docs/VolumeConfig.md +++ b/api-model-v1-41/docs/VolumeCreateOptions.md @@ -1,5 +1,5 @@ -# VolumeConfig +# VolumeCreateOptions ## Properties Name | Type | Description | Notes diff --git a/api-model-v1-41/docs/VolumeUsageData.md b/api-model-v1-41/docs/VolumeUsageData.md index cf3e05e7..b6d7f928 100644 --- a/api-model-v1-41/docs/VolumeUsageData.md +++ b/api-model-v1-41/docs/VolumeUsageData.md @@ -4,7 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**propertySize** | **kotlin.Int** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | +**propertySize** | **kotlin.Long** | Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") | **refCount** | **kotlin.Int** | The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. | diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerSummary.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerSummary.kt index b6d8153a..108a9231 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerSummary.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerSummary.kt @@ -100,6 +100,6 @@ data class ContainerSummary( var networkSettings: ContainerSummaryNetworkSettings? = null, @Json(name = "Mounts") - var mounts: kotlin.collections.MutableList? = null + var mounts: kotlin.collections.MutableList? = null ) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitResponseError.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitExitError.kt similarity index 98% rename from api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitResponseError.kt rename to api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitExitError.kt index 50649249..45de9088 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitResponseError.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitExitError.kt @@ -29,7 +29,7 @@ import com.squareup.moshi.JsonClass * @param message Details of an error */ @JsonClass(generateAdapter = true) -data class ContainerWaitResponseError( +data class ContainerWaitExitError( /* Details of an error */ @Json(name = "Message") diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitResponse.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitResponse.kt index 02bf3018..d354eeb5 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitResponse.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerWaitResponse.kt @@ -34,9 +34,9 @@ data class ContainerWaitResponse( /* Exit code of the container */ @Json(name = "StatusCode") - var statusCode: java.math.BigDecimal, + var statusCode: kotlin.Int, @Json(name = "Error") - var error: ContainerWaitResponseError? = null + var error: ContainerWaitExitError? = null ) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/IPAM.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/IPAM.kt index 17ccd450..aedc19af 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/IPAM.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/IPAM.kt @@ -39,7 +39,7 @@ data class IPAM( /* List of IPAM configuration options, specified as a map: ``` {\"Subnet\": , \"IPRange\": , \"Gateway\": , \"AuxAddress\": } ``` */ @Json(name = "Config") - var config: kotlin.collections.MutableList>? = null, + var config: kotlin.collections.MutableList? = null, /* Driver-specific options, specified as a map. */ @Json(name = "Options") diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageMetadata.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/IPAMConfig.kt similarity index 87% rename from api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageMetadata.kt rename to api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/IPAMConfig.kt index d60ab232..bf3fd927 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageMetadata.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/IPAMConfig.kt @@ -26,12 +26,24 @@ import com.squareup.moshi.JsonClass /** * * - * @param lastTagTime + * @param subnet + * @param ipRange + * @param gateway + * @param auxiliaryAddresses */ @JsonClass(generateAdapter = true) -data class ImageMetadata( +data class IPAMConfig( - @Json(name = "LastTagTime") - var lastTagTime: kotlin.String? = null + @Json(name = "Subnet") + var subnet: kotlin.String? = null, + + @Json(name = "IPRange") + var ipRange: kotlin.String? = null, + + @Json(name = "Gateway") + var gateway: kotlin.String? = null, + + @Json(name = "AuxiliaryAddresses") + var auxiliaryAddresses: kotlin.collections.MutableMap? = null ) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Image.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Image.kt deleted file mode 100644 index a6fdf1e3..00000000 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Image.kt +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Docker Engine API - * - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.41) is used. For example, calling `/info` is the same as calling `/v1.41/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` - * - * The version of the OpenAPI document: 1.41 - * - * - * Please note: - * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * Do not edit this file manually. - */ - -@file:Suppress( - "ArrayInDataClass", - "EnumEntryName", - "RemoveRedundantQualifierName", - "UnusedImport" -) - -package de.gesellix.docker.remote.api - -import com.squareup.moshi.Json -import com.squareup.moshi.JsonClass - -/** - * - * - * @param id - * @param parent - * @param comment - * @param created - * @param container - * @param dockerVersion - * @param author - * @param architecture - * @param os - * @param propertySize - * @param virtualSize - * @param graphDriver - * @param rootFS - * @param repoTags - * @param repoDigests - * @param containerConfig - * @param config - * @param osVersion - * @param metadata - */ -@JsonClass(generateAdapter = true) -data class Image( - - @Json(name = "Id") - var id: kotlin.String, - - @Json(name = "Parent") - var parent: kotlin.String, - - @Json(name = "Comment") - var comment: kotlin.String, - - @Json(name = "Created") - var created: kotlin.String, - - @Json(name = "Container") - var container: kotlin.String, - - @Json(name = "DockerVersion") - var dockerVersion: kotlin.String, - - @Json(name = "Author") - var author: kotlin.String, - - @Json(name = "Architecture") - var architecture: kotlin.String, - - @Json(name = "Os") - var os: kotlin.String, - - @Json(name = "Size") - var propertySize: kotlin.Long, - - @Json(name = "VirtualSize") - var virtualSize: kotlin.Long, - - @Json(name = "GraphDriver") - var graphDriver: GraphDriverData, - - @Json(name = "RootFS") - var rootFS: ImageRootFS, - - @Json(name = "RepoTags") - var repoTags: kotlin.collections.MutableList? = null, - - @Json(name = "RepoDigests") - var repoDigests: kotlin.collections.MutableList? = null, - - @Json(name = "ContainerConfig") - var containerConfig: ContainerConfig? = null, - - @Json(name = "Config") - var config: ContainerConfig? = null, - - @Json(name = "OsVersion") - var osVersion: kotlin.String? = null, - - @Json(name = "Metadata") - var metadata: ImageMetadata? = null - -) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspect.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspect.kt new file mode 100644 index 00000000..aeab47b9 --- /dev/null +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspect.kt @@ -0,0 +1,123 @@ +/** + * Docker Engine API + * + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.41) is used. For example, calling `/info` is the same as calling `/v1.41/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * + * The version of the OpenAPI document: 1.41 + * + * + * Please note: + * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * Do not edit this file manually. + */ + +@file:Suppress( + "ArrayInDataClass", + "EnumEntryName", + "RemoveRedundantQualifierName", + "UnusedImport" +) + +package de.gesellix.docker.remote.api + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass + +/** + * Information about an image in the local image cache. + * + * @param id ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. + * @param repoTags List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. + * @param repoDigests List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. + * @param parent ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. + * @param comment Optional message that was set when committing or importing the image. + * @param created Date and time at which the image was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. + * @param container The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. + * @param containerConfig + * @param dockerVersion The version of Docker that was used to build the image. Depending on how the image was created, this field may be empty. + * @param author Name of the author that was specified when committing the image, or as specified through MAINTAINER (deprecated) in the Dockerfile. + * @param config + * @param architecture Hardware CPU architecture that the image runs on. + * @param os Operating System the image is built to run on. + * @param osVersion Operating System version the image is built to run on (especially for Windows). + * @param propertySize Total size of the image including all layers it is composed of. + * @param virtualSize Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. + * @param graphDriver + * @param rootFS + * @param metadata + */ +@JsonClass(generateAdapter = true) +data class ImageInspect( + + /* ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. */ + @Json(name = "Id") + var id: kotlin.String? = null, + + /* List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. */ + @Json(name = "RepoTags") + var repoTags: kotlin.collections.MutableList? = null, + + /* List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. */ + @Json(name = "RepoDigests") + var repoDigests: kotlin.collections.MutableList? = null, + + /* ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. */ + @Json(name = "Parent") + var parent: kotlin.String? = null, + + /* Optional message that was set when committing or importing the image. */ + @Json(name = "Comment") + var comment: kotlin.String? = null, + + /* Date and time at which the image was created, formatted in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. */ + @Json(name = "Created") + var created: kotlin.String? = null, + + /* The ID of the container that was used to create the image. Depending on how the image was created, this field may be empty. */ + @Json(name = "Container") + var container: kotlin.String? = null, + + @Json(name = "ContainerConfig") + var containerConfig: ContainerConfig? = null, + + /* The version of Docker that was used to build the image. Depending on how the image was created, this field may be empty. */ + @Json(name = "DockerVersion") + var dockerVersion: kotlin.String? = null, + + /* Name of the author that was specified when committing the image, or as specified through MAINTAINER (deprecated) in the Dockerfile. */ + @Json(name = "Author") + var author: kotlin.String? = null, + + @Json(name = "Config") + var config: ContainerConfig? = null, + + /* Hardware CPU architecture that the image runs on. */ + @Json(name = "Architecture") + var architecture: kotlin.String? = null, + + /* Operating System the image is built to run on. */ + @Json(name = "Os") + var os: kotlin.String? = null, + + /* Operating System version the image is built to run on (especially for Windows). */ + @Json(name = "OsVersion") + var osVersion: kotlin.String? = null, + + /* Total size of the image including all layers it is composed of. */ + @Json(name = "Size") + var propertySize: kotlin.Long? = null, + + /* Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. */ + @Json(name = "VirtualSize") + var virtualSize: kotlin.Long? = null, + + @Json(name = "GraphDriver") + var graphDriver: GraphDriverData? = null, + + @Json(name = "RootFS") + var rootFS: ImageInspectRootFS? = null, + + @Json(name = "Metadata") + var metadata: ImageInspectMetadata? = null + +) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/InlineResponse400.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspectMetadata.kt similarity index 81% rename from api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/InlineResponse400.kt rename to api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspectMetadata.kt index 6cab1234..dfee1c28 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/InlineResponse400.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspectMetadata.kt @@ -24,19 +24,15 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** + * Additional metadata of the image in the local cache. This information is local to the daemon, and not part of the image itself. * - * - * @param errorResponse - * @param message The error message. Either \"must specify path parameter\" (path cannot be empty) or \"not a directory\" (path was asserted to be a directory but exists as a file). + * @param lastTagTime Date and time at which the image was last tagged in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. This information is only available if the image was tagged locally, and omitted otherwise. */ @JsonClass(generateAdapter = true) -data class InlineResponse400( - - @Json(name = "ErrorResponse") - var errorResponse: ErrorResponse? = null, +data class ImageInspectMetadata( - /* The error message. Either \"must specify path parameter\" (path cannot be empty) or \"not a directory\" (path was asserted to be a directory but exists as a file). */ - @Json(name = "message") - var message: kotlin.String? = null + /* Date and time at which the image was last tagged in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. This information is only available if the image was tagged locally, and omitted otherwise. */ + @Json(name = "LastTagTime") + var lastTagTime: kotlin.String? = null ) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageRootFS.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspectRootFS.kt similarity index 97% rename from api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageRootFS.kt rename to api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspectRootFS.kt index 37d762df..1cb6593e 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageRootFS.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageInspectRootFS.kt @@ -24,14 +24,14 @@ import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** - * + * Information about the image's RootFS, including the layer IDs. * * @param type * @param layers * @param baseLayer */ @JsonClass(generateAdapter = true) -data class ImageRootFS( +data class ImageInspectRootFS( @Json(name = "Type") var type: kotlin.String, diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt index 07ffffef..0468d87a 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt @@ -62,15 +62,15 @@ data class ImageSummary( /* Total size of the image including all layers it is composed of. */ @Json(name = "Size") - var propertySize: java.math.BigDecimal, + var propertySize: kotlin.Long, /* Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. */ @Json(name = "SharedSize") - var sharedSize: java.math.BigDecimal, + var sharedSize: kotlin.Long, /* Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. */ @Json(name = "VirtualSize") - var virtualSize: java.math.BigDecimal, + var virtualSize: kotlin.Long, /* User-defined key/value metadata. */ @Json(name = "Labels") diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/MountPoint.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/MountPoint.kt index 57e68c97..bd13e252 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/MountPoint.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/MountPoint.kt @@ -40,7 +40,7 @@ data class MountPoint( /* The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. */ @Json(name = "Type") - var type: kotlin.String? = null, + var type: MountPoint.Type? = null, /* Name is the name reference to the underlying data defined by `Source` e.g., the volume name. */ @Json(name = "Name") @@ -70,4 +70,17 @@ data class MountPoint( @Json(name = "Propagation") var propagation: kotlin.String? = null -) +) { + + /** + * The mount type: - `bind` a mount of a file or directory from the host into the container. - `volume` a docker volume with the given `Name`. - `tmpfs` a `tmpfs`. - `npipe` a named pipe from the host into the container. + * + * Values: Bind,Volume,Tmpfs,Npipe + */ + enum class Type(val value: kotlin.String) { + @Json(name = "bind") Bind("bind"), + @Json(name = "volume") Volume("volume"), + @Json(name = "tmpfs") Tmpfs("tmpfs"), + @Json(name = "npipe") Npipe("npipe"); + } +} diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeConfig.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeCreateOptions.kt similarity index 99% rename from api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeConfig.kt rename to api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeCreateOptions.kt index 0c84b4e0..e50b3a3f 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeConfig.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeCreateOptions.kt @@ -32,7 +32,7 @@ import com.squareup.moshi.JsonClass * @param labels User-defined key/value metadata. */ @JsonClass(generateAdapter = true) -data class VolumeConfig( +data class VolumeCreateOptions( /* The new volume's name. If not specified, Docker generates a name. */ @Json(name = "Name") diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeUsageData.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeUsageData.kt index 9961d36e..9d87a843 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeUsageData.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/VolumeUsageData.kt @@ -34,7 +34,7 @@ data class VolumeUsageData( /* Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\"local\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\"not available\") */ @Json(name = "Size") - var propertySize: kotlin.Int, + var propertySize: kotlin.Long = -1, /* The number of containers referencing this volume. This field is set to `-1` if the reference-count is not available. */ @Json(name = "RefCount") From f1d0adf19d9c6a7d1297edc228ced4f3392f1897 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Wed, 18 May 2022 21:05:42 +0200 Subject: [PATCH 3/3] Try to not change too many of the optional fields --- api-model-v1-41/docker-engine-api-v1.41.yaml | 46 +++++++++++++------ .../docs/ContainerCreateResponse.md | 2 +- api-model-v1-41/docs/ContainerWaitResponse.md | 2 +- api-model-v1-41/docs/GraphDriverData.md | 2 +- api-model-v1-41/docs/ImageSummary.md | 6 +-- api-model-v1-41/docs/Volume.md | 4 +- .../remote/api/ContainerCreateResponse.kt | 2 +- .../docker/remote/api/GraphDriverData.kt | 2 +- .../docker/remote/api/ImageSummary.kt | 34 +++++++------- .../de/gesellix/docker/remote/api/Volume.kt | 20 ++++---- 10 files changed, 70 insertions(+), 50 deletions(-) diff --git a/api-model-v1-41/docker-engine-api-v1.41.yaml b/api-model-v1-41/docker-engine-api-v1.41.yaml index c51bf5e1..83dbe9a7 100644 --- a/api-model-v1-41/docker-engine-api-v1.41.yaml +++ b/api-model-v1-41/docker-engine-api-v1.41.yaml @@ -802,6 +802,7 @@ definitions: description: | Health stores information about the container's healthcheck results. type: "object" +# x-nullable: true properties: Status: description: | @@ -834,6 +835,7 @@ definitions: description: | HealthcheckResult stores information about a single run of a healthcheck probe type: "object" +# x-nullable: true properties: Start: description: | @@ -1206,6 +1208,7 @@ definitions: `{"/": {}}` type: "object" +# x-nullable: true additionalProperties: type: "object" enum: @@ -1250,6 +1253,9 @@ definitions: ArgsEscaped: description: "Command is already escaped (Windows only)" type: "boolean" +# default: false + example: false +# x-nullable: true Image: description: | The name (or reference) of the image to use when creating the container, @@ -1284,13 +1290,16 @@ definitions: NetworkDisabled: description: "Disable networking for the container." type: "boolean" +# x-nullable: true MacAddress: description: "MAC address of the container." type: "string" +# x-nullable: true OnBuild: description: | `ONBUILD` metadata that were defined in the image's `Dockerfile`. type: "array" +# x-nullable: true items: type: "string" example: [] @@ -1307,14 +1316,18 @@ definitions: Signal to stop a container as a string or unsigned integer. type: "string" default: "SIGTERM" + example: "SIGTERM" +# x-nullable: true StopTimeout: description: "Timeout to stop a container in seconds." type: "integer" default: 10 +# x-nullable: true Shell: description: | Shell for when `RUN`, `CMD`, and `ENTRYPOINT` uses a shell. type: "array" +# x-nullable: true items: type: "string" example: ["/bin/sh", "-c"] @@ -1578,7 +1591,8 @@ definitions: Information about the storage driver used to store the container's and image's filesystem. type: "object" - required: [Name, Data] + required: [Name] +# required: [Name, Data] properties: Name: description: "Name of the storage driver." @@ -1592,7 +1606,7 @@ definitions: This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. type: "object" - x-nullable: true +# x-nullable: false additionalProperties: type: "string" example: { @@ -1718,6 +1732,7 @@ definitions: for Windows). type: "string" example: "" +# x-nullable: true Size: description: | Total size of the image including all layers it is composed of. @@ -1777,18 +1792,19 @@ definitions: type: "string" format: "dateTime" example: "2022-02-28T14:40:02.623929178Z" +# x-nullable: true ImageSummary: type: "object" required: - Id - ParentId - - RepoTags - - RepoDigests +# - RepoTags +# - RepoDigests - Created - Size - SharedSize - VirtualSize - - Labels +# - Labels - Containers properties: Id: @@ -1823,7 +1839,7 @@ definitions: empty if no tags reference the image, in which case the image is "untagged", in which case it can still be referenced by its ID. type: "array" - x-nullable: true +# x-nullable: false items: type: "string" example: @@ -1841,7 +1857,7 @@ definitions: from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. type: "array" - x-nullable: true +# x-nullable: false items: type: "string" example: @@ -1890,7 +1906,7 @@ definitions: Labels: description: "User-defined key/value metadata." type: "object" - x-nullable: true +# x-nullable: false additionalProperties: type: "string" example: @@ -1941,7 +1957,8 @@ definitions: Volume: type: "object" - required: [Name, Driver, Mountpoint, Labels, Scope, Options] + required: [Name, Driver, Mountpoint, Options] +# required: [Name, Driver, Mountpoint, Labels, Scope, Options] properties: Name: type: "string" @@ -1979,7 +1996,7 @@ definitions: Labels: type: "object" description: "User-defined key/value metadata." - x-nullable: true +# x-nullable: false additionalProperties: type: "string" example: @@ -1991,7 +2008,7 @@ definitions: The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. default: "local" - x-nullable: true +# x-nullable: false enum: ["local", "global"] example: "local" Options: @@ -4538,6 +4555,7 @@ definitions: ContainerState stores container's running state. It's part of ContainerJSONBase and will be returned by the "inspect" command. type: "object" +# x-nullable: true properties: Status: description: | @@ -4603,7 +4621,8 @@ definitions: type: "object" x-go-name: "ContainerWaitOKBody" title: "ContainerWaitResponse" - required: [StatusCode, Error] + required: [StatusCode] +# required: [StatusCode, Error] properties: StatusCode: description: "Exit code of the container" @@ -6067,7 +6086,8 @@ paths: type: "object" title: "ContainerCreateResponse" description: "OK response to ContainerCreate operation" - required: [Id, Warnings] + required: [Id] +# required: [Id, Warnings] properties: Id: description: "The ID of the created container" diff --git a/api-model-v1-41/docs/ContainerCreateResponse.md b/api-model-v1-41/docs/ContainerCreateResponse.md index bc1c1779..3c3788da 100644 --- a/api-model-v1-41/docs/ContainerCreateResponse.md +++ b/api-model-v1-41/docs/ContainerCreateResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **kotlin.String** | The ID of the created container | -**warnings** | **kotlin.collections.MutableList<kotlin.String>** | Warnings encountered when creating the container | +**warnings** | **kotlin.collections.MutableList<kotlin.String>** | Warnings encountered when creating the container | [optional] diff --git a/api-model-v1-41/docs/ContainerWaitResponse.md b/api-model-v1-41/docs/ContainerWaitResponse.md index 7e3a6dfd..f9228876 100644 --- a/api-model-v1-41/docs/ContainerWaitResponse.md +++ b/api-model-v1-41/docs/ContainerWaitResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **statusCode** | **kotlin.Int** | Exit code of the container | -**error** | [**ContainerWaitExitError**](ContainerWaitExitError.md) | | +**error** | [**ContainerWaitExitError**](ContainerWaitExitError.md) | | [optional] diff --git a/api-model-v1-41/docs/GraphDriverData.md b/api-model-v1-41/docs/GraphDriverData.md index 688e7ea0..fe55e829 100644 --- a/api-model-v1-41/docs/GraphDriverData.md +++ b/api-model-v1-41/docs/GraphDriverData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **kotlin.String** | Name of the storage driver. | -**`data`** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. | +**`data`** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. | [optional] diff --git a/api-model-v1-41/docs/ImageSummary.md b/api-model-v1-41/docs/ImageSummary.md index c746737d..4bfd3463 100644 --- a/api-model-v1-41/docs/ImageSummary.md +++ b/api-model-v1-41/docs/ImageSummary.md @@ -6,14 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **kotlin.String** | ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. | **parentId** | **kotlin.String** | ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. | -**repoTags** | **kotlin.collections.MutableList<kotlin.String>** | List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same imagem and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. | -**repoDigests** | **kotlin.collections.MutableList<kotlin.String>** | List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. | **created** | **kotlin.Int** | Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). | **propertySize** | **kotlin.Long** | Total size of the image including all layers it is composed of. | **sharedSize** | **kotlin.Long** | Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. | **virtualSize** | **kotlin.Long** | Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. | -**labels** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | User-defined key/value metadata. | **containers** | **kotlin.Int** | Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. | +**repoTags** | **kotlin.collections.MutableList<kotlin.String>** | List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. | [optional] +**repoDigests** | **kotlin.collections.MutableList<kotlin.String>** | List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. | [optional] +**labels** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | User-defined key/value metadata. | [optional] diff --git a/api-model-v1-41/docs/Volume.md b/api-model-v1-41/docs/Volume.md index a27c6687..529a198f 100644 --- a/api-model-v1-41/docs/Volume.md +++ b/api-model-v1-41/docs/Volume.md @@ -7,11 +7,11 @@ Name | Type | Description | Notes **name** | **kotlin.String** | Name of the volume. | **driver** | **kotlin.String** | Name of the volume driver used by the volume. | **mountpoint** | **kotlin.String** | Mount path of the volume on the host. | -**labels** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | User-defined key/value metadata. | -**scope** | [**inline**](#Scope) | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | **options** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | The driver specific options used when creating the volume. | **createdAt** | **kotlin.String** | Date/Time the volume was created. | [optional] **status** | [**kotlin.collections.MutableMap<kotlin.String, kotlin.Any>**](kotlin.Any.md) | Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. | [optional] +**labels** | **kotlin.collections.MutableMap<kotlin.String, kotlin.String>** | User-defined key/value metadata. | [optional] +**scope** | [**inline**](#Scope) | The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. | [optional] **usageData** | [**VolumeUsageData**](VolumeUsageData.md) | | [optional] diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerCreateResponse.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerCreateResponse.kt index c125b59e..2015c940 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerCreateResponse.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ContainerCreateResponse.kt @@ -38,6 +38,6 @@ data class ContainerCreateResponse( /* Warnings encountered when creating the container */ @Json(name = "Warnings") - var warnings: kotlin.collections.MutableList? + var warnings: kotlin.collections.MutableList? = null ) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/GraphDriverData.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/GraphDriverData.kt index 5e3bff19..94feb4b3 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/GraphDriverData.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/GraphDriverData.kt @@ -38,6 +38,6 @@ data class GraphDriverData( /* Low-level storage metadata, provided as key/value pairs. This information is driver-specific, and depends on the storage-driver in use, and should be used for informational purposes only. */ @Json(name = "Data") - var `data`: kotlin.collections.MutableMap? + var `data`: kotlin.collections.MutableMap? = null ) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt index 0468d87a..76541b10 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/ImageSummary.kt @@ -1,7 +1,7 @@ /** * Docker Engine API * - * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.41) is used. For example, calling `/info` is the same as calling `/v1.41/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` + * The Engine API is an HTTP API served by Docker Engine. It is the API the Docker client uses to communicate with the Engine, so everything the Docker client can do can be done with the API. Most of the client's commands map directly to API endpoints (e.g. `docker ps` is `GET /containers/json`). The notable exception is running containers, which consists of several API calls. # Errors The API uses standard HTTP status codes to indicate the success or failure of the API call. The body of the response will be JSON in the following format: ``` { \"message\": \"page not found\" } ``` # Versioning The API is usually changed in each release, so API calls are versioned to ensure that clients don't break. To lock to a specific version of the API, you prefix the URL with its version, for example, call `/v1.30/info` to use the v1.30 version of the `/info` endpoint. If the API version specified in the URL is not supported by the daemon, a HTTP `400 Bad Request` error message is returned. If you omit the version-prefix, the current version of the API (v1.41) is used. For example, calling `/info` is the same as calling `/v1.41/info`. Using the API without a version-prefix is deprecated and will be removed in a future release. Engine releases in the near future should support this version of the API, so your client will continue to work even if it is talking to a newer Engine. The API uses an open schema model, which means server may add extra properties to responses. Likewise, the server will ignore any extra query parameters and request body properties. When you write clients, you need to ignore additional properties in responses to ensure they do not break when talking to newer daemons. # Authentication Authentication for registries is handled client side. The client has to send authentication details to various endpoints that need to communicate with registries, such as `POST /images/(name)/push`. These are sent as `X-Registry-Auth` header as a [base64url encoded](https://tools.ietf.org/html/rfc4648#section-5) (JSON) string with the following structure: ``` { \"username\": \"string\", \"password\": \"string\", \"email\": \"string\", \"serveraddress\": \"string\" } ``` The `serveraddress` is a domain/IP without a protocol. Throughout this structure, double quotes are required. If you have already got an identity token from the [`/auth` endpoint](#operation/SystemAuth), you can just pass this instead of credentials: ``` { \"identitytoken\": \"9cbaf023786cd7...\" } ``` * * The version of the OpenAPI document: 1.41 * @@ -28,14 +28,14 @@ import com.squareup.moshi.JsonClass * * @param id ID is the content-addressable ID of an image. This identifier is a content-addressable digest calculated from the image's configuration (which includes the digests of layers used by the image). Note that this digest differs from the `RepoDigests` below, which holds digests of image manifests that reference the image. * @param parentId ID of the parent image. Depending on how the image was created, this field may be empty and is only set for images that were built/created locally. This field is empty if the image was pulled from an image registry. - * @param repoTags List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image, and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. - * @param repoDigests List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. * @param created Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). * @param propertySize Total size of the image including all layers it is composed of. * @param sharedSize Total size of image layers that are shared between this image and other images. This size is not calculated by default. `-1` indicates that the value has not been set / calculated. * @param virtualSize Total size of the image including all layers it is composed of. In versions of Docker before v1.10, this field was calculated from the image itself and all of its parent images. Docker v1.10 and up store images self-contained, and no longer use a parent-chain, making this field an equivalent of the Size field. This field is kept for backward compatibility, but may be removed in a future version of the API. - * @param labels User-defined key/value metadata. * @param containers Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. + * @param repoTags List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. + * @param repoDigests List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. + * @param labels User-defined key/value metadata. */ @JsonClass(generateAdapter = true) data class ImageSummary( @@ -48,14 +48,6 @@ data class ImageSummary( @Json(name = "ParentId") var parentId: kotlin.String, - /* List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same imagem and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. */ - @Json(name = "RepoTags") - var repoTags: kotlin.collections.MutableList?, - - /* List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. */ - @Json(name = "RepoDigests") - var repoDigests: kotlin.collections.MutableList?, - /* Date and time at which the image was created as a Unix timestamp (number of seconds sinds EPOCH). */ @Json(name = "Created") var created: kotlin.Int, @@ -72,12 +64,20 @@ data class ImageSummary( @Json(name = "VirtualSize") var virtualSize: kotlin.Long, - /* User-defined key/value metadata. */ - @Json(name = "Labels") - var labels: kotlin.collections.MutableMap?, - /* Number of containers using this image. Includes both stopped and running containers. This size is not calculated by default, and depends on which API endpoint is used. `-1` indicates that the value has not been set / calculated. */ @Json(name = "Containers") - var containers: kotlin.Int + var containers: kotlin.Int, + + /* List of image names/tags in the local image cache that reference this image. Multiple image tags can refer to the same image and this list may be empty if no tags reference the image, in which case the image is \"untagged\", in which case it can still be referenced by its ID. */ + @Json(name = "RepoTags") + var repoTags: kotlin.collections.MutableList? = null, + + /* List of content-addressable digests of locally available image manifests that the image is referenced from. Multiple manifests can refer to the same image. These digests are usually only available if the image was either pulled from a registry, or if the image was pushed to a registry, which is when the manifest is generated and its digest calculated. */ + @Json(name = "RepoDigests") + var repoDigests: kotlin.collections.MutableList? = null, + + /* User-defined key/value metadata. */ + @Json(name = "Labels") + var labels: kotlin.collections.MutableMap? = null ) diff --git a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Volume.kt b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Volume.kt index 0b449cad..ae545247 100644 --- a/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Volume.kt +++ b/api-model-v1-41/src/main/kotlin/de/gesellix/docker/remote/api/Volume.kt @@ -29,11 +29,11 @@ import com.squareup.moshi.JsonClass * @param name Name of the volume. * @param driver Name of the volume driver used by the volume. * @param mountpoint Mount path of the volume on the host. - * @param labels User-defined key/value metadata. - * @param scope The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. * @param options The driver specific options used when creating the volume. * @param createdAt Date/Time the volume was created. * @param status Low-level details about the volume, provided by the volume driver. Details are returned as a map with key/value pairs: `{\"key\":\"value\",\"key2\":\"value2\"}`. The `Status` field is optional, and is omitted if the volume driver does not support this feature. + * @param labels User-defined key/value metadata. + * @param scope The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. * @param usageData */ @JsonClass(generateAdapter = true) @@ -51,14 +51,6 @@ data class Volume( @Json(name = "Mountpoint") var mountpoint: kotlin.String, - /* User-defined key/value metadata. */ - @Json(name = "Labels") - var labels: kotlin.collections.MutableMap?, - - /* The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. */ - @Json(name = "Scope") - var scope: Volume.Scope? = Scope.Local, - /* The driver specific options used when creating the volume. */ @Json(name = "Options") var options: kotlin.collections.MutableMap?, @@ -71,6 +63,14 @@ data class Volume( @Json(name = "Status") var status: kotlin.collections.MutableMap? = null, + /* User-defined key/value metadata. */ + @Json(name = "Labels") + var labels: kotlin.collections.MutableMap? = null, + + /* The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. */ + @Json(name = "Scope") + var scope: Volume.Scope? = Scope.Local, + @Json(name = "UsageData") var usageData: VolumeUsageData? = null