Commit Graph

4548 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
e09afad3cb api/types/network: remove use of "reflect" in test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-23 11:26:32 +01:00
Austin Vazquez
0f0d197d78 Merge pull request #51760 from thaJeztah/fix_godoc
api/types/jsonstream: Message: fix godoc
2025-12-18 13:07:27 -06:00
Sebastiaan van Stijn
0fd5cc134b api/types/jsonstream: Message: fix godoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 15:04:27 +01:00
Sebastiaan van Stijn
6c845ded18 api/types/swarm: ResourceRequirements.MemorySwappiness: fix json tag
types/swarm/task.go:151:2: structtag: struct field tag `json:MemorySwappiness,omitzero"` not compatible with reflect.StructTag.Get: bad syntax for struct tag value (govet)
        MemorySwappiness *int64 `json:MemorySwappiness,omitzero"`
        ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-18 15:03:13 +01:00
Paweł Gronowski
87da1c2fee Merge pull request #51745 from thaJeztah/api_go_version
api: update to go1.25.5 and remove version from Makefile
2025-12-17 12:40:07 +00:00
Sebastiaan van Stijn
e1fb5ef4a7 api: update to go1.25.5 and remove version from Makefile
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 12:57:11 +01:00
Nicolas De Loof
aef5d996ce use mime-type application/jsonl to align with openapi 3.2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-17 11:37:48 +01:00
Sebastiaan van Stijn
b2d84a3ef5 Merge pull request #51732 from thaJeztah/sync_swagger_docs
api/docs: move ImageHistoryResponseItem to definitions (API v1.25-v1.52)
2025-12-16 13:50:34 +01:00
Paweł Gronowski
5d716f20a3 Merge pull request #51721 from vvoland/deprecate-grpc
api: deprecate /grpc and /session endpoints
2025-12-16 12:34:55 +00:00
Rob Murray
1e209e788b Continue to backfill empty PortBindings in API 1.53
- introduced by commit 0ca7ac3 ("daemon: backfill empty PBs
  slices for backward compat")

Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-16 11:03:58 +00:00
Sebastiaan van Stijn
2cce7ff87f api/docs: move ImageHistoryResponseItem to definitions (API v1.25-v1.52)
Similar to caaa9c9bb5, but applied to
existing API versions, so that it's easier to compare differences
between versions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-16 11:42:03 +01:00
Paweł Gronowski
f44b5abf0e api: deprecate /grpc and /session endpoints
The /grpc and /session endpoints are now deprecated as the Engine has
been upgraded to properly support HTTP/2 and h2c requests, making these
specialized endpoints unnecessary.

These endpoints will be removed in the next major API version to
complete the cleanup.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 18:44:22 +01:00
Paweł Gronowski
a0bd623959 api: remove docs/v1.53.yaml
The API is not cut yet

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-12-15 17:24:53 +01:00
Brian Goff
2ec5bdfaf6 Merge pull request #51666 from ndeloof/swagger
simplify swagger generation
2025-12-15 08:13:20 -08:00
Rob Murray
7c7a626e5d NRI: include in API Info response
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-15 10:36:05 +00:00
Rob Murray
f6b1488468 Bump API to v1.53
Signed-off-by: Rob Murray <rob.murray@docker.com>
2025-12-15 09:45:21 +00:00
Nicolas De Loof
caaa9c9bb5 simplify swagger generation
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2025-12-12 09:19:50 +01:00
Sebastiaan van Stijn
70298eb5b8 Merge pull request #51300 from rafaelcamelo31/50486_api_move_scripts
api: move scripts to generate and validate swagger to api module
2025-12-11 21:35:38 +01:00
Rafael Camelo
0666108ebf api: move scripts to generate and validate swagger to api module
Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

revert api/swagger.yaml to undo formatting

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor(api): update Dockerfile and Makefile with newline at the EOF and use current best practices

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor validations and swagger generation flow

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

shfmt

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

refactor generate-swagger-api.sh to use absolute path

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

add validate-api-swagger job for GitHub Actions

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

fix validate-api-swagger ci workflow

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>

update go version and redoc in api module

Signed-off-by: Rafael Camelo <rafaelcamelo31@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-11 15:16:47 +01:00
Sebastiaan van Stijn
773aca9f5d api, client: add separate LICENSE file
In a multi-module repository, the top-level LICENSE file is used for
all modules in the repository. However, when using a "replace" rule,
the vendored file is removed, but added back when removing the replace
rule.

This patch adds copies of the license to each of the modules to reduce
code-churn; these are vanilla copies downloaded from;
https://www.apache.org/licenses/LICENSE-2.0.txt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-05 15:57:55 +01:00
Kai Harder
a0e5e0525b Improve description of tmpfs mode
I recently had a great time to find out why the tmpfs mode provided did not work
until I found out that the API does not expect octal values but decimal ones.

Therefore, this PR will hopefully clarify the logic and prevent user questions in the future

Signed-off-by: Kai Harder <kai.harder@sap.com>
2025-12-02 16:34:12 +01:00
Sebastiaan van Stijn
15241265dc client, api: update go.mod to go1.24
While go1.23 still works, it's already EOL, so it may be a better
starting point to use that as minimum version for these modules, as
they're brand new.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:42:11 +01:00
Sebastiaan van Stijn
ed6d436d51 Merge pull request #51458 from thaJeztah/rm_deprecated_dockerversion
api/types/plugin: remove deprecated Config.DockerVersion
2025-11-10 18:28:56 +01:00
Sebastiaan van Stijn
e8f156110a api/types/plugin: remove deprecated Config.DockerVersion
This was deprecated in c4fda95bea, and
already omitted.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:11:45 +01:00
Sebastiaan van Stijn
34fb9de7f3 api/docs: remove links to docs.docker.com from changelog
The docker documentation website may not be publishing rendered versions
of the swagger for deprecated API versions, so let's remove these links
from the changelog.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:04:01 +01:00
Paweł Gronowski
7cff366d43 Merge pull request #51439 from thaJeztah/concrete_enums
api/types/container: make ContainerState, HealthStatus concrete types
2025-11-10 16:21:22 +01:00
Paweł Gronowski
f57da07056 Merge pull request #51454 from thaJeztah/api_volumes_no_pointer
api/types/volume: change ListResponse.Volumes to a non-pointer slice
2025-11-10 16:20:16 +01:00
Sebastiaan van Stijn
db71c6a914 api/types/container: make HealthStatus a concrete type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 16:08:15 +01:00
Sebastiaan van Stijn
1fd87e9fdf api/types/container: make ContainerState a concrete type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 16:08:12 +01:00
Rob Murray
69c4524355 Merge pull request #51437 from thaJeztah/diskusage_move_legacy
api: remove / internalize LegacyDiskUsage
2025-11-10 15:03:37 +00:00
Sebastiaan van Stijn
18000fe371 api/types/volume: change ListResponse.Volumes to a non-pointer slice
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 13:13:22 +01:00
Sebastiaan van Stijn
15a048c396 api, client: don't use a pointer-slice for plugins
The backend and router don't use a pointer-slice (the server actually
doesn't use the `plugin.ListResponse` type and a straight slice);
778e5bfad3/daemon/server/router/plugin/backend.go (L20)
6baf274fa3/daemon/server/router/plugin/plugin_routes.go (L276-L280)

Align the type in the API to match, and update the type defined in the
client accordingly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-07 21:02:26 +01:00
Sebastiaan van Stijn
ed428234bd api: remove / internalize LegacyDiskUsage
These fields have been removed from the API specification, and the struct
was only needed to produce legacy responses (server), or to unmarshal
legacy responses in the client.

As the API module only provides API definitions for the current API version,
we should remove these legacy structs, and keep them internal to the daemon
and client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-07 20:16:03 +01:00
Austin Vazquez
931c347b36 api/types: rename disk usage fields
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-06 16:21:32 -06:00
Sebastiaan van Stijn
0029924181 api/types/system: change legacyDiskUsage to a non-pointer slice
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 12:31:05 +01:00
Austin Vazquez
6881ae72c7 api/types: use regular slices for disk usage types
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-05 22:05:47 -06:00
Austin Vazquez
fabdccbe10 api/types: move disk usage structs to per type packages
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-05 11:20:15 -06:00
Sebastiaan van Stijn
cdede16ce7 Merge pull request #51399 from thaJeztah/swarm_enums
api/types/swarm: create types for enum-consts
2025-11-05 16:33:20 +01:00
Sebastiaan van Stijn
39ccd04ca8 api/types/swarm: define type for RegistryAuthSource
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-05 13:48:38 +01:00
Sebastiaan van Stijn
d299e5be83 api/types/swarm: define type for UpdateOrder
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-05 12:50:51 +01:00
Sebastiaan van Stijn
b552b8b729 api/types/swarm: define type for FailureAction
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-05 12:50:48 +01:00
Austin Vazquez
a69abdd90d api/types/system: add type specific usage fields to DiskUsage
This change adds type specific fields to `GET /system/df` endpoint with high level information of disk usage. This change also introduces `verbose` query to the endpoint so that detailed information is by default excluded unless queried to reduce memory consumption. The previous top level `DiskUsage` fields (`Images`, `Containers`, `Volumes` and `BuildCache`) are now deprecated and kept for backwards compatibility.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-03 16:34:26 -06:00
Sebastiaan van Stijn
12c9de37e9 api/types: move Version to api/types/system
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-31 02:09:38 +01:00
Sebastiaan van Stijn
ebe464ea45 api/types: remove PushResult type, and move internal
This type was used as Aux message for docker push, was not documented,
and only present for Docker Content Trust (which is deprecated).

This patch removes it from the API module, and moves the type internal.
We can stop sending this Aux message once DCT is fully phased out.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-31 00:47:23 +01:00
Cory Snider
19f4c27d81 api/t/network: represent MAC addrs as byte slices
Make invalid states unrepresentable by moving away from stringly-typed
MAC address values in API structs. As go.dev/issue/29678 has not yet
been implemented, provide our own HardwareAddr byte-slice type which
implements TextMarshaler and TextUnmarshaler to retain compatibility
with the API wire format.

When stdlib's net.HardwareAddr type implements TextMarshaler and
TextUnmarshaler and GODEBUG=netmarshal becomes the default, we should be
able to make the type a straight alias for stdlib net.HardwareAddr as a
non-breaking change.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2025-10-30 17:11:38 -04:00
Sebastiaan van Stijn
0eba2989e0 api/types/registry: rename AuthenticateOKBody to AuthResponse
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-29 18:06:29 +01:00
Austin Vazquez
bae45f766d api/types/network: define ConnectRequest and DisconnectRequest
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-29 11:44:18 +01:00
Sebastiaan van Stijn
9e7e01ef16 Merge pull request #51153 from corhere/excise-json-streams-from-api
api: move `pkg/streamformatter`, `pkg/progress` to `daemon/internal`
2025-10-28 13:36:16 +01:00
Sebastiaan van Stijn
6a2a1dd6cf api/types/container: StatsResponse: add OSType field
Adds a per-stats OSType field to allow handle the platform-specific fields.
Before this change, the client had to get the OSType field from the server's
API response header and copy it to each record.

Older daemon versions don't have this field, so the client still needs to
handle fallbacks.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-27 16:39:32 +01:00
Sebastiaan van Stijn
3088c4e192 api/types/container: StatsResponse: cleanup fields and GoDoc
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-26 20:37:40 +01:00