-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger-jira-client.yaml
210 lines (204 loc) · 6.64 KB
/
swagger-jira-client.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
swagger: "2.0"
info:
description: "This is the jira rest resources endpoint documentation"
version: "8.3.2"
title: "Jira Rest Resources"
basePath: "/api/2"
tags:
- name: jira
schemes:
- "https"
paths:
/user/search:
get:
summary: "Returns a list of users that match the search string. This resource cannot be accessed anonymously."
operationId: "Find users"
tags:
- jira
security:
- crowdAuth: []
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "username"
in: "query"
description: "A query string used to search username, name or e-mail address"
type: "string"
required: true
- name: "startAt"
in: "query"
description: "the index of the first user to return (0-based)"
type: "integer"
required: false
default: 0
- name: "maxResults"
in: "query"
description: "the maximum number of users to return (defaults to 50). The maximum allowed value is 1000. If you specify a value that is higher than this number, your search results will be truncated."
type: "integer"
required: false
default: 50
- name: "includeActive"
in: "query"
description: ""
type: "boolean"
required: false
default: true
- name: "includeInactive"
in: "query"
description: ""
type: "boolean"
required: false
default: false
responses:
200:
description: "Returns a full representation of a JIRA user in JSON format."
schema:
type: "array"
items:
$ref: '#/definitions/JiraUser'
400:
description: "Returned if the requested user is not found."
/issue:
post:
summary: "Creates an issue or a sub-task from a JSON representation"
operationId: "createIssue"
tags:
- jira
security:
- crowdAuth: []
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- name: "updateHistory"
in: "query"
description: "if true then the user's project history is updated"
type: "boolean"
required: false
default: false
- name: "issue"
in: "body"
description: "The specification of the issue to create"
schema:
$ref: '#/definitions/JiraIssueCreationProperties'
responses:
201:
description: "Returns a link to the created issue"
schema:
$ref: '#/definitions/JiraCreatedIssue'
400:
description: "Returned if the input is invalid (e.g. missing required fields, invalid field values, and so forth)."
/issue/{issueIdOrKey}/attachments:
post:
summary: "Add one or more attachments to an issue"
operationId: "addAttachment"
tags:
- jira
security:
- crowdAuth: []
consumes:
- "multipart/form-data"
produces:
- "application/json"
parameters:
- in: path
name: issueIdOrKey
type: string
required: true
- in: header
name: X-Atlassian-Token
type: string
required: false
default: "no-check"
- in: formData
name: file
type: file
required: true
description: "The attachment to upload"
responses:
200:
description: "Upload of attachments was successful"
403:
description: "Returned if attachments is disabled or if you don't have permission to add attachments to this issue."
404:
description: "Returned if the requested issue is not found, the user does not have permission to view it, or if the attachments exceeds the maximum configured attachment size."
securityDefinitions:
crowdAuth:
type: basic
definitions:
JiraUser:
type: "object"
properties:
self:
type: "string"
name:
type: "string"
displayName:
type: "string"
active:
type: "boolean"
JiraCreatedIssue:
type: "object"
properties:
id:
type: "string"
key:
type: "string"
self:
type: "string"
JiraIssueFieldsProject: # Needs to be completed
type: "object"
properties:
id:
type: "string"
JiraIssueFieldsIssuetype:
type: "object"
properties:
id:
type: "string"
JiraIssueFieldsAssignee:
type: "object"
properties:
name:
type: "string"
JiraIssueFieldsReporter:
type: "object"
properties:
name:
type: "string"
JiraIssueFieldsPriority:
type: "object"
properties:
id:
type: "string"
JiraIssueFields: # Needs to be completed
type: "object"
properties:
project:
$ref: '#/definitions/JiraIssueFieldsProject'
summary:
type: "string"
issuetype:
$ref: '#/defintions/JiraIssueFieldsIssuetype'
assignee:
$ref: '#/defintions/JiraIssueFieldsAssignee'
reporter:
$ref: '#/defintions/JiraIssueFieldsReporter'
priority:
$ref: '#/defintions/JiraIssueFieldsPriority'
labels:
type: "array"
items:
type: "string"
description:
type: "string"
JiraIssueCreationProperties:
type: "object"
properties:
fields:
$ref: '#/definitions/JiraIssueFields'
worklog:
type: "object" # Needs to be implemented