mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-22 01:34:18 +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 getWatchedRepos(userID int64, private bool) ([]*api.Repository, error) {
|
|||
|
||||
// GetWatchedRepos returns the repos that the user specified in ctx is watching
|
||||
func GetWatchedRepos(ctx *context.APIContext) {
|
||||
// swagger:route GET /users/{username}/subscriptions userListSubscriptions
|
||||
// swagger:route GET /users/{username}/subscriptions user userListSubscriptions
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
|
@ -53,7 +53,7 @@ func GetWatchedRepos(ctx *context.APIContext) {
|
|||
|
||||
// GetMyWatchedRepos returns the repos that the authenticated user is watching
|
||||
func GetMyWatchedRepos(ctx *context.APIContext) {
|
||||
// swagger:route GET /user/subscriptions userCurrentListSubscriptions
|
||||
// swagger:route GET /user/subscriptions user userCurrentListSubscriptions
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
|
@ -72,7 +72,7 @@ func GetMyWatchedRepos(ctx *context.APIContext) {
|
|||
// IsWatching returns whether the authenticated user is watching the repo
|
||||
// specified in ctx
|
||||
func IsWatching(ctx *context.APIContext) {
|
||||
// swagger:route GET /repos/{username}/{reponame}/subscription userCurrentCheckSubscription
|
||||
// swagger:route GET /repos/{username}/{reponame}/subscription repository userCurrentCheckSubscription
|
||||
//
|
||||
// Responses:
|
||||
// 200: WatchInfo
|
||||
|
@ -94,7 +94,7 @@ func IsWatching(ctx *context.APIContext) {
|
|||
|
||||
// Watch the repo specified in ctx, as the authenticated user
|
||||
func Watch(ctx *context.APIContext) {
|
||||
// swagger:route PUT /repos/{username}/{reponame}/subscription userCurrentPutSubscription
|
||||
// swagger:route PUT /repos/{username}/{reponame}/subscription repository userCurrentPutSubscription
|
||||
//
|
||||
// Responses:
|
||||
// 200: WatchInfo
|
||||
|
@ -118,7 +118,7 @@ func Watch(ctx *context.APIContext) {
|
|||
|
||||
// Unwatch the repo specified in ctx, as the authenticated user
|
||||
func Unwatch(ctx *context.APIContext) {
|
||||
// swagger:route DELETE /repos/{username}/{reponame}/subscription userCurrentDeleteSubscription
|
||||
// swagger:route DELETE /repos/{username}/{reponame}/subscription repository userCurrentDeleteSubscription
|
||||
//
|
||||
// Responses:
|
||||
// 204: empty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue