Skip to content

Commit 9b4f209

Browse files
Revert "quality(apidocs): document shortid lookup using drf spectacular (#94829)"
This reverts commit fc1e3ad. Co-authored-by: JoshFerge <1976777+JoshFerge@users.noreply.github.com>
1 parent fc1e3ad commit 9b4f209

File tree

4 files changed

+309
-121
lines changed

4 files changed

+309
-121
lines changed

api-docs/openapi.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
"/api/0/organizations/{organization_id_or_slug}/repos/{repo_id}/commits/": {
101101
"$ref": "paths/organizations/repo-commits.json"
102102
},
103+
"/api/0/organizations/{organization_id_or_slug}/shortids/{issue_id}/": {
104+
"$ref": "paths/organizations/shortid.json"
105+
},
103106
"/api/0/projects/": {
104107
"$ref": "paths/projects/index.json"
105108
},
Lines changed: 273 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
{
2+
"get": {
3+
"tags": ["Organizations"],
4+
"description": "This resolves a short ID or internal issue ID to the project slug and group details.",
5+
"operationId": "Resolve a Short ID",
6+
"parameters": [
7+
{
8+
"name": "organization_id_or_slug",
9+
"in": "path",
10+
"description": "The ID or slug of the organization the short ID should be looked up in.",
11+
"required": true,
12+
"schema": {
13+
"type": "string"
14+
}
15+
},
16+
{
17+
"name": "issue_id",
18+
"in": "path",
19+
"description": "The short ID or issue ID to look up.",
20+
"required": true,
21+
"schema": {
22+
"type": "string"
23+
}
24+
}
25+
],
26+
"responses": {
27+
"200": {
28+
"description": "Success",
29+
"content": {
30+
"application/json": {
31+
"schema": {
32+
"type": "object",
33+
"required": [
34+
"organizationSlug",
35+
"projectSlug",
36+
"shortId",
37+
"group",
38+
"groupId"
39+
],
40+
"properties": {
41+
"organizationSlug": {
42+
"type": "string"
43+
},
44+
"projectSlug": {
45+
"type": "string"
46+
},
47+
"shortId": {
48+
"type": "string"
49+
},
50+
"group": {
51+
"type": "object",
52+
"required": [
53+
"lastSeen",
54+
"numComments",
55+
"userCount",
56+
"culprit",
57+
"title",
58+
"id",
59+
"assignedTo",
60+
"logger",
61+
"type",
62+
"annotations",
63+
"metadata",
64+
"status",
65+
"subscriptionDetails",
66+
"isPublic",
67+
"hasSeen",
68+
"shortId",
69+
"shareId",
70+
"firstSeen",
71+
"count",
72+
"permalink",
73+
"level",
74+
"isSubscribed",
75+
"isBookmarked",
76+
"project",
77+
"statusDetails"
78+
],
79+
"properties": {
80+
"lastSeen": {
81+
"type": "string"
82+
},
83+
"numComments": {
84+
"type": "integer"
85+
},
86+
"userCount": {
87+
"type": "integer"
88+
},
89+
"culprit": {
90+
"type": "string",
91+
"nullable": true
92+
},
93+
"title": {
94+
"type": "string"
95+
},
96+
"id": {
97+
"type": "string"
98+
},
99+
"assignedTo": {
100+
"type": "object",
101+
"nullable": true,
102+
"properties": {
103+
"type": {
104+
"type": "string"
105+
},
106+
"id": {
107+
"type": "string"
108+
},
109+
"name": {
110+
"type": "string"
111+
}
112+
}
113+
},
114+
"logger": {
115+
"type": "string",
116+
"nullable": true
117+
},
118+
"type": {
119+
"type": "string"
120+
},
121+
"annotations": {
122+
"type": "array",
123+
"items": {
124+
"type": "string"
125+
}
126+
},
127+
"metadata": {
128+
"type": "object",
129+
"properties": {
130+
"function": {
131+
"type": "string"
132+
},
133+
"title": {
134+
"type": "string"
135+
},
136+
"type": {
137+
"type": "string"
138+
},
139+
"value": {
140+
"type": "string"
141+
},
142+
"filename": {
143+
"type": "string"
144+
}
145+
}
146+
},
147+
"status": {
148+
"type": "string",
149+
"enum": ["resolved", "unresolved", "ignored"]
150+
},
151+
"subscriptionDetails": {
152+
"type": "object",
153+
"nullable": true,
154+
"properties": {
155+
"reason": {
156+
"type": "string"
157+
}
158+
}
159+
},
160+
"isPublic": {
161+
"type": "boolean"
162+
},
163+
"hasSeen": {
164+
"type": "boolean"
165+
},
166+
"shortId": {
167+
"type": "string"
168+
},
169+
"shareId": {
170+
"type": "string",
171+
"nullable": true
172+
},
173+
"firstSeen": {
174+
"type": "string"
175+
},
176+
"count": {
177+
"type": "string"
178+
},
179+
"permalink": {
180+
"type": "string"
181+
},
182+
"level": {
183+
"type": "string"
184+
},
185+
"isSubscribed": {
186+
"type": "boolean"
187+
},
188+
"isBookmarked": {
189+
"type": "boolean"
190+
},
191+
"project": {
192+
"type": "object",
193+
"properties": {
194+
"slug": {
195+
"type": "string"
196+
},
197+
"id": {
198+
"type": "string"
199+
},
200+
"name": {
201+
"type": "string"
202+
}
203+
}
204+
},
205+
"statusDetails": {
206+
"type": "object"
207+
}
208+
}
209+
},
210+
"groupId": {
211+
"type": "string"
212+
}
213+
}
214+
},
215+
"example": {
216+
"group": {
217+
"annotations": [],
218+
"assignedTo": null,
219+
"count": "1",
220+
"culprit": "raven.scripts.runner in main",
221+
"firstSeen": "2018-11-06T21:19:55Z",
222+
"hasSeen": false,
223+
"id": "1",
224+
"isBookmarked": false,
225+
"isPublic": false,
226+
"isSubscribed": true,
227+
"lastSeen": "2018-11-06T21:19:55Z",
228+
"level": "error",
229+
"logger": null,
230+
"metadata": {
231+
"title": "This is an example Python exception"
232+
},
233+
"numComments": 0,
234+
"permalink": "https://sentry.io/the-interstellar-jurisdiction/pump-station/issues/1/",
235+
"project": {
236+
"id": "2",
237+
"name": "Pump Station",
238+
"slug": "pump-station"
239+
},
240+
"shareId": null,
241+
"shortId": "PUMP-STATION-1",
242+
"status": "unresolved",
243+
"statusDetails": {},
244+
"subscriptionDetails": null,
245+
"title": "This is an example Python exception",
246+
"type": "default",
247+
"userCount": 0
248+
},
249+
"groupId": "1",
250+
"organizationSlug": "the-interstellar-jurisdiction",
251+
"projectSlug": "pump-station",
252+
"shortId": "PUMP-STATION-1"
253+
}
254+
}
255+
}
256+
},
257+
"403": {
258+
"description": "Forbidden"
259+
},
260+
"401": {
261+
"description": "Unauthorized"
262+
},
263+
"404": {
264+
"description": "Not Found"
265+
}
266+
},
267+
"security": [
268+
{
269+
"auth_token": ["org: read"]
270+
}
271+
]
272+
}
273+
}

0 commit comments

Comments
 (0)