Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apis/cf/latest/components/requestBodies/RoleCreate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ content:
type: object
properties:
user:
$ref: '../schemas/RelationshipToOne.yaml'
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)
$ref: '../schemas/UserRelationshipToOne.yaml'
organization:
$ref: '../schemas/RelationshipToOne.yaml'
description: A relationship to an organization; required only when creating an organization role
Expand Down
2 changes: 1 addition & 1 deletion apis/cf/latest/components/schemas/Role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ properties:
A relationship to the space the role controls access to; when this is an organization role, `space.data` will be `null`.
user:
allOf:
- $ref: './RelationshipToOne.yaml'
- $ref: './UserRelationshipToOne.yaml'
- description: |
A relationship to the user; this is the user that has the role
links:
Expand Down
31 changes: 31 additions & 0 deletions apis/cf/latest/components/schemas/UserRelationshipToOne.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
type: [object, "null"]
properties:
data:
type: object
description: |
User relationship data that can be specified either by GUID or by username and origin.
When using username and origin, the set_roles_by_username feature flag must be enabled.
oneOf:
- type: object
properties:
guid:
type: string
format: uuid
description: The GUID of the user
required:
- guid
additionalProperties: false
- type: object
properties:
username:
type: string
description: The username of the user
origin:
type: string
description: The identity provider for the user (e.g., 'ldap', 'saml'). Optional field to disambiguate the username.
required:
- username
additionalProperties: false
description: |
User relationship data that can be specified either by GUID or by username and origin.
Set to null to clear the relationship.
5 changes: 4 additions & 1 deletion apis/cf/latest/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ components:
$ref: './components/schemas/RelationshipToOne.yaml'
RelationshipToMany:
$ref: './components/schemas/RelationshipToMany.yaml'

UserRelationshipToOne:
$ref: './components/schemas/UserRelationshipToOne.yaml'
IncludedResources:
$ref: './components/schemas/IncludedResources.yaml'
Link:
$ref: './components/schemas/Link.yaml'
Pagination:
Expand Down