diff options
Diffstat (limited to '')
-rw-r--r-- | routers/api/v1/swagger/action.go | 34 | ||||
-rw-r--r-- | routers/api/v1/swagger/activity.go | 15 | ||||
-rw-r--r-- | routers/api/v1/swagger/activitypub.go | 15 | ||||
-rw-r--r-- | routers/api/v1/swagger/app.go | 22 | ||||
-rw-r--r-- | routers/api/v1/swagger/cron.go | 15 | ||||
-rw-r--r-- | routers/api/v1/swagger/issue.go | 127 | ||||
-rw-r--r-- | routers/api/v1/swagger/key.go | 50 | ||||
-rw-r--r-- | routers/api/v1/swagger/misc.go | 71 | ||||
-rw-r--r-- | routers/api/v1/swagger/nodeinfo.go | 15 | ||||
-rw-r--r-- | routers/api/v1/swagger/notify.go | 29 | ||||
-rw-r--r-- | routers/api/v1/swagger/options.go | 234 | ||||
-rw-r--r-- | routers/api/v1/swagger/org.go | 43 | ||||
-rw-r--r-- | routers/api/v1/swagger/package.go | 29 | ||||
-rw-r--r-- | routers/api/v1/swagger/quota.go | 64 | ||||
-rw-r--r-- | routers/api/v1/swagger/repo.go | 450 | ||||
-rw-r--r-- | routers/api/v1/swagger/settings.go | 34 | ||||
-rw-r--r-- | routers/api/v1/swagger/user.go | 50 |
17 files changed, 1297 insertions, 0 deletions
diff --git a/routers/api/v1/swagger/action.go b/routers/api/v1/swagger/action.go new file mode 100644 index 0000000..665f4d0 --- /dev/null +++ b/routers/api/v1/swagger/action.go @@ -0,0 +1,34 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import api "code.gitea.io/gitea/modules/structs" + +// SecretList +// swagger:response SecretList +type swaggerResponseSecretList struct { + // in:body + Body []api.Secret `json:"body"` +} + +// Secret +// swagger:response Secret +type swaggerResponseSecret struct { + // in:body + Body api.Secret `json:"body"` +} + +// ActionVariable +// swagger:response ActionVariable +type swaggerResponseActionVariable struct { + // in:body + Body api.ActionVariable `json:"body"` +} + +// VariableList +// swagger:response VariableList +type swaggerResponseVariableList struct { + // in:body + Body []api.ActionVariable `json:"body"` +} diff --git a/routers/api/v1/swagger/activity.go b/routers/api/v1/swagger/activity.go new file mode 100644 index 0000000..95e1ba9 --- /dev/null +++ b/routers/api/v1/swagger/activity.go @@ -0,0 +1,15 @@ +// Copyright 2023 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// ActivityFeedsList +// swagger:response ActivityFeedsList +type swaggerActivityFeedsList struct { + // in:body + Body []api.Activity `json:"body"` +} diff --git a/routers/api/v1/swagger/activitypub.go b/routers/api/v1/swagger/activitypub.go new file mode 100644 index 0000000..9134166 --- /dev/null +++ b/routers/api/v1/swagger/activitypub.go @@ -0,0 +1,15 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// ActivityPub +// swagger:response ActivityPub +type swaggerResponseActivityPub struct { + // in:body + Body api.ActivityPub `json:"body"` +} diff --git a/routers/api/v1/swagger/app.go b/routers/api/v1/swagger/app.go new file mode 100644 index 0000000..6a08b11 --- /dev/null +++ b/routers/api/v1/swagger/app.go @@ -0,0 +1,22 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// OAuth2Application +// swagger:response OAuth2Application +type swaggerResponseOAuth2Application struct { + // in:body + Body api.OAuth2Application `json:"body"` +} + +// AccessToken represents an API access token. +// swagger:response AccessToken +type swaggerResponseAccessToken struct { + // in:body + Body api.AccessToken `json:"body"` +} diff --git a/routers/api/v1/swagger/cron.go b/routers/api/v1/swagger/cron.go new file mode 100644 index 0000000..00cfbe0 --- /dev/null +++ b/routers/api/v1/swagger/cron.go @@ -0,0 +1,15 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// CronList +// swagger:response CronList +type swaggerResponseCronList struct { + // in:body + Body []api.Cron `json:"body"` +} diff --git a/routers/api/v1/swagger/issue.go b/routers/api/v1/swagger/issue.go new file mode 100644 index 0000000..62458a3 --- /dev/null +++ b/routers/api/v1/swagger/issue.go @@ -0,0 +1,127 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// Issue +// swagger:response Issue +type swaggerResponseIssue struct { + // in:body + Body api.Issue `json:"body"` +} + +// IssueList +// swagger:response IssueList +type swaggerResponseIssueList struct { + // in:body + Body []api.Issue `json:"body"` +} + +// Comment +// swagger:response Comment +type swaggerResponseComment struct { + // in:body + Body api.Comment `json:"body"` +} + +// CommentList +// swagger:response CommentList +type swaggerResponseCommentList struct { + // in:body + Body []api.Comment `json:"body"` +} + +// TimelineList +// swagger:response TimelineList +type swaggerResponseTimelineList struct { + // in:body + Body []api.TimelineComment `json:"body"` +} + +// Label +// swagger:response Label +type swaggerResponseLabel struct { + // in:body + Body api.Label `json:"body"` +} + +// LabelList +// swagger:response LabelList +type swaggerResponseLabelList struct { + // in:body + Body []api.Label `json:"body"` +} + +// Milestone +// swagger:response Milestone +type swaggerResponseMilestone struct { + // in:body + Body api.Milestone `json:"body"` +} + +// MilestoneList +// swagger:response MilestoneList +type swaggerResponseMilestoneList struct { + // in:body + Body []api.Milestone `json:"body"` +} + +// TrackedTime +// swagger:response TrackedTime +type swaggerResponseTrackedTime struct { + // in:body + Body api.TrackedTime `json:"body"` +} + +// TrackedTimeList +// swagger:response TrackedTimeList +type swaggerResponseTrackedTimeList struct { + // in:body + Body []api.TrackedTime `json:"body"` +} + +// IssueDeadline +// swagger:response IssueDeadline +type swaggerIssueDeadline struct { + // in:body + Body api.IssueDeadline `json:"body"` +} + +// IssueTemplates +// swagger:response IssueTemplates +type swaggerIssueTemplates struct { + // in:body + Body []api.IssueTemplate `json:"body"` +} + +// StopWatch +// swagger:response StopWatch +type swaggerResponseStopWatch struct { + // in:body + Body api.StopWatch `json:"body"` +} + +// StopWatchList +// swagger:response StopWatchList +type swaggerResponseStopWatchList struct { + // in:body + Body []api.StopWatch `json:"body"` +} + +// Reaction +// swagger:response Reaction +type swaggerReaction struct { + // in:body + Body api.Reaction `json:"body"` +} + +// ReactionList +// swagger:response ReactionList +type swaggerReactionList struct { + // in:body + Body []api.Reaction `json:"body"` +} diff --git a/routers/api/v1/swagger/key.go b/routers/api/v1/swagger/key.go new file mode 100644 index 0000000..8390833 --- /dev/null +++ b/routers/api/v1/swagger/key.go @@ -0,0 +1,50 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// PublicKey +// swagger:response PublicKey +type swaggerResponsePublicKey struct { + // in:body + Body api.PublicKey `json:"body"` +} + +// PublicKeyList +// swagger:response PublicKeyList +type swaggerResponsePublicKeyList struct { + // in:body + Body []api.PublicKey `json:"body"` +} + +// GPGKey +// swagger:response GPGKey +type swaggerResponseGPGKey struct { + // in:body + Body api.GPGKey `json:"body"` +} + +// GPGKeyList +// swagger:response GPGKeyList +type swaggerResponseGPGKeyList struct { + // in:body + Body []api.GPGKey `json:"body"` +} + +// DeployKey +// swagger:response DeployKey +type swaggerResponseDeployKey struct { + // in:body + Body api.DeployKey `json:"body"` +} + +// DeployKeyList +// swagger:response DeployKeyList +type swaggerResponseDeployKeyList struct { + // in:body + Body []api.DeployKey `json:"body"` +} diff --git a/routers/api/v1/swagger/misc.go b/routers/api/v1/swagger/misc.go new file mode 100644 index 0000000..0553eac --- /dev/null +++ b/routers/api/v1/swagger/misc.go @@ -0,0 +1,71 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// ServerVersion +// swagger:response ServerVersion +type swaggerResponseServerVersion struct { + // in:body + Body api.ServerVersion `json:"body"` +} + +// GitignoreTemplateList +// swagger:response GitignoreTemplateList +type swaggerResponseGitignoreTemplateList struct { + // in:body + Body []string `json:"body"` +} + +// GitignoreTemplateInfo +// swagger:response GitignoreTemplateInfo +type swaggerResponseGitignoreTemplateInfo struct { + // in:body + Body api.GitignoreTemplateInfo `json:"body"` +} + +// LicenseTemplateList +// swagger:response LicenseTemplateList +type swaggerResponseLicensesTemplateList struct { + // in:body + Body []api.LicensesTemplateListEntry `json:"body"` +} + +// LicenseTemplateInfo +// swagger:response LicenseTemplateInfo +type swaggerResponseLicenseTemplateInfo struct { + // in:body + Body api.LicenseTemplateInfo `json:"body"` +} + +// StringSlice +// swagger:response StringSlice +type swaggerResponseStringSlice struct { + // in:body + Body []string `json:"body"` +} + +// LabelTemplateList +// swagger:response LabelTemplateList +type swaggerResponseLabelTemplateList struct { + // in:body + Body []string `json:"body"` +} + +// LabelTemplateInfo +// swagger:response LabelTemplateInfo +type swaggerResponseLabelTemplateInfo struct { + // in:body + Body []api.LabelTemplate `json:"body"` +} + +// Boolean +// swagger:response boolean +type swaggerResponseBoolean struct { + // in:body + Body bool `json:"body"` +} diff --git a/routers/api/v1/swagger/nodeinfo.go b/routers/api/v1/swagger/nodeinfo.go new file mode 100644 index 0000000..8650dfa --- /dev/null +++ b/routers/api/v1/swagger/nodeinfo.go @@ -0,0 +1,15 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// NodeInfo +// swagger:response NodeInfo +type swaggerResponseNodeInfo struct { + // in:body + Body api.NodeInfo `json:"body"` +} diff --git a/routers/api/v1/swagger/notify.go b/routers/api/v1/swagger/notify.go new file mode 100644 index 0000000..743d807 --- /dev/null +++ b/routers/api/v1/swagger/notify.go @@ -0,0 +1,29 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// NotificationThread +// swagger:response NotificationThread +type swaggerNotificationThread struct { + // in:body + Body api.NotificationThread `json:"body"` +} + +// NotificationThreadList +// swagger:response NotificationThreadList +type swaggerNotificationThreadList struct { + // in:body + Body []api.NotificationThread `json:"body"` +} + +// Number of unread notifications +// swagger:response NotificationCount +type swaggerNotificationCount struct { + // in:body + Body api.NotificationCount `json:"body"` +} diff --git a/routers/api/v1/swagger/options.go b/routers/api/v1/swagger/options.go new file mode 100644 index 0000000..3034b09 --- /dev/null +++ b/routers/api/v1/swagger/options.go @@ -0,0 +1,234 @@ +// Copyright 2024 The Forgejo Authors. All rights reserved. +// Copyright 2017 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + ffed "code.gitea.io/gitea/modules/forgefed" + api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/services/forms" +) + +// not actually a response, just a hack to get go-swagger to include definitions +// of the various XYZOption structs + +// parameterBodies +// swagger:response parameterBodies +type swaggerParameterBodies struct { + // in:body + ForgeLike ffed.ForgeLike + + // in:body + AddCollaboratorOption api.AddCollaboratorOption + + // in:body + ReplaceFlagsOption api.ReplaceFlagsOption + + // in:body + CreateEmailOption api.CreateEmailOption + // in:body + DeleteEmailOption api.DeleteEmailOption + + // in:body + CreateHookOption api.CreateHookOption + // in:body + EditHookOption api.EditHookOption + + // in:body + EditGitHookOption api.EditGitHookOption + + // in:body + CreateIssueOption api.CreateIssueOption + // in:body + EditIssueOption api.EditIssueOption + // in:body + EditDeadlineOption api.EditDeadlineOption + + // in:body + CreateIssueCommentOption api.CreateIssueCommentOption + // in:body + EditIssueCommentOption api.EditIssueCommentOption + // in:body + IssueMeta api.IssueMeta + + // in:body + IssueLabelsOption api.IssueLabelsOption + + // in:body + DeleteLabelsOption api.DeleteLabelsOption + + // in:body + CreateKeyOption api.CreateKeyOption + + // in:body + RenameUserOption api.RenameUserOption + + // in:body + CreateLabelOption api.CreateLabelOption + // in:body + EditLabelOption api.EditLabelOption + + // in:body + MarkupOption api.MarkupOption + // in:body + MarkdownOption api.MarkdownOption + + // in:body + CreateMilestoneOption api.CreateMilestoneOption + // in:body + EditMilestoneOption api.EditMilestoneOption + + // in:body + CreateOrgOption api.CreateOrgOption + // in:body + EditOrgOption api.EditOrgOption + + // in:body + CreatePullRequestOption api.CreatePullRequestOption + // in:body + EditPullRequestOption api.EditPullRequestOption + // in:body + MergePullRequestOption forms.MergePullRequestForm + + // in:body + CreateReleaseOption api.CreateReleaseOption + // in:body + EditReleaseOption api.EditReleaseOption + + // in:body + CreateRepoOption api.CreateRepoOption + // in:body + EditRepoOption api.EditRepoOption + // in:body + TransferRepoOption api.TransferRepoOption + // in:body + CreateForkOption api.CreateForkOption + // in:body + GenerateRepoOption api.GenerateRepoOption + + // in:body + CreateStatusOption api.CreateStatusOption + + // in:body + CreateTeamOption api.CreateTeamOption + // in:body + EditTeamOption api.EditTeamOption + + // in:body + AddTimeOption api.AddTimeOption + + // in:body + CreateUserOption api.CreateUserOption + + // in:body + EditUserOption api.EditUserOption + + // in:body + EditAttachmentOptions api.EditAttachmentOptions + + // in:body + ChangeFilesOptions api.ChangeFilesOptions + + // in:body + CreateFileOptions api.CreateFileOptions + + // in:body + UpdateFileOptions api.UpdateFileOptions + + // in:body + DeleteFileOptions api.DeleteFileOptions + + // in:body + CommitDateOptions api.CommitDateOptions + + // in:body + RepoTopicOptions api.RepoTopicOptions + + // in:body + EditReactionOption api.EditReactionOption + + // in:body + CreateBranchRepoOption api.CreateBranchRepoOption + + // in:body + CreateBranchProtectionOption api.CreateBranchProtectionOption + + // in:body + EditBranchProtectionOption api.EditBranchProtectionOption + + // in:body + CreateOAuth2ApplicationOptions api.CreateOAuth2ApplicationOptions + + // in:body + CreatePullReviewOptions api.CreatePullReviewOptions + + // in:body + CreatePullReviewComment api.CreatePullReviewComment + + // in:body + CreatePullReviewCommentOptions api.CreatePullReviewCommentOptions + + // in:body + SubmitPullReviewOptions api.SubmitPullReviewOptions + + // in:body + DismissPullReviewOptions api.DismissPullReviewOptions + + // in:body + MigrateRepoOptions api.MigrateRepoOptions + + // in:body + PullReviewRequestOptions api.PullReviewRequestOptions + + // in:body + CreateTagOption api.CreateTagOption + + // in:body + CreateTagProtectionOption api.CreateTagProtectionOption + + // in:body + EditTagProtectionOption api.EditTagProtectionOption + + // in:body + CreateAccessTokenOption api.CreateAccessTokenOption + + // in:body + UserSettingsOptions api.UserSettingsOptions + + // in:body + CreateWikiPageOptions api.CreateWikiPageOptions + + // in:body + CreatePushMirrorOption api.CreatePushMirrorOption + + // in:body + UpdateUserAvatarOptions api.UpdateUserAvatarOption + + // in:body + UpdateRepoAvatarOptions api.UpdateRepoAvatarOption + + // in:body + CreateOrUpdateSecretOption api.CreateOrUpdateSecretOption + + // in:body + CreateVariableOption api.CreateVariableOption + + // in:body + UpdateVariableOption api.UpdateVariableOption + + // in:body + DispatchWorkflowOption api.DispatchWorkflowOption + + // in:body + CreateQuotaGroupOptions api.CreateQuotaGroupOptions + + // in:body + CreateQuotaRuleOptions api.CreateQuotaRuleOptions + + // in:body + EditQuotaRuleOptions api.EditQuotaRuleOptions + + // in:body + SetUserQuotaGroupsOptions api.SetUserQuotaGroupsOptions +} diff --git a/routers/api/v1/swagger/org.go b/routers/api/v1/swagger/org.go new file mode 100644 index 0000000..0105446 --- /dev/null +++ b/routers/api/v1/swagger/org.go @@ -0,0 +1,43 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// Organization +// swagger:response Organization +type swaggerResponseOrganization struct { + // in:body + Body api.Organization `json:"body"` +} + +// OrganizationList +// swagger:response OrganizationList +type swaggerResponseOrganizationList struct { + // in:body + Body []api.Organization `json:"body"` +} + +// Team +// swagger:response Team +type swaggerResponseTeam struct { + // in:body + Body api.Team `json:"body"` +} + +// TeamList +// swagger:response TeamList +type swaggerResponseTeamList struct { + // in:body + Body []api.Team `json:"body"` +} + +// OrganizationPermissions +// swagger:response OrganizationPermissions +type swaggerResponseOrganizationPermissions struct { + // in:body + Body api.OrganizationPermissions `json:"body"` +} diff --git a/routers/api/v1/swagger/package.go b/routers/api/v1/swagger/package.go new file mode 100644 index 0000000..eada12d --- /dev/null +++ b/routers/api/v1/swagger/package.go @@ -0,0 +1,29 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// Package +// swagger:response Package +type swaggerResponsePackage struct { + // in:body + Body api.Package `json:"body"` +} + +// PackageList +// swagger:response PackageList +type swaggerResponsePackageList struct { + // in:body + Body []api.Package `json:"body"` +} + +// PackageFileList +// swagger:response PackageFileList +type swaggerResponsePackageFileList struct { + // in:body + Body []api.PackageFile `json:"body"` +} diff --git a/routers/api/v1/swagger/quota.go b/routers/api/v1/swagger/quota.go new file mode 100644 index 0000000..35e633c --- /dev/null +++ b/routers/api/v1/swagger/quota.go @@ -0,0 +1,64 @@ +// Copyright 2024 The Forgejo Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// QuotaInfo +// swagger:response QuotaInfo +type swaggerResponseQuotaInfo struct { + // in:body + Body api.QuotaInfo `json:"body"` +} + +// QuotaRuleInfoList +// swagger:response QuotaRuleInfoList +type swaggerResponseQuotaRuleInfoList struct { + // in:body + Body []api.QuotaRuleInfo `json:"body"` +} + +// QuotaRuleInfo +// swagger:response QuotaRuleInfo +type swaggerResponseQuotaRuleInfo struct { + // in:body + Body api.QuotaRuleInfo `json:"body"` +} + +// QuotaUsedAttachmentList +// swagger:response QuotaUsedAttachmentList +type swaggerQuotaUsedAttachmentList struct { + // in:body + Body api.QuotaUsedAttachmentList `json:"body"` +} + +// QuotaUsedPackageList +// swagger:response QuotaUsedPackageList +type swaggerQuotaUsedPackageList struct { + // in:body + Body api.QuotaUsedPackageList `json:"body"` +} + +// QuotaUsedArtifactList +// swagger:response QuotaUsedArtifactList +type swaggerQuotaUsedArtifactList struct { + // in:body + Body api.QuotaUsedArtifactList `json:"body"` +} + +// QuotaGroup +// swagger:response QuotaGroup +type swaggerResponseQuotaGroup struct { + // in:body + Body api.QuotaGroup `json:"body"` +} + +// QuotaGroupList +// swagger:response QuotaGroupList +type swaggerResponseQuotaGroupList struct { + // in:body + Body api.QuotaGroupList `json:"body"` +} diff --git a/routers/api/v1/swagger/repo.go b/routers/api/v1/swagger/repo.go new file mode 100644 index 0000000..ca214b4 --- /dev/null +++ b/routers/api/v1/swagger/repo.go @@ -0,0 +1,450 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + api "code.gitea.io/gitea/modules/structs" +) + +// Repository +// swagger:response Repository +type swaggerResponseRepository struct { + // in:body + Body api.Repository `json:"body"` +} + +// RepositoryList +// swagger:response RepositoryList +type swaggerResponseRepositoryList struct { + // in:body + Body []api.Repository `json:"body"` +} + +// Branch +// swagger:response Branch +type swaggerResponseBranch struct { + // in:body + Body api.Branch `json:"body"` +} + +// BranchList +// swagger:response BranchList +type swaggerResponseBranchList struct { + // in:body + Body []api.Branch `json:"body"` +} + +// BranchProtection +// swagger:response BranchProtection +type swaggerResponseBranchProtection struct { + // in:body + Body api.BranchProtection `json:"body"` +} + +// BranchProtectionList +// swagger:response BranchProtectionList +type swaggerResponseBranchProtectionList struct { + // in:body + Body []api.BranchProtection `json:"body"` +} + +// TagList +// swagger:response TagList +type swaggerResponseTagList struct { + // in:body + Body []api.Tag `json:"body"` +} + +// Tag +// swagger:response Tag +type swaggerResponseTag struct { + // in:body + Body api.Tag `json:"body"` +} + +// AnnotatedTag +// swagger:response AnnotatedTag +type swaggerResponseAnnotatedTag struct { + // in:body + Body api.AnnotatedTag `json:"body"` +} + +// TagProtectionList +// swagger:response TagProtectionList +type swaggerResponseTagProtectionList struct { + // in:body + Body []api.TagProtection `json:"body"` +} + +// TagProtection +// swagger:response TagProtection +type swaggerResponseTagProtection struct { + // in:body + Body api.TagProtection `json:"body"` +} + +// Reference +// swagger:response Reference +type swaggerResponseReference struct { + // in:body + Body api.Reference `json:"body"` +} + +// ReferenceList +// swagger:response ReferenceList +type swaggerResponseReferenceList struct { + // in:body + Body []api.Reference `json:"body"` +} + +// Hook +// swagger:response Hook +type swaggerResponseHook struct { + // in:body + Body api.Hook `json:"body"` +} + +// HookList +// swagger:response HookList +type swaggerResponseHookList struct { + // in:body + Body []api.Hook `json:"body"` +} + +// GitHook +// swagger:response GitHook +type swaggerResponseGitHook struct { + // in:body + Body api.GitHook `json:"body"` +} + +// GitHookList +// swagger:response GitHookList +type swaggerResponseGitHookList struct { + // in:body + Body []api.GitHook `json:"body"` +} + +// Release +// swagger:response Release +type swaggerResponseRelease struct { + // in:body + Body api.Release `json:"body"` +} + +// ReleaseList +// swagger:response ReleaseList +type swaggerResponseReleaseList struct { + // in:body + Body []api.Release `json:"body"` +} + +// PullRequest +// swagger:response PullRequest +type swaggerResponsePullRequest struct { + // in:body + Body api.PullRequest `json:"body"` +} + +// PullRequestList +// swagger:response PullRequestList +type swaggerResponsePullRequestList struct { + // in:body + Body []api.PullRequest `json:"body"` +} + +// PullReview +// swagger:response PullReview +type swaggerResponsePullReview struct { + // in:body + Body api.PullReview `json:"body"` +} + +// PullReviewList +// swagger:response PullReviewList +type swaggerResponsePullReviewList struct { + // in:body + Body []api.PullReview `json:"body"` +} + +// PullComment +// swagger:response PullReviewComment +type swaggerPullReviewComment struct { + // in:body + Body api.PullReviewComment `json:"body"` +} + +// PullCommentList +// swagger:response PullReviewCommentList +type swaggerResponsePullReviewCommentList struct { + // in:body + Body []api.PullReviewComment `json:"body"` +} + +// CommitStatus +// swagger:response CommitStatus +type swaggerResponseStatus struct { + // in:body + Body api.CommitStatus `json:"body"` +} + +// CommitStatusList +// swagger:response CommitStatusList +type swaggerResponseCommitStatusList struct { + // in:body + Body []api.CommitStatus `json:"body"` +} + +// WatchInfo +// swagger:response WatchInfo +type swaggerResponseWatchInfo struct { + // in:body + Body api.WatchInfo `json:"body"` +} + +// SearchResults +// swagger:response SearchResults +type swaggerResponseSearchResults struct { + // in:body + Body api.SearchResults `json:"body"` +} + +// AttachmentList +// swagger:response AttachmentList +type swaggerResponseAttachmentList struct { + // in: body + Body []api.Attachment `json:"body"` +} + +// Attachment +// swagger:response Attachment +type swaggerResponseAttachment struct { + // in: body + Body api.Attachment `json:"body"` +} + +// GitTreeResponse +// swagger:response GitTreeResponse +type swaggerGitTreeResponse struct { + // in: body + Body api.GitTreeResponse `json:"body"` +} + +// GitBlobResponse +// swagger:response GitBlobResponse +type swaggerGitBlobResponse struct { + // in: body + Body api.GitBlobResponse `json:"body"` +} + +// Commit +// swagger:response Commit +type swaggerCommit struct { + // in: body + Body api.Commit `json:"body"` +} + +// CommitList +// swagger:response CommitList +type swaggerCommitList struct { + // The current page + Page int `json:"X-Page"` + + // Commits per page + PerPage int `json:"X-PerPage"` + + // Total commit count + Total int `json:"X-Total"` + + // Total number of pages + PageCount int `json:"X-PageCount"` + + // True if there is another page + HasMore bool `json:"X-HasMore"` + + // in: body + Body []api.Commit `json:"body"` +} + +// ChangedFileList +// swagger:response ChangedFileList +type swaggerChangedFileList struct { + // The current page + Page int `json:"X-Page"` + + // Commits per page + PerPage int `json:"X-PerPage"` + + // Total commit count + Total int `json:"X-Total-Count"` + + // Total number of pages + PageCount int `json:"X-PageCount"` + + // True if there is another page + HasMore bool `json:"X-HasMore"` + + // in: body + Body []api.ChangedFile `json:"body"` +} + +// Note +// swagger:response Note +type swaggerNote struct { + // in: body + Body api.Note `json:"body"` +} + +// EmptyRepository +// swagger:response EmptyRepository +type swaggerEmptyRepository struct { + // in: body + Body api.APIError `json:"body"` +} + +// FileResponse +// swagger:response FileResponse +type swaggerFileResponse struct { + // in: body + Body api.FileResponse `json:"body"` +} + +// FilesResponse +// swagger:response FilesResponse +type swaggerFilesResponse struct { + // in: body + Body api.FilesResponse `json:"body"` +} + +// ContentsResponse +// swagger:response ContentsResponse +type swaggerContentsResponse struct { + // in: body + Body api.ContentsResponse `json:"body"` +} + +// ContentsListResponse +// swagger:response ContentsListResponse +type swaggerContentsListResponse struct { + // in:body + Body []api.ContentsResponse `json:"body"` +} + +// FileDeleteResponse +// swagger:response FileDeleteResponse +type swaggerFileDeleteResponse struct { + // in: body + Body api.FileDeleteResponse `json:"body"` +} + +// TopicListResponse +// swagger:response TopicListResponse +type swaggerTopicListResponse struct { + // in: body + Body []api.TopicResponse `json:"body"` +} + +// TopicNames +// swagger:response TopicNames +type swaggerTopicNames struct { + // in: body + Body api.TopicName `json:"body"` +} + +// LanguageStatistics +// swagger:response LanguageStatistics +type swaggerLanguageStatistics struct { + // in: body + Body map[string]int64 `json:"body"` +} + +// CombinedStatus +// swagger:response CombinedStatus +type swaggerCombinedStatus struct { + // in: body + Body api.CombinedStatus `json:"body"` +} + +// WikiPageList +// swagger:response WikiPageList +type swaggerWikiPageList struct { + // in:body + Body []api.WikiPageMetaData `json:"body"` +} + +// WikiPage +// swagger:response WikiPage +type swaggerWikiPage struct { + // in:body + Body api.WikiPage `json:"body"` +} + +// WikiCommitList +// swagger:response WikiCommitList +type swaggerWikiCommitList struct { + // in:body + Body api.WikiCommitList `json:"body"` +} + +// PushMirror +// swagger:response PushMirror +type swaggerPushMirror struct { + // in:body + Body api.PushMirror `json:"body"` +} + +// PushMirrorList +// swagger:response PushMirrorList +type swaggerPushMirrorList struct { + // in:body + Body []api.PushMirror `json:"body"` +} + +// RepoCollaboratorPermission +// swagger:response RepoCollaboratorPermission +type swaggerRepoCollaboratorPermission struct { + // in:body + Body api.RepoCollaboratorPermission `json:"body"` +} + +// RepoIssueConfig +// swagger:response RepoIssueConfig +type swaggerRepoIssueConfig struct { + // in:body + Body api.IssueConfig `json:"body"` +} + +// RepoIssueConfigValidation +// swagger:response RepoIssueConfigValidation +type swaggerRepoIssueConfigValidation struct { + // in:body + Body api.IssueConfigValidation `json:"body"` +} + +// RepoNewIssuePinsAllowed +// swagger:response RepoNewIssuePinsAllowed +type swaggerRepoNewIssuePinsAllowed struct { + // in:body + Body api.NewIssuePinsAllowed `json:"body"` +} + +// BlockedUserList +// swagger:response BlockedUserList +type swaggerBlockedUserList struct { + // in:body + Body []api.BlockedUser `json:"body"` +} + +// TasksList +// swagger:response TasksList +type swaggerRepoTasksList struct { + // in:body + Body api.ActionTaskResponse `json:"body"` +} + +// swagger:response Compare +type swaggerCompare struct { + // in:body + Body api.Compare `json:"body"` +} diff --git a/routers/api/v1/swagger/settings.go b/routers/api/v1/swagger/settings.go new file mode 100644 index 0000000..a946669 --- /dev/null +++ b/routers/api/v1/swagger/settings.go @@ -0,0 +1,34 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import api "code.gitea.io/gitea/modules/structs" + +// GeneralRepoSettings +// swagger:response GeneralRepoSettings +type swaggerResponseGeneralRepoSettings struct { + // in:body + Body api.GeneralRepoSettings `json:"body"` +} + +// GeneralUISettings +// swagger:response GeneralUISettings +type swaggerResponseGeneralUISettings struct { + // in:body + Body api.GeneralUISettings `json:"body"` +} + +// GeneralAPISettings +// swagger:response GeneralAPISettings +type swaggerResponseGeneralAPISettings struct { + // in:body + Body api.GeneralAPISettings `json:"body"` +} + +// GeneralAttachmentSettings +// swagger:response GeneralAttachmentSettings +type swaggerResponseGeneralAttachmentSettings struct { + // in:body + Body api.GeneralAttachmentSettings `json:"body"` +} diff --git a/routers/api/v1/swagger/user.go b/routers/api/v1/swagger/user.go new file mode 100644 index 0000000..37e2866 --- /dev/null +++ b/routers/api/v1/swagger/user.go @@ -0,0 +1,50 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// SPDX-License-Identifier: MIT + +package swagger + +import ( + activities_model "code.gitea.io/gitea/models/activities" + api "code.gitea.io/gitea/modules/structs" +) + +// User +// swagger:response User +type swaggerResponseUser struct { + // in:body + Body api.User `json:"body"` +} + +// UserList +// swagger:response UserList +type swaggerResponseUserList struct { + // in:body + Body []api.User `json:"body"` +} + +// EmailList +// swagger:response EmailList +type swaggerResponseEmailList struct { + // in:body + Body []api.Email `json:"body"` +} + +// swagger:model EditUserOption +type swaggerModelEditUserOption struct { + // in:body + Options api.EditUserOption +} + +// UserHeatmapData +// swagger:response UserHeatmapData +type swaggerResponseUserHeatmapData struct { + // in:body + Body []activities_model.UserHeatmapData `json:"body"` +} + +// UserSettings +// swagger:response UserSettings +type swaggerResponseUserSettings struct { + // in:body + Body api.UserSettings `json:"body"` +} |