Browse code

session: update swagger yaml

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>

Tonis Tiigi authored on 2017/06/16 03:14:56
Showing 1 changed files
... ...
@@ -8481,3 +8481,43 @@ paths:
8481 8481
           type: "string"
8482 8482
           required: true
8483 8483
       tags: ["Distribution"]
8484
+  /session:
8485
+    post:
8486
+      summary: "Initialize interactive session"
8487
+      description: |
8488
+        Start a new interactive session with a server. Session allows server to call back to the client for advanced capabilities.
8489
+
8490
+        ### Hijacking
8491
+
8492
+        This endpoint hijacks the HTTP connection to HTTP2 transport that allows the client to expose gPRC services on that connection.
8493
+
8494
+        For example, the client sends this request to upgrade the connection:
8495
+
8496
+        ```
8497
+        POST /session HTTP/1.1
8498
+        Upgrade: h2c
8499
+        Connection: Upgrade
8500
+        ```
8501
+
8502
+        The Docker daemon will respond with a `101 UPGRADED` response follow with the raw stream:
8503
+
8504
+        ```
8505
+        HTTP/1.1 101 UPGRADED
8506
+        Connection: Upgrade
8507
+        Upgrade: h2c
8508
+        ```
8509
+      operationId: "Session"
8510
+      produces:
8511
+        - "application/vnd.docker.raw-stream"
8512
+      responses:
8513
+        101:
8514
+          description: "no error, hijacking successful"
8515
+        400:
8516
+          description: "bad parameter"
8517
+          schema:
8518
+            $ref: "#/definitions/ErrorResponse"
8519
+        500:
8520
+          description: "server error"
8521
+          schema:
8522
+            $ref: "#/definitions/ErrorResponse"
8523
+      tags: ["Session"]