diff --git a/pkg/swagger/docs.go b/pkg/swagger/docs.go index 76bc66cc8..d81185fec 100644 --- a/pkg/swagger/docs.go +++ b/pkg/swagger/docs.go @@ -6118,6 +6118,41 @@ const docTemplate = `{ } } }, + "/test/all": { + "delete": { + "description": "Removes all data from every Vikunja table. Used by e2e tests to ensure clean state before each test. Requires the testing token.", + "produces": [ + "application/json" + ], + "tags": [ + "testing" + ], + "summary": "Truncate all tables", + "responses": { + "200": { + "description": "All tables truncated.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal server error.", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/test/{table}": { "patch": { "description": "Fills the specified table with the content provided in the payload. You need to enable the testing endpoint before doing this and provide the ` + "`" + `Authorization: \u003ctoken\u003e` + "`" + ` secret when making requests to this endpoint. See docs for more details.", diff --git a/pkg/swagger/swagger.json b/pkg/swagger/swagger.json index e3c17d1ac..2e470535d 100644 --- a/pkg/swagger/swagger.json +++ b/pkg/swagger/swagger.json @@ -6110,6 +6110,41 @@ } } }, + "/test/all": { + "delete": { + "description": "Removes all data from every Vikunja table. Used by e2e tests to ensure clean state before each test. Requires the testing token.", + "produces": [ + "application/json" + ], + "tags": [ + "testing" + ], + "summary": "Truncate all tables", + "responses": { + "200": { + "description": "All tables truncated.", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "403": { + "description": "Forbidden", + "schema": { + "$ref": "#/definitions/web.HTTPError" + } + }, + "500": { + "description": "Internal server error.", + "schema": { + "$ref": "#/definitions/models.Message" + } + } + } + } + }, "/test/{table}": { "patch": { "description": "Fills the specified table with the content provided in the payload. You need to enable the testing endpoint before doing this and provide the `Authorization: \u003ctoken\u003e` secret when making requests to this endpoint. See docs for more details.", diff --git a/pkg/swagger/swagger.yaml b/pkg/swagger/swagger.yaml index 7e4e1b129..85d087767 100644 --- a/pkg/swagger/swagger.yaml +++ b/pkg/swagger/swagger.yaml @@ -5805,6 +5805,30 @@ paths: summary: Reset the db to a defined state tags: - testing + /test/all: + delete: + description: Removes all data from every Vikunja table. Used by e2e tests to + ensure clean state before each test. Requires the testing token. + produces: + - application/json + responses: + "200": + description: All tables truncated. + schema: + additionalProperties: + type: string + type: object + "403": + description: Forbidden + schema: + $ref: '#/definitions/web.HTTPError' + "500": + description: Internal server error. + schema: + $ref: '#/definitions/models.Message' + summary: Truncate all tables + tags: + - testing /tokens: get: consumes: