From ae48a8f083892f679d17301c28648bf18c934e9f Mon Sep 17 00:00:00 2001 From: nmelehan Date: Tue, 3 Mar 2020 21:04:27 -0500 Subject: [PATCH 1/4] Add cURL and CLI examples to POST /tags --- openapi.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index d159844d9..98e600273 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -12021,6 +12021,23 @@ paths: $ref: '#/components/schemas/Tag' default: $ref: '#/components/responses/ErrorResponse' + x-code-samples: + - lang: Shell + source: > + curl -H "Content-Type: application/json" \ + -H "Authorization: Bearer $TOKEN" \ + -X POST -d '{ + "label": "example tag", + "linodes": [123,456], + "volumes": [9082,10003] + }' \ + https://api.linode.com/v4/tags + - lang: CLI + source: > + linode-cli tags create \ + --label 'example tag' \ + --linodes (123 456) \ + --volumes (9082 10003) /tags/{label}: x-linode-cli-command: tags parameters: From facdd3972201346df155e2f79ab0eb8464f9dc57 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Wed, 4 Mar 2020 15:38:05 -0500 Subject: [PATCH 2/4] Modify POST /tags CLI example to use multiple itesm --- openapi.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 98e600273..9bd3a0adc 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -12036,8 +12036,10 @@ paths: source: > linode-cli tags create \ --label 'example tag' \ - --linodes (123 456) \ - --volumes (9082 10003) + --linodes 123 \ + --linodes 456 \ + --volumes 9082 \ + --volumes 10003 /tags/{label}: x-linode-cli-command: tags parameters: From c4c9e92c3ab96fd7baee90bbfb58ec4eef834fc1 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Wed, 4 Mar 2020 15:39:26 -0500 Subject: [PATCH 3/4] Add curl example for View /tags/{label} --- openapi.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 9bd3a0adc..0450bef27 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -12102,6 +12102,11 @@ paths: $ref: '#/components/schemas/PaginationEnvelope/properties/results' default: $ref: '#/components/responses/ErrorResponse' + x-code-samples: + - lang: Shell + source: > + curl -H "Authorization: Bearer $TOKEN" \ + https://api.linode.com/v4/tags/example%20tag delete: summary: Delete a Tag description: > From c9573833870093b70caceffc992220ebb14ef649 Mon Sep 17 00:00:00 2001 From: leslitagordita Date: Fri, 6 Mar 2020 10:00:23 -0500 Subject: [PATCH 4/4] Update shell example: use quotes instead of character escaping --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 0450bef27..a57ccb741 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -12106,7 +12106,7 @@ paths: - lang: Shell source: > curl -H "Authorization: Bearer $TOKEN" \ - https://api.linode.com/v4/tags/example%20tag + "https://api.linode.com/v4/tags/example tag" delete: summary: Delete a Tag description: >