From 623e60d879f03c954ca3e4fb117563db70529a9c Mon Sep 17 00:00:00 2001 From: bbiggerr Date: Wed, 21 Apr 2021 12:29:53 -0400 Subject: [PATCH 1/3] Update descriptions, set required --- openapi.yaml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 105901270..6cd03f6b2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3478,22 +3478,23 @@ paths: - url: https://api.linode.com/v4beta tags: - Images - summary: Upload Image - description: > + summary: Machine Image Upload + description: | Initiates a Machine Image upload. This endpoint creates a new private Image object and returns it, along - with the URL the image data should be uploaded to. Images must be uploaded - within 24 hours of creation or the upload will be cancelled. Image uploads - should be made as an HTTP PUT request to the returned URL, with a + with the URL the image data should be uploaded to. + + - Machine Images must be uploaded within 24 hours of creation or the upload will be cancelled. + + - Machine Image uploads should be made as an HTTP PUT request to the returned URL, with a `Content-type: application/octet-stream` header included in the request. - Uploaded image data should be in gzip format. A maximum file size of + + - Uploaded image data should be in gzip format. A maximum file size of 5GB is supported for upload at this time. - *NOTE* This endpoint is currently in beta, and is only available to users - who are a part of the beta. You may see a 404 error returned from this - endpoint if you are not currently enrolled - open a support ticket to - sign up to join the beta when space becomes available. + This endpoint is currently in **alpha** and not publicly accessible. This notice will be updated when this endpoint placed in + beta. x-linode-cli-action: upload security: - personalAccessToken: [] @@ -3505,6 +3506,9 @@ paths: application/json: schema: type: object + required: + - label + - region properties: region: type: string @@ -3512,11 +3516,11 @@ paths: example: eu-central label: type: string - description: Label for the new image. + description: Label for the new Machine Image. example: my-image-label description: type: string - description: Description for the image. + description: Description for the Machine Image. example: This is an example image in the docs. responses: '200': From 1b3a7bc82eaa64e89a975e3ebe0ed70607128e43 Mon Sep 17 00:00:00 2001 From: bbiggerr Date: Wed, 21 Apr 2021 12:34:01 -0400 Subject: [PATCH 2/3] Update request/response desc and add samples --- openapi.yaml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 6cd03f6b2..862891dd5 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3501,7 +3501,7 @@ paths: - oauth: - images:read_write requestBody: - description: The data + description: The Machine Image details. content: application/json: schema: @@ -3524,7 +3524,7 @@ paths: example: This is an example image in the docs. responses: '200': - description: The new image and upload url. + description: The new Machine Image upload URL. content: application/json: schema: @@ -3532,11 +3532,28 @@ paths: properties: upload_url: type: string - description: The URL to upload the image to. + description: The URL to upload the Machine Image to. image: $ref: '#/components/schemas/ImagePrivate' default: $ref: '#/components/responses/ErrorResponse' + x-code-samples: + - lang: Shell + source: > + curl -H "Content-Type: application/json" \ + -H "Authorization: Bearer $TOKEN" \ + -X POST -d '{ + "description": "This is an example Machine Image.", + "label": "example-machine-image-label", + "region": "us-east" + }' \ + https://api.linode.com/v4/images + - lang: CLI + source: > + linode-cli images upload \ + --label example-machine-image-label \ + --description "This is an example Machine Image." + --region us-east /images/{imageId}: x-linode-cli-command: images parameters: From bf969bd04c89013486dfab69939a2e21fc049f3d Mon Sep 17 00:00:00 2001 From: bbiggerr Date: Wed, 21 Apr 2021 12:44:43 -0400 Subject: [PATCH 3/3] Bump version to 4.90.1 --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 862891dd5..34c5d8e54 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,6 +1,6 @@ openapi: 3.0.1 info: - version: 4.90.0 + version: 4.90.1 title: Linode API description: |