Skip to content

Commit 174e1bc

Browse files
committed
feat: add test for api
1 parent d4d4b3c commit 174e1bc

19 files changed

+1587
-531
lines changed

api/jiaozifs.gen.go

Lines changed: 727 additions & 374 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/swagger.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,17 @@ components:
164164
type: string
165165
description:
166166
type: string
167+
status:
168+
type: integer
169+
format: int
167170
MergeMergeRequest:
168171
type: object
169172
required:
170173
- msg
171-
- conflict_resolve
172174
properties:
173175
msg:
174176
type: string
177+
allowEmptyValue: true
175178
conflict_resolve:
176179
description: use to record the resolution of the conflict, example({"b/a.txt":"base"})
177180
type: object
@@ -181,6 +184,7 @@ components:
181184
type: object
182185
required:
183186
- id
187+
- sequence
184188
- target_branch
185189
- source_branch
186190
- source_repo_id
@@ -192,6 +196,9 @@ components:
192196
- updated_at
193197
properties:
194198
id:
199+
type: string
200+
format: uuid
201+
sequence:
195202
type: integer
196203
format: uint64
197204
target_branch:
@@ -226,6 +233,7 @@ components:
226233
type: object
227234
required:
228235
- id
236+
- sequence
229237
- target_branch
230238
- source_branch
231239
- source_repo_id
@@ -238,6 +246,9 @@ components:
238246
- updated_at
239247
properties:
240248
id:
249+
type: string
250+
format: uuid
251+
sequence:
241252
type: integer
242253
format: uint64
243254
target_branch:
@@ -1633,7 +1644,7 @@ paths:
16331644
403:
16341645
description: Forbidden
16351646

1636-
/mergequest/{owner}/{repository}:
1647+
/mergerequest/{owner}/{repository}:
16371648
parameters:
16381649
- in: path
16391650
name: owner
@@ -1651,9 +1662,14 @@ paths:
16511662
operationId: listMergeRequests
16521663
summary: get list of merge request in repository
16531664
parameters:
1654-
- $ref: "#/components/parameters/PaginationPrefix"
16551665
- $ref: "#/components/parameters/PaginationRepoAfter"
16561666
- $ref: "#/components/parameters/PaginationAmount"
1667+
- in: query
1668+
name: state
1669+
required: false
1670+
schema:
1671+
type: integer
1672+
format: int
16571673
responses:
16581674
200:
16591675
description: merge request
@@ -1696,7 +1712,7 @@ paths:
16961712
500:
16971713
description: Internal Server Error
16981714

1699-
/mergequest/{owner}/{repository}/{mrId}/merge:
1715+
/mergerequest/{owner}/{repository}/{mrSeq}/merge:
17001716
parameters:
17011717
- in: path
17021718
name: owner
@@ -1709,7 +1725,7 @@ paths:
17091725
schema:
17101726
type: string
17111727
- in: path
1712-
name: mrId
1728+
name: mrSeq
17131729
required: true
17141730
schema:
17151731
type: integer
@@ -1742,7 +1758,7 @@ paths:
17421758
description: Too many requests
17431759
500:
17441760
description: Internal Server Error
1745-
/mergequest/{owner}/{repository}/{mrId}:
1761+
/mergequest/{owner}/{repository}/{mrSeq}:
17461762
parameters:
17471763
- in: path
17481764
name: owner
@@ -1755,7 +1771,7 @@ paths:
17551771
schema:
17561772
type: string
17571773
- in: path
1758-
name: mrId
1774+
name: mrSeq
17591775
required: true
17601776
schema:
17611777
type: integer
@@ -1780,22 +1796,6 @@ paths:
17801796
description: Too many requests
17811797
500:
17821798
description: Internal Server Error
1783-
delete:
1784-
tags:
1785-
- mergerequest
1786-
operationId: deleteMergeRequest
1787-
summary: delete merge request
1788-
responses:
1789-
204:
1790-
description: delete merge request successfully
1791-
401:
1792-
description: Unauthorized
1793-
404:
1794-
description: Resource Not Found
1795-
420:
1796-
description: Too many requests
1797-
500:
1798-
description: Internal Server Error
17991799
post:
18001800
tags:
18011801
- mergerequest

0 commit comments

Comments
 (0)