diff options
author | silverwind <me@silverwind.io> | 2022-07-12 01:07:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-11 18:07:16 -0500 |
commit | c8e0fd0bccb37898c1eb111256397c9c2e039598 (patch) | |
tree | 5b3063138a4727931a556f06a3ec6ebed94f089f /routers | |
parent | 8a7d1a3516c4479dae6824d5b0b041ed7dd5eb41 (diff) | |
download | gitea-c8e0fd0bccb37898c1eb111256397c9c2e039598.tar.gz gitea-c8e0fd0bccb37898c1eb111256397c9c2e039598.zip |
Add spectral linter for Swagger (#20321)
[spectral](https://github.com/stoplightio/spectral) lints
openapi/swagger files for mistakes of which it has identified a few and
which I've fixed.
I had to put it into `lint-frontend` because it depends on node_modules
so can not run on Drone during the backend target. I plan to refactor
these targets later to `lint-js` and `lint-go` so that they are
categorized based on the tool dependencies.
Diffstat (limited to 'routers')
-rw-r--r-- | routers/api/v1/org/hook.go | 2 | ||||
-rw-r--r-- | routers/api/v1/swagger/options.go | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/routers/api/v1/org/hook.go b/routers/api/v1/org/hook.go index ddf0ddefe6..2ddb2b2d2b 100644 --- a/routers/api/v1/org/hook.go +++ b/routers/api/v1/org/hook.go @@ -100,7 +100,7 @@ func GetHook(ctx *context.APIContext) { // CreateHook create a hook for an organization func CreateHook(ctx *context.APIContext) { - // swagger:operation POST /orgs/{org}/hooks/ organization orgCreateHook + // swagger:operation POST /orgs/{org}/hooks organization orgCreateHook // --- // summary: Create a hook // consumes: diff --git a/routers/api/v1/swagger/options.go b/routers/api/v1/swagger/options.go index 2bd43c6180..df3d011246 100644 --- a/routers/api/v1/swagger/options.go +++ b/routers/api/v1/swagger/options.go @@ -108,9 +108,6 @@ type swaggerParameterBodies struct { EditUserOption api.EditUserOption // in:body - MigrateRepoForm forms.MigrateRepoForm - - // in:body EditAttachmentOptions api.EditAttachmentOptions // in:body |