mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-21 01:10:19 +00:00
Improve swagger doc (#2274)
* Add swagger comment for adminCreateOrg * Add swagger comment for admin route * add hook swagger doc * Add tags * Add auth * Fix name of responses * Edit name method * Update vendor * make generate-swagger
This commit is contained in:
parent
951c909a67
commit
fd8e8a421a
32 changed files with 1911 additions and 110 deletions
|
@ -33,7 +33,7 @@ func getStarredRepos(userID int64, private bool) ([]*api.Repository, error) {
|
|||
// GetStarredRepos returns the repos that the user specified by the APIContext
|
||||
// has starred
|
||||
func GetStarredRepos(ctx *context.APIContext) {
|
||||
// swagger:route GET /users/{username}/starred userListStarred
|
||||
// swagger:route GET /users/{username}/starred user userListStarred
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
|
@ -53,7 +53,7 @@ func GetStarredRepos(ctx *context.APIContext) {
|
|||
|
||||
// GetMyStarredRepos returns the repos that the authenticated user has starred
|
||||
func GetMyStarredRepos(ctx *context.APIContext) {
|
||||
// swagger:route GET /user/starred userCurrentListStarred
|
||||
// swagger:route GET /user/starred user userCurrentListStarred
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
|
@ -71,7 +71,7 @@ func GetMyStarredRepos(ctx *context.APIContext) {
|
|||
|
||||
// IsStarring returns whether the authenticated is starring the repo
|
||||
func IsStarring(ctx *context.APIContext) {
|
||||
// swagger:route GET /user/starred/{username}/{reponame} userCurrentCheckStarring
|
||||
// swagger:route GET /user/starred/{username}/{reponame} user userCurrentCheckStarring
|
||||
//
|
||||
// Responses:
|
||||
// 204: empty
|
||||
|
@ -86,7 +86,7 @@ func IsStarring(ctx *context.APIContext) {
|
|||
|
||||
// Star the repo specified in the APIContext, as the authenticated user
|
||||
func Star(ctx *context.APIContext) {
|
||||
// swagger:route PUT /user/starred/{username}/{reponame} userCurrentPutStar
|
||||
// swagger:route PUT /user/starred/{username}/{reponame} user userCurrentPutStar
|
||||
//
|
||||
// Responses:
|
||||
// 204: empty
|
||||
|
@ -102,7 +102,7 @@ func Star(ctx *context.APIContext) {
|
|||
|
||||
// Unstar the repo specified in the APIContext, as the authenticated user
|
||||
func Unstar(ctx *context.APIContext) {
|
||||
// swagger:route DELETE /user/starred/{username}/{reponame} userCurrentDeleteStar
|
||||
// swagger:route DELETE /user/starred/{username}/{reponame} user userCurrentDeleteStar
|
||||
//
|
||||
// Responses:
|
||||
// 204: empty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue