-
Notifications
You must be signed in to change notification settings - Fork 77
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
MultiRegistry Beta API #944
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks great. A few suggestions and questions inline.
specification/resources/registry/examples/curl/all_registries_get.yml
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,51 @@ | |||
operationId: multiregistry_create | |||
|
|||
summary: Create Container Registry By Name (Beta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
summary: Create Container Registry By Name (Beta) | |
summary: [Beta] Create Container Registry By Name |
Let's put the beta tag up front for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. I had to put it inside quotes or else the operation was not visible in the rendered spec.
specification/resources/registry/multiregistry_get_dockerCredentials.yml
Outdated
Show resolved
Hide resolved
"region": "fra1" | ||
} | ||
|
||
resp = client.registry.create(body=req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resp = client.registry.create(body=req) | |
resp = client.registries.create(body=req) |
As mentioned, these are generated from the operation ID. So at the moment, that would actually be client.multiregistry.create
, but I think we really want client.registries.create
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got you @andrewsomething. Just for my information, is the python client generated automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Python client is generated automatically as soon as openapi
changes merged to main
branch.
specification/resources/registry/examples/curl/multiregistry_get.yml
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,39 @@ | |||
type: object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nearly identical to the existing registry model. It's just missing the subscription
piece. I wonder if we could do this in a way that doesn't require duplication?
Maybe something like rename this to models/registry_base.yml
and update the models/registry.yml
to be:
type: object
allOf:
- $ref: 'registry_base.yml'
- type: object
properties:
subscription:
allOf:
- readOnly: true
- $ref: 'subscription.yml'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome suggestion @andrewsomething. I have created models/registry_base.yml
and updated models/multiregistry.yml
and models/registry.yml
to import from it. Please lemme know if it looks good now.
…get.yml Co-authored-by: Andrew Starr-Bochicchio <[email protected]>
This PR adds the new endpoints for MultiRegistry Beta in Container Registry Product.
Endpoints added:
JIRA: DOCR-1003
Channel: #docr-eng