Skip to content

Commit fb5a0b3

Browse files
authored
[docker-hub-api] Fix Assign repository group endpoints req/resp (#23453)
<!--Delete sections as needed --> ## Description [docker-hub-api] Fix `Assign repository group` endpoints request/response. see docker/hub-feedback#2495 <!-- Tell us what you did and why --> ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [x] Technical review - [ ] Editorial review - [ ] Product review
1 parent b192768 commit fb5a0b3

File tree

2 files changed

+72
-18
lines changed

2 files changed

+72
-18
lines changed

content/reference/api/hub/changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ issues for Docker Service APIs.
1515

1616
---
1717

18+
## 2025-09-25
19+
20+
### Updates
21+
22+
- Fix [Assign repository group](/reference/api/hub/latest/#tag/repositories/operation/CreateRepositoryGroup) endpoints request/response
23+
24+
---
25+
1826
## 2025-09-19
1927

2028
### New

content/reference/api/hub/latest.yaml

Lines changed: 64 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -958,28 +958,37 @@ paths:
958958
summary: Assign a group (Team) to a repository for access
959959
tags:
960960
- repositories
961+
operationId: CreateRepositoryGroup
961962
security:
962963
- bearerAuth: []
963-
parameters:
964-
- in: query
965-
name: group_name
966-
required: true
967-
schema:
968-
type: string
969-
description: Name of the group (team) in the organization.
970-
- in: query
971-
name: permission
972-
required: true
973-
schema:
974-
type: string
975-
description: |
976-
Access level for the group. Possible values:
977-
- `read`
978-
- `write`
979-
- `admin`
964+
requestBody:
965+
required: true
966+
content:
967+
application/json:
968+
schema:
969+
$ref: '#/components/schemas/RepositoryGroupCreationRequest'
970+
example:
971+
group_id: 12345
972+
permission: "write"
980973
responses:
981974
"200":
982-
$ref: "#/components/responses/team_repo"
975+
description: Repository group permission created successfully
976+
content:
977+
application/json:
978+
schema:
979+
$ref: '#/components/schemas/RepositoryGroup'
980+
example:
981+
group_name: "developers"
982+
permission: "write"
983+
group_id: 12345
984+
"400":
985+
description: Bad Request - Invalid request parameters
986+
content:
987+
application/json:
988+
schema:
989+
$ref: "#/components/schemas/error"
990+
"401":
991+
$ref: "#/components/responses/unauthorized"
983992
"403":
984993
$ref: "#/components/responses/forbidden"
985994
"404":
@@ -2449,6 +2458,43 @@ components:
24492458
description: Whether the repository should be private
24502459
default: false
24512460
example: false
2461+
RepositoryGroupCreationRequest:
2462+
type: object
2463+
required:
2464+
- group_id
2465+
- permission
2466+
properties:
2467+
group_id:
2468+
type: integer
2469+
format: int64
2470+
description: The ID of the organization group to grant access to
2471+
example: 12345
2472+
permission:
2473+
type: string
2474+
description: |
2475+
The permission level to grant to the group:
2476+
- read: Can view and pull from the repository
2477+
- write: Can view, pull, and push to the repository
2478+
- admin: Can view, pull, push, and manage repository settings
2479+
enum: [ "read", "write", "admin" ]
2480+
example: "write"
2481+
RepositoryGroup:
2482+
type: object
2483+
properties:
2484+
group_name:
2485+
type: string
2486+
description: The name of the group
2487+
example: "developers"
2488+
permission:
2489+
type: string
2490+
description: The permission level granted to the group
2491+
enum: [ "read", "write", "admin" ]
2492+
example: "write"
2493+
group_id:
2494+
type: integer
2495+
format: int64
2496+
description: The ID of the group
2497+
example: 12345
24522498
repository_info:
24532499
type: object
24542500
properties:

0 commit comments

Comments
 (0)