Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add links to ssh key endpoints #16

Merged
merged 1 commit into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions resources/ssh_keys/create_a_new_key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ responses:
application/json:
schema:
$ref: 'models/wrapped_ssh_key.yml'

links:
GetSSHKeyById:
$ref: 'links/get_ssh_key_by_id.yml'

GetSSHKeyByFingerprint:
$ref: 'links/get_ssh_key_by_fingerprint.yml'

DeleteSSHKeyById:
$ref: 'links/delete_ssh_key_by_id.yml'

DeleteSSHKeyByFingerprint:
$ref: 'links/delete_ssh_key_by_fingerprint.yml'

'401':
$ref: '../../shared/responses/unauthorized.yml'
Expand Down
8 changes: 8 additions & 0 deletions resources/ssh_keys/links/delete_ssh_key_by_fingerprint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
operationId: destroy_a_key

parameters:
ssh_key_identifier: '$response.body#/ssh_key/fingerprint'

description: >-
The `fingerprint` value returned in the response can be used as the
`ssh_key_identifier` parameter in `DELETE /v2/account/keys/{ssh_key_identifier}`.
8 changes: 8 additions & 0 deletions resources/ssh_keys/links/delete_ssh_key_by_id.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
operationId: destroy_a_key

parameters:
ssh_key_identifier: '$response.body#/ssh_key/id'

description: >-
The `id` value returned in the response can be used as the
`ssh_key_identifier` parameter in `DELETE /v2/account/keys/{ssh_key_identifier}`.
9 changes: 9 additions & 0 deletions resources/ssh_keys/links/get_ssh_key_by_fingerprint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
operationId: retrieve_an_existing_key

parameters:
ssh_key_identifier: '$response.body#/ssh_key/fingerprint'

description: >-
The `fingerprint` value returned in the response can be used as the
`ssh_key_identifier` parameter in `GET /v2/account/keys/{ssh_key_identifier}`.

9 changes: 9 additions & 0 deletions resources/ssh_keys/links/get_ssh_key_by_id.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
operationId: retrieve_an_existing_key

parameters:
ssh_key_identifier: '$response.body#/ssh_key/id'

description: >-
The `id` value returned in the response can be used as the
`ssh_key_identifier` parameter in `GET /v2/account/keys/{ssh_key_identifier}`.

16 changes: 15 additions & 1 deletion resources/ssh_keys/responses/existing_key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,18 @@ headers:
content:
application/json:
schema:
$ref: '../models/ssh_key.yml'
$ref: '../models/wrapped_ssh_key.yml'

links:
GetSSHKeyById:
$ref: '../links/get_ssh_key_by_id.yml'

GetSSHKeyByFingerprint:
$ref: '../links/get_ssh_key_by_fingerprint.yml'

DeleteSSHKeyById:
$ref: '../links/delete_ssh_key_by_id.yml'

DeleteSSHKeyByFingerprint:
$ref: '../links/delete_ssh_key_by_fingerprint.yml'

17 changes: 2 additions & 15 deletions resources/ssh_keys/update_a_key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,8 @@ requestBody:

responses:
'200':
description: OK

headers:
ratelimit-limit:
$ref: '../../shared/headers.yml#/ratelimit-limit'
ratelimit-remaining:
$ref: '../../shared/headers.yml#/ratelimit-remaining'
ratelimit-reset:
$ref: '../../shared/headers.yml#/ratelimit-reset'

content:
application/json:
schema:
$ref: 'models/wrapped_ssh_key.yml'

$ref: 'responses/existing_key.yml'

'401':
$ref: '../../shared/responses/unauthorized.yml'

Expand Down