Skip to content

Commit aa266bc

Browse files
authored
Merge pull request #56 from mulesoft-anypoint/dev
Feature: User
2 parents 10c6155 + dc13fd7 commit aa266bc

File tree

1 file changed

+32
-59
lines changed

1 file changed

+32
-59
lines changed

spec/user.yml

Lines changed: 32 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
openapi: 3.0.0
22
info:
33
title: User API
4-
description: Description of the User API
5-
version: 1.0.0
4+
description: Description of the User API
5+
version: 1.1.1
66
servers:
77
- url: https://anypoint.mulesoft.com/accounts/api/
8-
description: Anypoint Cloudhub
8+
description: Anypoint Cloudhub
99
- url: https://eu1.anypoint.mulesoft.com/accounts/api/
1010
description: Anypoint Cloudhub EU
1111
- url: https://gov.anypoint.mulesoft.com/accounts/api/
1212
description: Anypoint Cloudhub GOV
1313

1414
security:
15-
- bearerAuth: []
15+
- bearerAuth: []
1616

1717
paths:
1818
/organizations/{orgId}/users:
19+
parameters:
20+
- name: orgId
21+
in: path
22+
description: The ID of the organization in GUID format
23+
required: true
24+
schema:
25+
type: string
1926
get:
27+
operationId: listUsers
2028
description: Returns the group of users that belong to the specified organization.
2129
parameters:
22-
- name: orgId
23-
in: path
24-
description: The ID of the organization in GUID format
25-
required: true
26-
schema:
27-
type: string
2830
- name: type
2931
in: query
3032
description: A search string to specify the type of user you want to retrieve.
@@ -50,14 +52,8 @@ paths:
5052
'200': # status code
5153
$ref: '#/components/responses/SuccessListUsers'
5254
post:
55+
operationId: createUser
5356
description: Creates a User
54-
parameters:
55-
- name: orgId
56-
in: path
57-
description: The ID of the organization in GUID format
58-
required: true
59-
schema:
60-
type: string
6157
requestBody:
6258
content:
6359
application/json:
@@ -72,29 +68,7 @@ paths:
7268
$ref: '#/components/responses/SuccessPostUser'
7369

7470
/organizations/{orgId}/users/{userId}:
75-
get:
76-
description: Returns a specific user that belong to the specified organization.
77-
parameters:
78-
- name: orgId
79-
in: path
80-
description: The ID of the organization in GUID format
81-
required: true
82-
schema:
83-
type: string
84-
- name: userId
85-
in: path
86-
description: the ID of the user
87-
required: true
88-
schema:
89-
type: string
90-
responses:
91-
'401':
92-
$ref: '#/components/responses/UnauthorizedError'
93-
'200': # status code
94-
$ref: '#/components/responses/SuccessGetUser'
95-
put:
96-
description: Update a user
97-
parameters:
71+
parameters:
9872
- name: orgId
9973
in: path
10074
description: The ID of the organization in GUID format
@@ -103,10 +77,21 @@ paths:
10377
type: string
10478
- name: userId
10579
in: path
106-
description: The ID of the user
80+
description: the ID of the user
10781
required: true
10882
schema:
10983
type: string
84+
get:
85+
operationId: getUser
86+
description: Returns a specific user that belong to the specified organization.
87+
responses:
88+
'401':
89+
$ref: '#/components/responses/UnauthorizedError'
90+
'200': # status code
91+
$ref: '#/components/responses/SuccessGetUser'
92+
put:
93+
operationId: updateUser
94+
description: Update a user
11095
requestBody:
11196
content:
11297
application/json:
@@ -120,20 +105,8 @@ paths:
120105
'204':
121106
$ref: '#/components/responses/SuccessPutUser'
122107
delete:
108+
operationId: deleteUser
123109
description: Delete the user
124-
parameters:
125-
- name: orgId
126-
in: path
127-
description: The ID of the organization in GUID format
128-
required: true
129-
schema:
130-
type: string
131-
- name: userId
132-
in: path
133-
description: The ID of the user
134-
required: true
135-
schema:
136-
type: string
137110
responses:
138111
'401':
139112
$ref: '#/components/responses/UnauthorizedError'
@@ -159,12 +132,12 @@ components:
159132
properties:
160133
status:
161134
type: integer
162-
title: the response status code
135+
title: the response status code
163136
default: 400
164137
message:
165138
type: string
166139
title: the error message
167-
example: A sample message here
140+
example: A sample message here
168141
SuccessPostUser:
169142
description: Success response
170143
content:
@@ -350,7 +323,7 @@ components:
350323
type: object
351324
title: primaryOrganization
352325
properties:
353-
id:
326+
id:
354327
type: string
355328
title: id
356329
name:
@@ -437,7 +410,7 @@ components:
437410
title: memberOfOrganizations
438411
items:
439412
$ref: "#/components/schemas/org"
440-
413+
441414
contributorOfOrganizations:
442415
type: array
443416
title: contributorOfOrganizations
@@ -462,7 +435,7 @@ components:
462435
name:
463436
type: string
464437
title: name
465-
id:
438+
id:
466439
type: string
467440
title: id
468441
createdAt:

0 commit comments

Comments
 (0)