Skip to content

Commit 4d112b4

Browse files
committed
User Create/Update required and descriptions
1 parent 24af9c4 commit 4d112b4

File tree

1 file changed

+29
-45
lines changed

1 file changed

+29
-45
lines changed

openapi.yaml

Lines changed: 29 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,10 +1706,6 @@ paths:
17061706
- type
17071707
- data
17081708
- is_default
1709-
- card_number
1710-
- expiry_month
1711-
- expiry_year
1712-
- cvv
17131709
properties:
17141710
type:
17151711
type: string
@@ -1726,6 +1722,11 @@ paths:
17261722
$ref: '#/components/schemas/PaymentMethod/properties/is_default'
17271723
data:
17281724
type: object
1725+
required:
1726+
- card_number
1727+
- expiry_month
1728+
- expiry_year
1729+
- cvv
17291730
properties:
17301731
card_number:
17311732
$ref: '#/components/schemas/CreditCard/properties/card_number'
@@ -2731,34 +2732,11 @@ paths:
27312732
content:
27322733
application/json:
27332734
schema:
2735+
allOf:
2736+
- $ref: '#/components/schemas/User'
27342737
required:
27352738
- username
27362739
- email
2737-
properties:
2738-
username:
2739-
type: string
2740-
pattern: ^[a-zA-Z0-9]((?![_-]{2,})[a-zA-Z0-9-_])+[a-zA-Z0-9]$
2741-
minLength: 3
2742-
maxLength: 32
2743-
description: >
2744-
The new User's username. This is used for logging in, and may also be
2745-
displayed alongside actions the User performs (for example, in Events
2746-
or public StackScripts).
2747-
example: example_user
2748-
email:
2749-
type: string
2750-
format: email
2751-
description: >
2752-
The new User's email address.
2753-
2754-
restricted:
2755-
type: boolean
2756-
description: >
2757-
If true, the new User must be granted access to perform actions or access
2758-
entities on this Account. See
2759-
[/account/users/{username}/grants](/docs/api/account/#users-grants-view)
2760-
for details on how to configure grants for a restricted User.
2761-
example: true
27622740
responses:
27632741
'200':
27642742
description: New User created successfully.
@@ -2783,7 +2761,8 @@ paths:
27832761
source: >
27842762
linode-cli users create \
27852763
--username example_user \
2786-
2764+
2765+
--restricted true
27872766
/account/users/{username}:
27882767
x-linode-cli-command: users
27892768
parameters:
@@ -2860,14 +2839,16 @@ paths:
28602839
curl -H "Content-Type: application/json" \
28612840
-H "Authorization: Bearer $TOKEN" \
28622841
-X PUT -d '{
2863-
"username": example_user
2842+
"username": example_user,
2843+
28642844
"restricted": true
28652845
}' \
28662846
https://api.linode.com/v4/account/users/example_user
28672847
- lang: CLI
28682848
source: >
28692849
linode-cli users update example_user \
28702850
--username example_user \
2851+
28712852
--restricted true
28722853
delete:
28732854
x-linode-grant: unrestricted only
@@ -21919,7 +21900,7 @@ components:
2191921900
minLength: 3
2192021901
maxLength: 32
2192121902
description: >
21922-
This User's username. This is used for logging in, and may also be
21903+
The User's username. This is used for logging in, and may also be
2192321904
displayed alongside actions the User performs (for example, in Events
2192421905
or public StackScripts).
2192521906
x-linode-filterable: true
@@ -21929,30 +21910,33 @@ components:
2192921910
type: string
2193021911
format: email
2193121912
description: >
21932-
The email address for this User, for account management
21933-
communications, and may be used for other communications as configured.
21913+
The email address for the User. Linode sends emails to this address for account management
21914+
communications. May be used for other communications as configured.
2193421915
21935-
readOnly: true
2193621916
x-linode-cli-display: 2
2193721917
restricted:
2193821918
type: boolean
2193921919
description: >
21940-
If true, this User must be granted access to perform actions or access
21941-
entities on this Account. See
21942-
[/account/users/{username}/grants](/docs/api/account/#users-grants-view)
21920+
If true, the User must be granted access to perform actions or access
21921+
entities on this Account. See User Grants View ([GET /account/users/{username}/grants](/docs/api/account/#users-grants-view))
2194321922
for details on how to configure grants for a restricted User.
2194421923
example: true
2194521924
x-linode-cli-display: 3
2194621925
ssh_keys:
2194721926
type: array
21927+
readOnly: true
2194821928
items:
2194921929
type: string
21950-
description: >
21951-
A list of SSH Key labels added by this User. These are the keys
21952-
that will be deployed if this User is included in the `authorized_users`
21953-
field of a [create Linode](/docs/api/linode-instances/#linode-create),
21954-
[rebuild Linode](/docs/api/linode-instances/#linode-rebuild),
21955-
or [create Disk](/docs/api/linode-instances/#disk-create) request.
21930+
description: |
21931+
A list of SSH Key labels added by this User.
21932+
21933+
Users can add keys with the SSH Key Add ([POST /profile/sshkeys](/docs/api/profile/#ssh-key-add)) command.
21934+
21935+
These keys are deployed when this User is included in the `authorized_users`
21936+
field of the following requests:
21937+
- Linode Create ([POST /linode/instances](/docs/api/linode-instances/#linode-create))
21938+
- Linode Rebuild ([POST /linode/instances/{linodeId}/rebuild](/docs/api/linode-instances/#linode-rebuild))
21939+
- Disk Create ([POST /linode/instances/{linodeId}/disks](/docs/api/linode-instances/#disk-create))
2195621940
example:
2195721941
- home-pc
2195821942
- laptop
@@ -21961,7 +21945,7 @@ components:
2196121945
readOnly: true
2196221946
description: >
2196321947
A boolean value indicating if the User has Two Factor Authentication (TFA)
21964-
enabled. See the Create Two Factor Secret ([/profile/tfa-enable](/docs/api/profile/#two-factor-secret-create))
21948+
enabled. See the Create Two Factor Secret ([POST /profile/tfa-enable](/docs/api/profile/#two-factor-secret-create))
2196521949
endpoint to enable TFA.
2196621950
UserDefinedField:
2196721951
type: object

0 commit comments

Comments
 (0)