Skip to content

Commit

Permalink
Merge pull request #1 from digitalocean/asb/dedup-key-model
Browse files Browse the repository at this point in the history
Dedup Spaces key model
  • Loading branch information
lee-aaron authored Jan 8, 2025
2 parents 5652218 + b2a596f commit a841e85
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 64 deletions.
2 changes: 1 addition & 1 deletion specification/resources/spaces/key_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ requestBody:
content:
application/json:
schema:
$ref: 'models/key_request.yml'
$ref: 'models/key.yml'

examples:
Read Only Key:
Expand Down
2 changes: 1 addition & 1 deletion specification/resources/spaces/key_patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ requestBody:
content:
application/json:
schema:
$ref: 'models/key_request.yml'
$ref: 'models/key.yml'

responses:
'200':
Expand Down
2 changes: 1 addition & 1 deletion specification/resources/spaces/key_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ requestBody:
content:
application/json:
schema:
$ref: 'models/key_request.yml'
$ref: 'models/key.yml'

responses:
'200':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,3 @@ properties:
description: The date and time the key was created.
example: '2018-07-19T15:04:16Z'
readOnly: true

required:
- name
- grants
- access_key
- created_at
49 changes: 10 additions & 39 deletions specification/resources/spaces/models/key_create_response.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,10 @@
type: object

properties:
name:
type: string
description: The name of your access key.
example: "my-access-key"

grants:
type: array
description: The grants set to this access key.
items:
$ref: 'grant.yml'
default: []

access_key:
type: string
description: The access key.
example: DOACCESSKEYEXAMPLE
readOnly: true

secret_key:
type: string
description: The secret key.
example: DOSECRETKEYEXAMPLE

created_at:
type: string
format: date-time
description: The date and time the key was created.
example: '2018-07-19T15:04:16Z'
readOnly: true

required:
- name
- grants
- access_key
- secret_key
- created_at
allOf:
- type: object
properties:
secret_key:
type: string
description: The secret key. This is the only time the secret key will be returned.
example: DOSECRETKEYEXAMPLE
readOnly: true

- $ref: 'key.yml'
14 changes: 0 additions & 14 deletions specification/resources/spaces/models/key_request.yml

This file was deleted.

2 changes: 1 addition & 1 deletion specification/resources/spaces/responses/key_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ content:
keys:
type: array
items:
$ref: '../models/key_response.yml'
$ref: '../models/key.yml'
- $ref: '../../../shared/pages.yml#/pagination'
- $ref: '../../../shared/meta.yml'

Expand Down
2 changes: 1 addition & 1 deletion specification/resources/spaces/responses/key_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ headers:
content:
application/json:
schema:
$ref: '../models/key_response.yml'
$ref: '../models/key.yml'

examples:
Read Only Key:
Expand Down

0 comments on commit a841e85

Please sign in to comment.