solarwinds-itsm-api-definitions 0.0.7 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/definitions/common/components.json +171 -123
- data/lib/definitions/common/examples/incident.json +28 -35
- data/lib/definitions/common/examples/user.json +76 -0
- data/lib/definitions/common/schemas/incident.json +31 -68
- data/lib/definitions/common/schemas/user.json +53 -0
- data/lib/definitions/openapi.json +6 -6
- data/lib/definitions/paths/incidents/incident_by_id.json +27 -9
- data/lib/definitions/paths/incidents/incidents.json +33 -5
- data/lib/definitions/paths/users/user_by_id.json +84 -0
- data/lib/definitions/paths/users/users.json +69 -0
- data/lib/resolved_schema/resolved_schema.json +1 -1
- metadata +9 -3
@@ -0,0 +1,76 @@
|
|
1
|
+
{
|
2
|
+
"examples": {
|
3
|
+
"request": {
|
4
|
+
"json": {
|
5
|
+
"user": {
|
6
|
+
"name": "John Doe",
|
7
|
+
"email": "john.doe@email.com",
|
8
|
+
"title": "Support Agent",
|
9
|
+
"site": { "name": "AUS" },
|
10
|
+
"department": { "name": "Support" },
|
11
|
+
"role": { "name": "Requester" },
|
12
|
+
"phone": "+10000000",
|
13
|
+
"mobile_phone": "+10000000",
|
14
|
+
"reports_to": { "email": "john.boe@email.com" },
|
15
|
+
"custom_field_values": {
|
16
|
+
"custom_field_value": [
|
17
|
+
{ "name": "field name", "value": "content" }
|
18
|
+
]
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
},
|
23
|
+
"response": {
|
24
|
+
"json": {
|
25
|
+
"user": {
|
26
|
+
"id": "10000",
|
27
|
+
"name": "John Doe",
|
28
|
+
"title": "Support Agent",
|
29
|
+
"disabled": false,
|
30
|
+
"email": "john.doe@email.com",
|
31
|
+
"created_at": "2030-01-01T00:00:00.000+00:00",
|
32
|
+
"phone": "+10000000",
|
33
|
+
"mobile_phone": "+10000000",
|
34
|
+
"site": {
|
35
|
+
"id": "1",
|
36
|
+
"name": "Austin TX, USA",
|
37
|
+
"location": "AUS",
|
38
|
+
"description": "",
|
39
|
+
"time_zone": ""
|
40
|
+
},
|
41
|
+
"department": {
|
42
|
+
"id": "1",
|
43
|
+
"name": "Support",
|
44
|
+
"description": "",
|
45
|
+
"default_assignee_id": "1"
|
46
|
+
},
|
47
|
+
"role": {
|
48
|
+
"id": 1,
|
49
|
+
"name": "Requester",
|
50
|
+
"description": "Requester role.",
|
51
|
+
"portal": true,
|
52
|
+
"show_my_tasks": true
|
53
|
+
},
|
54
|
+
"group_ids": [1],
|
55
|
+
"avatar": {
|
56
|
+
"type": "initials",
|
57
|
+
"color": "#fd4165",
|
58
|
+
"initials": "JD"
|
59
|
+
},
|
60
|
+
"reports_to": {
|
61
|
+
"group_id": "1",
|
62
|
+
"is_user": "true",
|
63
|
+
"id": "100",
|
64
|
+
"name": "John Boe",
|
65
|
+
"email": "john.boe@email.com",
|
66
|
+
"avatar": {
|
67
|
+
"type": "initials",
|
68
|
+
"color": "#fd4166",
|
69
|
+
"initials": "JB"
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
@@ -9,25 +9,25 @@
|
|
9
9
|
"type": "object",
|
10
10
|
"properties": {
|
11
11
|
"name": { "type": "string" },
|
12
|
-
"site_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
|
13
|
-
"department_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
|
12
|
+
"site_id": { "$ref": "../components.json#/components/common/schemas/association_by_id" },
|
13
|
+
"department_id": { "$ref": "../components.json#/components/common/schemas/association_by_id" },
|
14
14
|
"description": { "type": "string" },
|
15
|
-
"state_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
|
16
|
-
"assignee": { "$ref": "../components.json#/components/schemas/association_by_email" },
|
17
|
-
"assignee_id": { "$ref": "../components.json#/components/schemas/association_by_id" },
|
18
|
-
"priority": { "$ref": "../components.json#/components/schemas/association_by_id" },
|
19
|
-
"requester": { "$ref": "../components.json#/components/schemas/association_by_email" },
|
20
|
-
"category": { "$ref": "../components.json#/components/schemas/association_by_name" },
|
21
|
-
"subcategory": { "$ref": "../components.json#/components/schemas/association_by_name" },
|
15
|
+
"state_id": { "$ref": "../components.json#/components/common/schemas/association_by_id" },
|
16
|
+
"assignee": { "$ref": "../components.json#/components/request/schemas/association_by_email" },
|
17
|
+
"assignee_id": { "$ref": "../components.json#/components/common/schemas/association_by_id" },
|
18
|
+
"priority": { "$ref": "../components.json#/components/common/schemas/association_by_id" },
|
19
|
+
"requester": { "$ref": "../components.json#/components/request/schemas/association_by_email" },
|
20
|
+
"category": { "$ref": "../components.json#/components/request/schemas/association_by_name" },
|
21
|
+
"subcategory": { "$ref": "../components.json#/components/request/schemas/association_by_name" },
|
22
22
|
"due_at": { "type": "string" },
|
23
23
|
"add_to_tag_list": { "type": "string" },
|
24
|
-
"custom_field_values": { "$ref": "../components.json#/components/schemas/custom_field_values" },
|
25
|
-
"incidents": { "$ref": "../components.json#/components/schemas/numbers_array" },
|
26
|
-
"solutions": { "$ref": "../components.json#/components/schemas/numbers_array" },
|
27
|
-
"changes": { "$ref": "../components.json#/components/schemas/numbers_array" },
|
28
|
-
"problems": { "$ref": "../components.json#/components/schemas/numbers_array" },
|
29
|
-
"releases": { "$ref": "../components.json#/components/schemas/numbers_array" },
|
30
|
-
"configuration_item_ids": { "$ref": "../components.json#/components/schemas/ids_array" }
|
24
|
+
"custom_field_values": { "$ref": "../components.json#/components/request/schemas/custom_field_values" },
|
25
|
+
"incidents": { "$ref": "../components.json#/components/request/schemas/numbers_array" },
|
26
|
+
"solutions": { "$ref": "../components.json#/components/request/schemas/numbers_array" },
|
27
|
+
"changes": { "$ref": "../components.json#/components/request/schemas/numbers_array" },
|
28
|
+
"problems": { "$ref": "../components.json#/components/request/schemas/numbers_array" },
|
29
|
+
"releases": { "$ref": "../components.json#/components/request/schemas/numbers_array" },
|
30
|
+
"configuration_item_ids": { "$ref": "../components.json#/components/common/schemas/ids_array" }
|
31
31
|
}
|
32
32
|
}
|
33
33
|
}
|
@@ -38,68 +38,31 @@
|
|
38
38
|
"incident": {
|
39
39
|
"type": "object",
|
40
40
|
"properties": {
|
41
|
-
"id": { "$ref": "../components.json#/components/schemas/id" },
|
41
|
+
"id": { "$ref": "../components.json#/components/response/schemas/id" },
|
42
42
|
"name": { "type": "string" },
|
43
43
|
"description": { "type": "string" },
|
44
|
-
"site": { "$ref": "../components.json#/components/schemas/site_response" },
|
45
|
-
"department": { "$ref": "../components.json#/components/schemas/department_response" },
|
44
|
+
"site": { "$ref": "../components.json#/components/response/schemas/site_response" },
|
45
|
+
"department": { "$ref": "../components.json#/components/response/schemas/department_response" },
|
46
46
|
"state": { "type": "string" },
|
47
47
|
"priority": { "type": "string" },
|
48
|
-
"assignee": { "$ref": "../components.json#/components/schemas/
|
49
|
-
"requester": { "$ref": "../components.json#/components/schemas/
|
50
|
-
"category": { "$ref": "../components.json#/components/schemas/category_subcategory" },
|
51
|
-
"subcategory": { "$ref": "../components.json#/components/schemas/category_subcategory" },
|
48
|
+
"assignee": { "$ref": "../components.json#/components/response/schemas/assignee_details" },
|
49
|
+
"requester": { "$ref": "../components.json#/components/response/schemas/requester_details" },
|
50
|
+
"category": { "$ref": "../components.json#/components/response/schemas/category_subcategory" },
|
51
|
+
"subcategory": { "$ref": "../components.json#/components/response/schemas/category_subcategory" },
|
52
52
|
"due_at": { "type": "string" },
|
53
|
-
"custom_field_values": { "$ref": "../components.json#/components/schemas/custom_field_values" },
|
54
|
-
"created_by": { "$ref": "../components.json#/components/schemas/
|
53
|
+
"custom_field_values": { "$ref": "../components.json#/components/response/schemas/custom_field_values" },
|
54
|
+
"created_by": { "$ref": "../components.json#/components/response/schemas/requester_details" },
|
55
55
|
"origin": { "type": "string" },
|
56
|
-
"incidents": { "$ref": "../components.json#/components/schemas/response_attachments" },
|
57
|
-
"solutions": { "$ref": "../components.json#/components/schemas/response_attachments" },
|
58
|
-
"changes": { "$ref": "../components.json#/components/schemas/response_attachments" },
|
59
|
-
"problems": { "$ref": "../components.json#/components/schemas/response_attachments" },
|
60
|
-
"releases": { "$ref": "../components.json#/components/schemas/response_attachments" },
|
61
|
-
"
|
56
|
+
"incidents": { "$ref": "../components.json#/components/response/schemas/response_attachments" },
|
57
|
+
"solutions": { "$ref": "../components.json#/components/response/schemas/response_attachments" },
|
58
|
+
"changes": { "$ref": "../components.json#/components/response/schemas/response_attachments" },
|
59
|
+
"problems": { "$ref": "../components.json#/components/response/schemas/response_attachments" },
|
60
|
+
"releases": { "$ref": "../components.json#/components/response/schemas/response_attachments" },
|
61
|
+
"configuration_items": { "$ref": "../components.json#/components/response/schemas/response_attachments" }
|
62
62
|
}
|
63
63
|
}
|
64
64
|
}
|
65
65
|
}
|
66
|
-
},
|
67
|
-
"incidents": {
|
68
|
-
"description": "List of incidents",
|
69
|
-
"type": "array",
|
70
|
-
"items": {
|
71
|
-
"allOf": [{ "$ref": "incident.json#/components/schemas/incident/response" }]
|
72
|
-
}
|
73
|
-
},
|
74
|
-
"incident_request_content": {
|
75
|
-
"application/json": {
|
76
|
-
"schema": { "$ref": "incident.json#/components/schemas/incident/request" },
|
77
|
-
"example": { "$ref": "../examples/incident.json#/examples/request/json" }
|
78
|
-
},
|
79
|
-
"application/xml": {
|
80
|
-
"schema": { "$ref": "incident.json#/components/schemas/incident/request" },
|
81
|
-
"example": { "$ref": "../examples/incident.json#/examples/request/xml" }
|
82
|
-
}
|
83
|
-
},
|
84
|
-
"many_incidents_content": {
|
85
|
-
"application/json": {
|
86
|
-
"schema": { "$ref": "incident.json#/components/schemas/incidents" },
|
87
|
-
"example": [{ "$ref": "../examples/incident.json#/examples/response/json" }]
|
88
|
-
},
|
89
|
-
"application/xml": {
|
90
|
-
"schema": { "$ref": "incident.json#/components/schemas/incidents" },
|
91
|
-
"example": [{ "$ref": "../examples/incident.json#/examples/response/xml" }]
|
92
|
-
}
|
93
|
-
},
|
94
|
-
"incident_response_content": {
|
95
|
-
"application/json": {
|
96
|
-
"schema": { "$ref": "incident.json#/components/schemas/incident/response" },
|
97
|
-
"example": { "$ref": "../examples/incident.json#/examples/response/json" }
|
98
|
-
},
|
99
|
-
"application/xml": {
|
100
|
-
"schema": { "$ref": "incident.json#/components/schemas/incident/response" },
|
101
|
-
"example": { "$ref": "../examples/incident.json#/examples/response/xml" }
|
102
|
-
}
|
103
66
|
}
|
104
67
|
}
|
105
68
|
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
{
|
2
|
+
"components": {
|
3
|
+
"schemas": {
|
4
|
+
"user": {
|
5
|
+
"request": {
|
6
|
+
"type": "object",
|
7
|
+
"properties": {
|
8
|
+
"user": {
|
9
|
+
"type": "object",
|
10
|
+
"properties": {
|
11
|
+
"name": { "type": "string" },
|
12
|
+
"title": { "type": "string" },
|
13
|
+
"email": { "type": "string", "format": "email" },
|
14
|
+
"disabled": { "type": "boolean" },
|
15
|
+
"phone": { "type": "string" },
|
16
|
+
"mobile_phone": { "type": "string" },
|
17
|
+
"role": { "$ref": "../components.json#/components/request/schemas/association_by_name" },
|
18
|
+
"site": { "$ref": "../components.json#/components/request/schemas/association_by_name" },
|
19
|
+
"department": { "$ref": "../components.json#/components/request/schemas/association_by_name" },
|
20
|
+
"reports_to": { "$ref": "../components.json#/components/request/schemas/association_by_email" },
|
21
|
+
"custom_fields_values": { "$ref": "../components.json#/components/request/schemas/custom_fields_values" }
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"response": {
|
27
|
+
"type": "object",
|
28
|
+
"properties": {
|
29
|
+
"user": {
|
30
|
+
"type": "object",
|
31
|
+
"properties": {
|
32
|
+
"id": { "$ref": "../components.json#/components/response/schemas/id" },
|
33
|
+
"name": { "type": "string" },
|
34
|
+
"title": { "type": "string" },
|
35
|
+
"email": { "type": "string", "format": "email" },
|
36
|
+
"phone": { "type": "string" },
|
37
|
+
"mobile_phone": { "type": "string" },
|
38
|
+
"role": { "$ref": "../components.json#/components/response/schemas/role" },
|
39
|
+
"site": { "$ref": "../components.json#/components/response/schemas/site_response" },
|
40
|
+
"department": { "$ref": "../components.json#/components/response/schemas/department_response" },
|
41
|
+
"custom_fields_values": { "$ref": "../components.json#/components/response/schemas/custom_field_values" },
|
42
|
+
"avatar": { "$ref": "../components.json#/components/response/schemas/avatar" },
|
43
|
+
"reports_to": { "$ref": "../components.json#/components/response/schemas/assignee_details" },
|
44
|
+
"group_ids": { "$ref": "../components.json#/components/common/schemas/ids_array" },
|
45
|
+
"created_at": { "type": "string" }
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
"info": {
|
4
4
|
"title": "SolarWinds ITSM API",
|
5
5
|
"description": "All SolarWinds ITSM API definitions",
|
6
|
-
"version": "0.
|
6
|
+
"version": "0.1.2",
|
7
7
|
"contact": {
|
8
8
|
"name": "API Support",
|
9
9
|
"url": "samanage.com/support",
|
@@ -16,12 +16,12 @@
|
|
16
16
|
],
|
17
17
|
"paths": {
|
18
18
|
"/incidents/{id}": { "$ref": "paths/incidents/incident_by_id.json" },
|
19
|
-
"/incidents": { "$ref": "paths/incidents/incidents.json" }
|
19
|
+
"/incidents": { "$ref": "paths/incidents/incidents.json" },
|
20
|
+
"/users/{id}": { "$ref": "paths/users/user_by_id.json" },
|
21
|
+
"/users": { "$ref": "paths/users/users.json" }
|
20
22
|
},
|
21
23
|
"tags": [
|
22
|
-
{
|
23
|
-
|
24
|
-
"description": "Incident operations"
|
25
|
-
}
|
24
|
+
{ "name": "Incident", "description": "Incident operations" },
|
25
|
+
{ "name": "User", "description": "User operations" }
|
26
26
|
]
|
27
27
|
}
|
@@ -4,13 +4,19 @@
|
|
4
4
|
"description": "Get incident",
|
5
5
|
"tags": ["Incident"],
|
6
6
|
"parameters": [
|
7
|
-
{ "$ref": "../../common/components.json#/components/parameters/
|
8
|
-
{ "$ref": "../../common/components.json#/components/parameters/
|
7
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
8
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
9
9
|
],
|
10
10
|
"responses": {
|
11
11
|
"200": {
|
12
12
|
"description": "Object was returned correctly",
|
13
|
-
"content": {
|
13
|
+
"content": {
|
14
|
+
"application/json": {
|
15
|
+
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/response" },
|
16
|
+
"example": { "$ref": "../../common/examples/incident.json#/examples/response/json" }
|
17
|
+
},
|
18
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/response" } }
|
19
|
+
}
|
14
20
|
},
|
15
21
|
"400": { "description": "Bad request" },
|
16
22
|
"404": { "description": "Not found" },
|
@@ -22,18 +28,30 @@
|
|
22
28
|
"description": "Update incident with specified fields",
|
23
29
|
"tags": ["Incident"],
|
24
30
|
"parameters": [
|
25
|
-
{ "$ref": "../../common/components.json#/components/parameters/
|
26
|
-
{ "$ref": "../../common/components.json#/components/parameters/
|
31
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
32
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
27
33
|
],
|
28
34
|
"requestBody": {
|
29
35
|
"required": true,
|
30
36
|
"description": "Incident fields to update",
|
31
|
-
"content": {
|
37
|
+
"content": {
|
38
|
+
"application/json": {
|
39
|
+
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/request" },
|
40
|
+
"example": { "$ref": "../../common/examples/incident.json#/examples/request/json" }
|
41
|
+
},
|
42
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/request" } }
|
43
|
+
}
|
32
44
|
},
|
33
45
|
"responses": {
|
34
46
|
"200": {
|
35
47
|
"description": "Object was updated correctly",
|
36
|
-
"content": {
|
48
|
+
"content": {
|
49
|
+
"application/json": {
|
50
|
+
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/response" },
|
51
|
+
"example": { "$ref": "../../common/examples/incident.json#/examples/response/json" }
|
52
|
+
},
|
53
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/response" } }
|
54
|
+
}
|
37
55
|
},
|
38
56
|
"400": { "description": "Bad request" },
|
39
57
|
"404": { "description": "Not found" },
|
@@ -45,8 +63,8 @@
|
|
45
63
|
"description": "Delete incident",
|
46
64
|
"tags": ["Incident"],
|
47
65
|
"parameters": [
|
48
|
-
{ "$ref": "../../common/components.json#/components/parameters/
|
49
|
-
{ "$ref": "../../common/components.json#/components/parameters/
|
66
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
67
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
50
68
|
],
|
51
69
|
"responses": {
|
52
70
|
"200": {
|
@@ -4,12 +4,28 @@
|
|
4
4
|
"description": "List of incidents",
|
5
5
|
"tags": ["Incident"],
|
6
6
|
"parameters": [
|
7
|
-
{ "$ref": "../../common/components.json#/components/parameters/token_param" }
|
7
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" }
|
8
8
|
],
|
9
9
|
"responses": {
|
10
10
|
"200": {
|
11
11
|
"description": "Object was returned correctly",
|
12
|
-
"content": {
|
12
|
+
"content": {
|
13
|
+
"application/json": {
|
14
|
+
"schema": {
|
15
|
+
"description": "List of incidents",
|
16
|
+
"type": "array",
|
17
|
+
"items": { "allOf": [{ "$ref": "../../common/schemas/incident.json#/components/schemas/incident/response" }] }
|
18
|
+
},
|
19
|
+
"example": [{ "$ref": "../../common/examples/incident.json#/examples/response/json" }]
|
20
|
+
},
|
21
|
+
"application/xml": {
|
22
|
+
"schema": {
|
23
|
+
"description": "List of incidents",
|
24
|
+
"type": "array",
|
25
|
+
"items": { "allOf": [{ "$ref": "../../common/schemas/incident.json#/components/schemas/incident/response" }] }
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
13
29
|
},
|
14
30
|
"400": { "description": "Bad request" },
|
15
31
|
"404": { "description": "Not found" },
|
@@ -21,17 +37,29 @@
|
|
21
37
|
"description": "Create new incident",
|
22
38
|
"tags": ["Incident"],
|
23
39
|
"parameters": [
|
24
|
-
{ "$ref": "../../common/components.json#/components/parameters/token_param" }
|
40
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" }
|
25
41
|
],
|
26
42
|
"requestBody": {
|
27
43
|
"required": true,
|
28
44
|
"description": "Incident fields to fill",
|
29
|
-
"content": {
|
45
|
+
"content": {
|
46
|
+
"application/json": {
|
47
|
+
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/request" },
|
48
|
+
"example": { "$ref": "../../common/examples/incident.json#/examples/request/json" }
|
49
|
+
},
|
50
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/request" } }
|
51
|
+
}
|
30
52
|
},
|
31
53
|
"responses": {
|
32
54
|
"200": {
|
33
55
|
"description": "Object created and returned correctly",
|
34
|
-
"content": {
|
56
|
+
"content": {
|
57
|
+
"application/json": {
|
58
|
+
"schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/response" },
|
59
|
+
"example": { "$ref": "../../common/examples/incident.json#/examples/response/json" }
|
60
|
+
},
|
61
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/incident.json#/components/schemas/incident/response" } }
|
62
|
+
}
|
35
63
|
},
|
36
64
|
"400": { "description": "Bad request" },
|
37
65
|
"500": { "description": "Server error" }
|
@@ -0,0 +1,84 @@
|
|
1
|
+
{
|
2
|
+
"get": {
|
3
|
+
"operationId": "getUserById",
|
4
|
+
"description": "Get user",
|
5
|
+
"tags": ["User"],
|
6
|
+
"parameters": [
|
7
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
8
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
9
|
+
],
|
10
|
+
"responses": {
|
11
|
+
"200": {
|
12
|
+
"description": "Object was returned correctly",
|
13
|
+
"content": {
|
14
|
+
"application/json": {
|
15
|
+
"schema": { "$ref": "../../common/schemas/user.json#/components/schemas/user/response" },
|
16
|
+
"example": { "$ref": "../../common/examples/user.json#/examples/response/json" }
|
17
|
+
},
|
18
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/user.json#/components/schemas/user/response" } }
|
19
|
+
}
|
20
|
+
},
|
21
|
+
"400": { "description": "Bad request" },
|
22
|
+
"404": { "description": "Not found" },
|
23
|
+
"500": { "description": "Internal Server Error" }
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"put": {
|
27
|
+
"operationId": "updateUserById",
|
28
|
+
"description": "Update user with specified fields",
|
29
|
+
"tags": ["User"],
|
30
|
+
"parameters": [
|
31
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
32
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
33
|
+
],
|
34
|
+
"requestBody": {
|
35
|
+
"required": true,
|
36
|
+
"description": "User fields to update",
|
37
|
+
"content": {
|
38
|
+
"application/json": {
|
39
|
+
"schema": { "$ref": "../../common/schemas/user.json#/components/schemas/user/request" },
|
40
|
+
"example": { "$ref": "../../common/examples/user.json#/examples/request/json" }
|
41
|
+
},
|
42
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/user.json#/components/schemas/user/request" } }
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"responses": {
|
46
|
+
"200": {
|
47
|
+
"description": "Object was updated correctly",
|
48
|
+
"content": {
|
49
|
+
"application/json": {
|
50
|
+
"schema": { "$ref": "../../common/schemas/user.json#/components/schemas/user/response" },
|
51
|
+
"example": { "$ref": "../../common/examples/user.json#/examples/response/json" }
|
52
|
+
},
|
53
|
+
"application/xml": { "schema": { "$ref": "../../common/schemas/user.json#/components/schemas/user/response" } }
|
54
|
+
}
|
55
|
+
},
|
56
|
+
"400": { "description": "Bad request" },
|
57
|
+
"404": { "description": "Not found" },
|
58
|
+
"500": { "description": "Internal Server Error" }
|
59
|
+
}
|
60
|
+
},
|
61
|
+
"delete": {
|
62
|
+
"operationId": "deleteUserById",
|
63
|
+
"description": "Delete user",
|
64
|
+
"tags": ["User"],
|
65
|
+
"parameters": [
|
66
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/token_param" },
|
67
|
+
{ "$ref": "../../common/components.json#/components/request/parameters/id_param" }
|
68
|
+
],
|
69
|
+
"responses": {
|
70
|
+
"200": {
|
71
|
+
"description": "Object was returned correctly",
|
72
|
+
"content": {
|
73
|
+
"application/json": {
|
74
|
+
"example": { "messages": { "message": "Deleted user Test update" } }
|
75
|
+
}
|
76
|
+
}
|
77
|
+
},
|
78
|
+
"400": { "description": "Bad request" },
|
79
|
+
"404": { "description": "Not found" },
|
80
|
+
"500": { "description": "Internal Server Error" }
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|