-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
142 lines (142 loc) · 4.19 KB
/
swagger.json
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
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Repository API"
},
"tags": [{
"name": "Repository",
"description": "List user commits from repositories"
}],
"produces": [
"application/json"
],
"paths": {
"/{owner}/{repo}/commits": {
"get": {
"tags": [
"Repository"
],
"summary": "Get commits count by user",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/UserDateCommits"
}
},
"404": {
"description": "Repository not found"
},
"500": {
"description": "Internal server error"
}
},
"parameters": [{
"name": "owner",
"in": "path",
"description": "Repository owner",
"required": true,
"type": "string"
},
{
"name": "repo",
"in": "path",
"description": "Repository name",
"required": true,
"type": "string"
},
{
"name": "since",
"in": "query",
"description": "Since date (YYYY-MM-DD format)",
"required": false,
"type": "string"
},
{
"name": "until",
"in": "query",
"description": "Until date (YYYY-MM-DD format)",
"required": false,
"type": "string"
}
]
}
},
"/{owner}/{repo}/commits/details": {
"get": {
"tags": [
"Repository"
],
"summary": "Get commits messages from specific author and date",
"parameters": [{
"name": "owner",
"in": "path",
"description": "Owner of repository",
"required": true,
"type": "string"
},
{
"name": "repo",
"in": "path",
"description": "Name of repository",
"required": true,
"type": "string"
},
{
"name": "author",
"in": "query",
"description": "Author",
"required": true,
"type": "string"
},
{
"name": "date",
"in": "query",
"description": "Commits date (YYYY-MM-DD format)",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Commit"
}
},
"404": {
"description": "Repository not found"
},
"500": {
"description": "Internal server error"
}
}
}
}
},
"definitions": {
"UserDateCommits": {
"type": "object",
"properties": {
"user": {
"type": "string"
},
"commitsCount": {
"type": "string"
}
}
},
"Commit": {
"type": "objct",
"properties": {
"user": {
"type": "string"
},
"commitsCount": {
"type": "string"
}
}
}
}
}