Skip to content

Commit 0fb99b0

Browse files
committed
Add missing set role by username feature
1 parent 95e3fef commit 0fb99b0

4 files changed

Lines changed: 37 additions & 4 deletions

File tree

apis/cf/latest/components/requestBodies/RoleCreate.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ content:
2020
type: object
2121
properties:
2222
user:
23-
$ref: '../schemas/RelationshipToOne.yaml'
24-
description: A relationship to a user; the user can be defined by either a `guid` or, if the `set_roles_by_username` [feature_flag](#list-of-feature-flags) is enabled, a `username` (with the option of including an `origin` to disambiguate it)
23+
$ref: '../schemas/UserRelationshipToOne.yaml'
2524
organization:
2625
$ref: '../schemas/RelationshipToOne.yaml'
2726
description: A relationship to an organization; required only when creating an organization role

apis/cf/latest/components/schemas/Role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ properties:
3939
A relationship to the space the role controls access to; when this is an organization role, `space.data` will be `null`.
4040
user:
4141
allOf:
42-
- $ref: './RelationshipToOne.yaml'
42+
- $ref: './UserRelationshipToOne.yaml'
4343
- description: |
4444
A relationship to the user; this is the user that has the role
4545
links:
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
type: [object, "null"]
2+
properties:
3+
data:
4+
type: object
5+
description: |
6+
User relationship data that can be specified either by GUID or by username and origin.
7+
When using username and origin, the set_roles_by_username feature flag must be enabled.
8+
oneOf:
9+
- type: object
10+
properties:
11+
guid:
12+
type: string
13+
format: uuid
14+
description: The GUID of the user
15+
required:
16+
- guid
17+
additionalProperties: false
18+
- type: object
19+
properties:
20+
username:
21+
type: string
22+
description: The username of the user
23+
origin:
24+
type: string
25+
description: The identity provider for the user (e.g., 'ldap', 'saml'). Optional field to disambiguate the username.
26+
required:
27+
- username
28+
additionalProperties: false
29+
description: |
30+
User relationship data that can be specified either by GUID or by username and origin.
31+
Set to null to clear the relationship.

apis/cf/latest/openapi.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ components:
107107
$ref: './components/schemas/RelationshipToOne.yaml'
108108
RelationshipToMany:
109109
$ref: './components/schemas/RelationshipToMany.yaml'
110-
110+
UserRelationshipToOne:
111+
$ref: './components/schemas/UserRelationshipToOne.yaml'
112+
IncludedResources:
113+
$ref: './components/schemas/IncludedResources.yaml'
111114
Link:
112115
$ref: './components/schemas/Link.yaml'
113116
Pagination:

0 commit comments

Comments
 (0)