Browse code

api/docs: add "platform" param for `GET /image/{name}/json` (API v1.49-v1.53)

This parameter was added in 59169d0f9746cca5a6fc302eac33e65ca00dd14e
(API v1.49, docker 28.5.1), but forgot to update the swagger definition.

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

Sebastiaan van Stijn authored on 2026/02/23 17:59:07
Showing 5 changed files
... ...
@@ -9737,10 +9737,31 @@ paths:
9737 9737
           required: true
9738 9738
         - name: "manifests"
9739 9739
           in: "query"
9740
-          description: "Include Manifests in the image summary."
9740
+          description: |-
9741
+            Include Manifests in the image summary.
9742
+
9743
+            The `manifests` and `platform` options are mutually exclusive, and
9744
+            an error is produced if both are set.
9741 9745
           type: "boolean"
9742 9746
           default: false
9743 9747
           required: false
9748
+        - name: "platform"
9749
+          type: "string"
9750
+          in: "query"
9751
+          description: |-
9752
+            JSON-encoded OCI platform to select the platform-variant.
9753
+            If omitted, it defaults to any locally available platform,
9754
+            prioritizing the daemon's host platform.
9755
+
9756
+            If the daemon provides a multi-platform image store, this selects
9757
+            the platform-variant to show inspect. If the image is
9758
+            a single-platform image, or if the multi-platform image does not
9759
+            provide a variant matching the given platform, an error is returned.
9760
+
9761
+            The `platform` and `manifests` options are mutually exclusive, and
9762
+            an error is produced if both are set.
9763
+
9764
+            Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}`
9744 9765
       tags: ["Image"]
9745 9766
   /images/{name}/history:
9746 9767
     get:
... ...
@@ -9567,10 +9567,31 @@ paths:
9567 9567
           required: true
9568 9568
         - name: "manifests"
9569 9569
           in: "query"
9570
-          description: "Include Manifests in the image summary."
9570
+          description: |-
9571
+            Include Manifests in the image summary.
9572
+
9573
+            The `manifests` and `platform` options are mutually exclusive, and
9574
+            an error is produced if both are set.
9571 9575
           type: "boolean"
9572 9576
           default: false
9573 9577
           required: false
9578
+        - name: "platform"
9579
+          type: "string"
9580
+          in: "query"
9581
+          description: |-
9582
+            JSON-encoded OCI platform to select the platform-variant.
9583
+            If omitted, it defaults to any locally available platform,
9584
+            prioritizing the daemon's host platform.
9585
+
9586
+            If the daemon provides a multi-platform image store, this selects
9587
+            the platform-variant to show inspect. If the image is
9588
+            a single-platform image, or if the multi-platform image does not
9589
+            provide a variant matching the given platform, an error is returned.
9590
+
9591
+            The `platform` and `manifests` options are mutually exclusive, and
9592
+            an error is produced if both are set.
9593
+
9594
+            Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}`
9574 9595
       tags: ["Image"]
9575 9596
   /images/{name}/history:
9576 9597
     get:
... ...
@@ -9588,10 +9588,31 @@ paths:
9588 9588
           required: true
9589 9589
         - name: "manifests"
9590 9590
           in: "query"
9591
-          description: "Include Manifests in the image summary."
9591
+          description: |-
9592
+            Include Manifests in the image summary.
9593
+
9594
+            The `manifests` and `platform` options are mutually exclusive, and
9595
+            an error is produced if both are set.
9592 9596
           type: "boolean"
9593 9597
           default: false
9594 9598
           required: false
9599
+        - name: "platform"
9600
+          type: "string"
9601
+          in: "query"
9602
+          description: |-
9603
+            JSON-encoded OCI platform to select the platform-variant.
9604
+            If omitted, it defaults to any locally available platform,
9605
+            prioritizing the daemon's host platform.
9606
+
9607
+            If the daemon provides a multi-platform image store, this selects
9608
+            the platform-variant to show inspect. If the image is
9609
+            a single-platform image, or if the multi-platform image does not
9610
+            provide a variant matching the given platform, an error is returned.
9611
+
9612
+            The `platform` and `manifests` options are mutually exclusive, and
9613
+            an error is produced if both are set.
9614
+
9615
+            Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}`
9595 9616
       tags: ["Image"]
9596 9617
   /images/{name}/history:
9597 9618
     get:
... ...
@@ -9868,10 +9868,31 @@ paths:
9868 9868
           required: true
9869 9869
         - name: "manifests"
9870 9870
           in: "query"
9871
-          description: "Include Manifests in the image summary."
9871
+          description: |-
9872
+            Include Manifests in the image summary.
9873
+
9874
+            The `manifests` and `platform` options are mutually exclusive, and
9875
+            an error is produced if both are set.
9872 9876
           type: "boolean"
9873 9877
           default: false
9874 9878
           required: false
9879
+        - name: "platform"
9880
+          type: "string"
9881
+          in: "query"
9882
+          description: |-
9883
+            JSON-encoded OCI platform to select the platform-variant.
9884
+            If omitted, it defaults to any locally available platform,
9885
+            prioritizing the daemon's host platform.
9886
+
9887
+            If the daemon provides a multi-platform image store, this selects
9888
+            the platform-variant to show inspect. If the image is
9889
+            a single-platform image, or if the multi-platform image does not
9890
+            provide a variant matching the given platform, an error is returned.
9891
+
9892
+            The `platform` and `manifests` options are mutually exclusive, and
9893
+            an error is produced if both are set.
9894
+
9895
+            Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}`
9875 9896
       tags: ["Image"]
9876 9897
   /images/{name}/history:
9877 9898
     get:
... ...
@@ -10116,10 +10116,31 @@ paths:
10116 10116
           required: true
10117 10117
         - name: "manifests"
10118 10118
           in: "query"
10119
-          description: "Include Manifests in the image summary."
10119
+          description: |-
10120
+            Include Manifests in the image summary.
10121
+
10122
+            The `manifests` and `platform` options are mutually exclusive, and
10123
+            an error is produced if both are set.
10120 10124
           type: "boolean"
10121 10125
           default: false
10122 10126
           required: false
10127
+        - name: "platform"
10128
+          type: "string"
10129
+          in: "query"
10130
+          description: |-
10131
+            JSON-encoded OCI platform to select the platform-variant.
10132
+            If omitted, it defaults to any locally available platform,
10133
+            prioritizing the daemon's host platform.
10134
+
10135
+            If the daemon provides a multi-platform image store, this selects
10136
+            the platform-variant to show inspect. If the image is
10137
+            a single-platform image, or if the multi-platform image does not
10138
+            provide a variant matching the given platform, an error is returned.
10139
+
10140
+            The `platform` and `manifests` options are mutually exclusive, and
10141
+            an error is produced if both are set.
10142
+
10143
+            Example: `{"os": "linux", "architecture": "arm", "variant": "v5"}`
10123 10144
       tags: ["Image"]
10124 10145
   /images/{name}/history:
10125 10146
     get: