Skip to content

Commit

Permalink
feat: refactor API comparison structures
Browse files Browse the repository at this point in the history
- 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 <appleboy.tw@gmail.com>
  • Loading branch information
appleboy committed Apr 9, 2024
1 parent 536b530 commit 6a38ce9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
6 changes: 6 additions & 0 deletions routers/api/v1/swagger/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,3 +414,9 @@ type swaggerRepoNewIssuePinsAllowed struct {
// in:body
Body api.NewIssuePinsAllowed `json:"body"`
}

// swagger:response Compare
type swaggerCompare struct {
// in:body
Body api.Compare `json:"body"`
}
27 changes: 26 additions & 1 deletion templates/swagger/v1_json.tmpl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6a38ce9

Please sign in to comment.