From aa21f44a3ef3710fb9d083b532e280de30b9b92a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 26 Sep 2022 14:18:31 +0100 Subject: [PATCH] Update delete endpoints to be called destroy --- packages/sdk/yarn.lock | 9 +-------- packages/server/specs/openapi.json | 8 ++++---- packages/server/specs/openapi.yaml | 8 ++++---- packages/server/src/api/routes/public/applications.ts | 2 +- packages/server/src/api/routes/public/rows.ts | 2 +- packages/server/src/api/routes/public/tables.ts | 2 +- packages/server/src/api/routes/public/users.ts | 2 +- packages/server/src/definitions/openapi.ts | 10 +++++----- 8 files changed, 18 insertions(+), 25 deletions(-) diff --git a/packages/sdk/yarn.lock b/packages/sdk/yarn.lock index 757430d6b7..4e8d6d718f 100644 --- a/packages/sdk/yarn.lock +++ b/packages/sdk/yarn.lock @@ -85,13 +85,6 @@ estree-walker "^2.0.1" magic-string "^0.25.7" -"@rollup/plugin-json@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@rollup/plugin-json/-/plugin-json-4.1.0.tgz#54e09867ae6963c593844d8bd7a9c718294496f3" - integrity sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw== - dependencies: - "@rollup/pluginutils" "^3.0.8" - "@rollup/plugin-node-resolve@^11.2.1": version "11.2.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz#82aa59397a29cd4e13248b106e6a4a1880362a60" @@ -104,7 +97,7 @@ is-module "^1.0.0" resolve "^1.19.0" -"@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0": +"@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" integrity sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg== diff --git a/packages/server/specs/openapi.json b/packages/server/specs/openapi.json index 09657d3f02..ce410823ec 100644 --- a/packages/server/specs/openapi.json +++ b/packages/server/specs/openapi.json @@ -1872,7 +1872,7 @@ } }, "delete": { - "operationId": "delete", + "operationId": "destroy", "summary": "Delete an application", "tags": [ "applications" @@ -2160,7 +2160,7 @@ } }, "delete": { - "operationId": "delete", + "operationId": "destroy", "summary": "Delete a row", "description": "Deletes a row within the specified table.", "tags": [ @@ -2371,7 +2371,7 @@ } }, "delete": { - "operationId": "delete", + "operationId": "destroy", "summary": "Delete a table", "description": "Delete a table, this could be internal or external.", "tags": [ @@ -2556,7 +2556,7 @@ } }, "delete": { - "operationId": "delete", + "operationId": "destroy", "summary": "Delete a user", "tags": [ "users" diff --git a/packages/server/specs/openapi.yaml b/packages/server/specs/openapi.yaml index 64a3df1f48..ed13ac01f4 100644 --- a/packages/server/specs/openapi.yaml +++ b/packages/server/specs/openapi.yaml @@ -1417,7 +1417,7 @@ paths: application: $ref: "#/components/examples/application" delete: - operationId: delete + operationId: destroy summary: Delete an application tags: - applications @@ -1592,7 +1592,7 @@ paths: row: $ref: "#/components/examples/row" delete: - operationId: delete + operationId: destroy summary: Delete a row description: Deletes a row within the specified table. tags: @@ -1717,7 +1717,7 @@ paths: table: $ref: "#/components/examples/table" delete: - operationId: delete + operationId: destroy summary: Delete a table description: Delete a table, this could be internal or external. tags: @@ -1827,7 +1827,7 @@ paths: user: $ref: "#/components/examples/user" delete: - operationId: delete + operationId: destroy summary: Delete a user tags: - users diff --git a/packages/server/src/api/routes/public/applications.ts b/packages/server/src/api/routes/public/applications.ts index b8dad05507..93d86d2aed 100644 --- a/packages/server/src/api/routes/public/applications.ts +++ b/packages/server/src/api/routes/public/applications.ts @@ -75,7 +75,7 @@ write.push( * @openapi * /applications/{appId}: * delete: - * operationId: delete + * operationId: destroy * summary: Delete an application * tags: * - applications diff --git a/packages/server/src/api/routes/public/rows.ts b/packages/server/src/api/routes/public/rows.ts index 16364a196d..9109ae76b8 100644 --- a/packages/server/src/api/routes/public/rows.ts +++ b/packages/server/src/api/routes/public/rows.ts @@ -81,7 +81,7 @@ write.push( * @openapi * /tables/{tableId}/rows/{rowId}: * delete: - * operationId: delete + * operationId: destroy * summary: Delete a row * description: Deletes a row within the specified table. * tags: diff --git a/packages/server/src/api/routes/public/tables.ts b/packages/server/src/api/routes/public/tables.ts index a40c8ab83c..74cd8ca3cf 100644 --- a/packages/server/src/api/routes/public/tables.ts +++ b/packages/server/src/api/routes/public/tables.ts @@ -83,7 +83,7 @@ write.push( * @openapi * /tables/{tableId}: * delete: - * operationId: delete + * operationId: destroy * summary: Delete a table * description: Delete a table, this could be internal or external. * tags: diff --git a/packages/server/src/api/routes/public/users.ts b/packages/server/src/api/routes/public/users.ts index ee23ff7f7f..67b73f6cbe 100644 --- a/packages/server/src/api/routes/public/users.ts +++ b/packages/server/src/api/routes/public/users.ts @@ -65,7 +65,7 @@ write.push(new Endpoint("put", "/users/:userId", controller.update)) * @openapi * /users/{userId}: * delete: - * operationId: delete + * operationId: destroy * summary: Delete a user * tags: * - users diff --git a/packages/server/src/definitions/openapi.ts b/packages/server/src/definitions/openapi.ts index 9644bebc19..bb0ffb6771 100644 --- a/packages/server/src/definitions/openapi.ts +++ b/packages/server/src/definitions/openapi.ts @@ -10,7 +10,7 @@ export interface paths { "/applications/{appId}": { get: operations["getById"]; put: operations["update"]; - delete: operations["delete"]; + delete: operations["destroy"]; }; "/applications/search": { /** Based on application properties (currently only name) search for applications. */ @@ -34,7 +34,7 @@ export interface paths { /** Updates a row within the specified table. */ put: operations["update"]; /** Deletes a row within the specified table. */ - delete: operations["delete"]; + delete: operations["destroy"]; }; "/tables/{tableId}/rows/search": { post: operations["search"]; @@ -49,7 +49,7 @@ export interface paths { /** Update a table, this could be internal or external. */ put: operations["update"]; /** Delete a table, this could be internal or external. */ - delete: operations["delete"]; + delete: operations["destroy"]; }; "/tables/search": { /** Based on table properties (currently only name) search for tables. This could be an internal or an external table. */ @@ -61,7 +61,7 @@ export interface paths { "/users/{userId}": { get: operations["getById"]; put: operations["update"]; - delete: operations["delete"]; + delete: operations["destroy"]; }; "/users/search": { /** Based on user properties (currently only name) search for users. */ @@ -756,7 +756,7 @@ export interface operations { }; }; }; - delete: { + destroy: { parameters: { path: { /** The ID of the user which this request is targeting. */