-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
71 lines (71 loc) · 1.78 KB
/
openapi.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
openapi: 3.0.0
info:
title: TODO Checker
version: 0.0.1
paths:
/{package}:
get:
description: Return the list of comments in the specified Go package containing a specific pattern.
parameters:
- in: path
name: package
required: true
description: Name of the package to parse.
schema:
type: string
- in: query
name: pattern
required: false
description: Pattern to look for in the comments.
schema:
type: string
default: "TODO"
responses:
"200":
description: List of comments that were found in the package.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Comment"
example:
- filename: /usr/lib/go/src/fmt/scan.go
line: 732
text: "TODO: accept N and Ni independently?\n"
"400":
description: One of the parameter provided by the user is wrong.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: Internal server error.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
servers:
- url: /
components:
schemas:
Comment:
type: object
properties:
filename:
type: string
line:
type: integer
text:
type: string
required:
- filename
- line
- text
Error:
type: object
properties:
message:
type: string
required:
- reason