Skip to content

Commit

Permalink
Add all registries get spec
Browse files Browse the repository at this point in the history
  • Loading branch information
nayanjd-do committed Nov 13, 2024
1 parent 6db6f21 commit c5b53c1
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 3 deletions.
4 changes: 4 additions & 0 deletions specification/DigitalOcean-public.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,10 @@ paths:
$ref: 'resources/registry/registry_delete.yml'

/v2/registries:
get:
$ref: 'resources/registry/multiregistry_get_all.yml'

/v2/registries/{registry_name}:
get:
$ref: 'resources/registry/multiregistry_get.yml'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
lang: cURL
source: |-
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/registry"
2 changes: 1 addition & 1 deletion specification/resources/registry/multiregistry_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ responses:

x-codeSamples:
- $ref: 'examples/curl/multiregistry_create.yml'
- $ref: 'examples/python/multiregistry_create.yml'
# - $ref: 'examples/python/multiregistry_create.yml'

security:
- bearer_auth:
Expand Down
2 changes: 1 addition & 1 deletion specification/resources/registry/multiregistry_delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ responses:

x-codeSamples:
- $ref: 'examples/curl/registry_delete.yml'
- $ref: 'examples/python/registry_delete.yml'
# - $ref: 'examples/python/registry_delete.yml'

security:
- bearer_auth:
Expand Down
2 changes: 1 addition & 1 deletion specification/resources/registry/multiregistry_get.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ responses:

x-codeSamples:
- $ref: 'examples/curl/registry_get.yml'
- $ref: 'examples/python/registry_get.yml'
# - $ref: 'examples/python/registry_get.yml'

security:
- bearer_auth:
Expand Down
33 changes: 33 additions & 0 deletions specification/resources/registry/multiregistry_get_all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
operationId: multiregistry_get_all

summary: Get All Container Registries (Beta)

description: To get information about any container registry in your account, send a GET
request to `/v2/registries/`.

tags:
- Container Registry

responses:
'200':
$ref: 'responses/all_registries_info.yml'

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

'429':
$ref: '../../shared/responses/too_many_requests.yml'

'500':
$ref: '../../shared/responses/server_error.yml'

default:
$ref: '../../shared/responses/unexpected_error.yml'

x-codeSamples:
- $ref: 'examples/curl/registry_get.yml'
- $ref: 'examples/python/registry_get.yml'

security:
- bearer_auth:
- 'registry:read'
20 changes: 20 additions & 0 deletions specification/resources/registry/responses/all_registries_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
description: The response will be a JSON object with the key `registry`
containing information about your registry.

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:
properties:
registry:
type: array
items:
oneOf:
- $ref: '../models/registry.yml'

0 comments on commit c5b53c1

Please sign in to comment.