diff --git a/resources/ssh_keys/create_a_new_key.yml b/resources/ssh_keys/create_a_new_key.yml index 057fd02d..fe1804d3 100644 --- a/resources/ssh_keys/create_a_new_key.yml +++ b/resources/ssh_keys/create_a_new_key.yml @@ -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' diff --git a/resources/ssh_keys/links/delete_ssh_key_by_fingerprint.yml b/resources/ssh_keys/links/delete_ssh_key_by_fingerprint.yml new file mode 100644 index 00000000..8cac7333 --- /dev/null +++ b/resources/ssh_keys/links/delete_ssh_key_by_fingerprint.yml @@ -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}`. diff --git a/resources/ssh_keys/links/delete_ssh_key_by_id.yml b/resources/ssh_keys/links/delete_ssh_key_by_id.yml new file mode 100644 index 00000000..4292e10d --- /dev/null +++ b/resources/ssh_keys/links/delete_ssh_key_by_id.yml @@ -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}`. diff --git a/resources/ssh_keys/links/get_ssh_key_by_fingerprint.yml b/resources/ssh_keys/links/get_ssh_key_by_fingerprint.yml new file mode 100644 index 00000000..9e33112c --- /dev/null +++ b/resources/ssh_keys/links/get_ssh_key_by_fingerprint.yml @@ -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}`. + diff --git a/resources/ssh_keys/links/get_ssh_key_by_id.yml b/resources/ssh_keys/links/get_ssh_key_by_id.yml new file mode 100644 index 00000000..08b4e319 --- /dev/null +++ b/resources/ssh_keys/links/get_ssh_key_by_id.yml @@ -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}`. + diff --git a/resources/ssh_keys/responses/existing_key.yml b/resources/ssh_keys/responses/existing_key.yml index 060d8a64..5bb6837f 100644 --- a/resources/ssh_keys/responses/existing_key.yml +++ b/resources/ssh_keys/responses/existing_key.yml @@ -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' + diff --git a/resources/ssh_keys/update_a_key.yml b/resources/ssh_keys/update_a_key.yml index eec20372..3c900104 100644 --- a/resources/ssh_keys/update_a_key.yml +++ b/resources/ssh_keys/update_a_key.yml @@ -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'