Skip to content

Commit 6a38ce9

Browse files
committed
feat: refactor API comparison structures
- Add a new `swaggerCompare` struct for API response in `repo.go` - Update the `basePath` in `v1_json.tmpl` to include `AppSubUrl` - Define a new `Compare` object in Swagger JSON template with properties `commits` and `total_commits` - Add a reference to the `Compare` definition in Swagger JSON template Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 536b530 commit 6a38ce9

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

routers/api/v1/swagger/repo.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,3 +414,9 @@ type swaggerRepoNewIssuePinsAllowed struct {
414414
// in:body
415415
Body api.NewIssuePinsAllowed `json:"body"`
416416
}
417+
418+
// swagger:response Compare
419+
type swaggerCompare struct {
420+
// in:body
421+
Body api.Compare `json:"body"`
422+
}

templates/swagger/v1_json.tmpl

Lines changed: 26 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)