@budibase/server 1.0.19-alpha.1 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/__mocks__/node-fetch.ts +0 -3
  2. package/builder/assets/{index.2fc6da87.css → index.4fb3f887.css} +1 -1
  3. package/builder/assets/index.91de2761.js +1316 -0
  4. package/builder/assets/{vendor.a9288856.js → vendor.470042a4.js} +1 -1
  5. package/builder/index.html +3 -3
  6. package/coverage/clover.xml +372 -440
  7. package/coverage/coverage-final.json +16 -17
  8. package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  10. package/coverage/lcov-report/api/controllers/application.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
  14. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/component.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/datasource.js.html +14 -14
  17. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/hosting.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/index.html +38 -23
  20. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/{query/index.js.html → query.js.html} +27 -159
  25. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  29. package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  34. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  37. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/table/internal.js.html +1 -1
  39. package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
  40. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  41. package/coverage/lcov-report/api/controllers/user.js.html +9 -108
  42. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  43. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  44. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  45. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  46. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  47. package/coverage/lcov-report/api/controllers/webhook.js.html +6 -18
  48. package/coverage/lcov-report/api/index.html +1 -1
  49. package/coverage/lcov-report/api/index.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/application.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/hosting.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/index.html +9 -9
  63. package/coverage/lcov-report/api/routes/index.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/query.js.html +98 -11
  69. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  70. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/row.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  73. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  74. package/coverage/lcov-report/api/routes/static.js.html +1 -1
  75. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  76. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  77. package/coverage/lcov-report/api/routes/user.js.html +2 -32
  78. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  79. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  80. package/coverage/lcov-report/automations/actions.js.html +1 -1
  81. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  82. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  83. package/coverage/lcov-report/automations/index.html +1 -1
  84. package/coverage/lcov-report/automations/index.js.html +1 -1
  85. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/index.html +1 -1
  94. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  95. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  96. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  97. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  98. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  99. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  100. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  101. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  102. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  103. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  104. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  105. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  106. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  107. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  108. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  109. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  110. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  111. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  112. package/coverage/lcov-report/automations/utils.js.html +1 -1
  113. package/coverage/lcov-report/constants/index.html +1 -1
  114. package/coverage/lcov-report/constants/index.js.html +22 -22
  115. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  116. package/coverage/lcov-report/constants/screens.js.html +1 -1
  117. package/coverage/lcov-report/db/client.js.html +18 -18
  118. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  119. package/coverage/lcov-report/db/index.html +15 -15
  120. package/coverage/lcov-report/db/index.js.html +3 -3
  121. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  122. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  123. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  124. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  125. package/coverage/lcov-report/db/newid.js.html +4 -4
  126. package/coverage/lcov-report/db/utils.js.html +64 -91
  127. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  128. package/coverage/lcov-report/events/index.html +1 -1
  129. package/coverage/lcov-report/events/index.js.html +1 -1
  130. package/coverage/lcov-report/events/utils.js.html +1 -1
  131. package/coverage/lcov-report/index.html +52 -67
  132. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  133. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  134. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  135. package/coverage/lcov-report/middleware/authorized.js.html +2 -2
  136. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  137. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  138. package/coverage/lcov-report/middleware/index.html +1 -1
  139. package/coverage/lcov-report/middleware/joi-validator.js.html +3 -3
  140. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  141. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  142. package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
  143. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  144. package/coverage/lcov-report/threads/automation.js.html +1 -1
  145. package/coverage/lcov-report/threads/index.html +20 -20
  146. package/coverage/lcov-report/threads/index.js.html +1 -1
  147. package/coverage/lcov-report/threads/query.js.html +12 -63
  148. package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
  149. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  150. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  151. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  152. package/coverage/lcov-report/utilities/global.js.html +1 -1
  153. package/coverage/lcov-report/utilities/index.html +19 -19
  154. package/coverage/lcov-report/utilities/index.js.html +33 -66
  155. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  156. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  157. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  158. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  159. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  160. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  161. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  162. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  163. package/coverage/lcov-report/utilities/security.js.html +2 -2
  164. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  165. package/coverage/lcov-report/utilities/users.js.html +1 -1
  166. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  167. package/coverage/lcov.info +583 -688
  168. package/dist/api/controllers/{query/index.js → query.js} +6 -42
  169. package/dist/api/controllers/user.js +1 -37
  170. package/dist/api/controllers/webhook.js +0 -4
  171. package/dist/api/routes/query.js +32 -2
  172. package/dist/api/routes/user.js +1 -3
  173. package/dist/db/utils.js +0 -8
  174. package/dist/integrations/rest.js +113 -110
  175. package/dist/package.json +4 -8
  176. package/dist/threads/query.js +2 -14
  177. package/dist/tsconfig.tsbuildinfo +1 -1
  178. package/dist/utilities/index.js +0 -10
  179. package/package.json +5 -9
  180. package/src/api/controllers/{query/index.js → query.js} +6 -50
  181. package/src/api/controllers/user.js +0 -33
  182. package/src/api/controllers/webhook.js +0 -4
  183. package/src/api/routes/query.js +34 -5
  184. package/src/api/routes/user.js +0 -10
  185. package/src/db/utils.js +0 -9
  186. package/src/definitions/common.ts +16 -2
  187. package/src/definitions/datasource.ts +1 -50
  188. package/src/integrations/base/IntegrationBase.ts +4 -4
  189. package/src/integrations/oracle.ts +1 -1
  190. package/src/integrations/rest.ts +137 -111
  191. package/src/integrations/tests/rest.spec.js +7 -16
  192. package/src/threads/query.js +2 -19
  193. package/src/utilities/index.js +0 -11
  194. package/builder/assets/bb-spaceship.8f6e81e1.svg +0 -227
  195. package/builder/assets/index.b0718f41.js +0 -1320
  196. package/coverage/lcov-report/api/controllers/query/index.html +0 -126
  197. package/coverage/lcov-report/api/controllers/query/validation.js.html +0 -203
  198. package/dist/api/controllers/query/import/index.js +0 -79
  199. package/dist/api/controllers/query/import/sources/base/index.js +0 -63
  200. package/dist/api/controllers/query/import/sources/base/openapi.js +0 -42
  201. package/dist/api/controllers/query/import/sources/curl.js +0 -90
  202. package/dist/api/controllers/query/import/sources/openapi2.js +0 -139
  203. package/dist/api/controllers/query/import/sources/tests/openapi2/data/crud/crud.json +0 -253
  204. package/dist/api/controllers/query/import/sources/tests/openapi2/data/petstore/petstore.json +0 -1054
  205. package/dist/api/controllers/query/validation.js +0 -37
  206. package/src/api/controllers/query/import/index.ts +0 -85
  207. package/src/api/controllers/query/import/sources/base/index.ts +0 -85
  208. package/src/api/controllers/query/import/sources/base/openapi.ts +0 -24
  209. package/src/api/controllers/query/import/sources/curl.ts +0 -94
  210. package/src/api/controllers/query/import/sources/openapi2.ts +0 -159
  211. package/src/api/controllers/query/import/sources/tests/curl/curl.spec.js +0 -104
  212. package/src/api/controllers/query/import/sources/tests/curl/data/delete.txt +0 -1
  213. package/src/api/controllers/query/import/sources/tests/curl/data/empty-body.txt +0 -2
  214. package/src/api/controllers/query/import/sources/tests/curl/data/get.txt +0 -1
  215. package/src/api/controllers/query/import/sources/tests/curl/data/headers.txt +0 -3
  216. package/src/api/controllers/query/import/sources/tests/curl/data/patch.txt +0 -2
  217. package/src/api/controllers/query/import/sources/tests/curl/data/path.txt +0 -1
  218. package/src/api/controllers/query/import/sources/tests/curl/data/post.txt +0 -2
  219. package/src/api/controllers/query/import/sources/tests/curl/data/put.txt +0 -2
  220. package/src/api/controllers/query/import/sources/tests/curl/data/query.txt +0 -1
  221. package/src/api/controllers/query/import/sources/tests/openapi2/data/crud/crud.json +0 -253
  222. package/src/api/controllers/query/import/sources/tests/openapi2/data/crud/crud.yaml +0 -160
  223. package/src/api/controllers/query/import/sources/tests/openapi2/data/petstore/petstore.json +0 -1054
  224. package/src/api/controllers/query/import/sources/tests/openapi2/data/petstore/petstore.yaml +0 -711
  225. package/src/api/controllers/query/import/sources/tests/openapi2/openapi2.spec.js +0 -239
  226. package/src/api/controllers/query/import/tests/index.spec.js +0 -115
  227. package/src/api/controllers/query/validation.js +0 -41
@@ -1,139 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.OpenAPI2 = void 0;
13
- const openapi_types_1 = require("openapi-types");
14
- const openapi_1 = require("./base/openapi");
15
- const parameterNotRef = (param) => {
16
- // all refs are deferenced by parser library
17
- return true;
18
- };
19
- const isOpenAPI2 = (document) => {
20
- if (document.swagger === "2.0") {
21
- return true;
22
- }
23
- else {
24
- return false;
25
- }
26
- };
27
- const methods = Object.values(openapi_types_1.OpenAPIV2.HttpMethods);
28
- const isOperation = (key, pathItem) => {
29
- return methods.includes(key);
30
- };
31
- const isParameter = (key, pathItem) => {
32
- return !isOperation(key, pathItem);
33
- };
34
- /**
35
- * OpenAPI Version 2.0 - aka "Swagger"
36
- * https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md
37
- */
38
- class OpenAPI2 extends openapi_1.OpenAPISource {
39
- constructor() {
40
- super(...arguments);
41
- this.isSupported = (data) => __awaiter(this, void 0, void 0, function* () {
42
- try {
43
- const document = yield this.parseData(data);
44
- if (isOpenAPI2(document)) {
45
- this.document = document;
46
- return true;
47
- }
48
- else {
49
- return false;
50
- }
51
- }
52
- catch (err) {
53
- return false;
54
- }
55
- });
56
- this.getInfo = () => __awaiter(this, void 0, void 0, function* () {
57
- var _a;
58
- const scheme = ((_a = this.document.schemes) === null || _a === void 0 ? void 0 : _a.includes("https")) ? "https" : "http";
59
- const basePath = this.document.basePath || "";
60
- const host = this.document.host || "<host>";
61
- const url = `${scheme}://${host}${basePath}`;
62
- const name = this.document.info.title || "Swagger Import";
63
- return {
64
- url: url,
65
- name: name,
66
- };
67
- });
68
- this.getQueries = (datasourceId) => __awaiter(this, void 0, void 0, function* () {
69
- const queries = [];
70
- for (let [path, pathItem] of Object.entries(this.document.paths)) {
71
- // parameters that apply to every operation in the path
72
- let pathParams = [];
73
- for (let [key, opOrParams] of Object.entries(pathItem)) {
74
- if (isParameter(key, opOrParams)) {
75
- const pathParameters = opOrParams;
76
- pathParams.push(...pathParameters);
77
- continue;
78
- }
79
- // can not be a parameter, must be an operation
80
- const operation = opOrParams;
81
- const methodName = key;
82
- const name = operation.operationId || path;
83
- let queryString = "";
84
- const headers = {};
85
- let requestBody = undefined;
86
- const parameters = [];
87
- if (operation.consumes) {
88
- headers["Content-Type"] = operation.consumes[0];
89
- }
90
- // combine the path parameters with the operation parameters
91
- const operationParams = operation.parameters || [];
92
- const allParams = [...pathParams, ...operationParams];
93
- for (let param of allParams) {
94
- if (parameterNotRef(param)) {
95
- switch (param.in) {
96
- case "query":
97
- let prefix = "";
98
- if (queryString) {
99
- prefix = "&";
100
- }
101
- queryString = `${queryString}${prefix}${param.name}={{${param.name}}}`;
102
- break;
103
- case "header":
104
- headers[param.name] = `{{${param.name}}}`;
105
- break;
106
- case "path":
107
- // do nothing: param is already in the path
108
- break;
109
- case "formData":
110
- // future enhancement
111
- break;
112
- case "body":
113
- // set the request body to the example provided
114
- // future enhancement: generate an example from the schema
115
- let bodyParam = param;
116
- if (param.schema.example) {
117
- const schema = bodyParam.schema;
118
- requestBody = schema.example;
119
- }
120
- break;
121
- }
122
- // add the parameter if it can be bound in our config
123
- if (["query", "header", "path"].includes(param.in)) {
124
- parameters.push({
125
- name: param.name,
126
- default: param.default || "",
127
- });
128
- }
129
- }
130
- }
131
- const query = this.constructQuery(datasourceId, name, methodName, path, queryString, headers, parameters, requestBody);
132
- queries.push(query);
133
- }
134
- }
135
- return queries;
136
- });
137
- }
138
- }
139
- exports.OpenAPI2 = OpenAPI2;
@@ -1,253 +0,0 @@
1
- {
2
- "swagger": "2.0",
3
- "info": {
4
- "description": "A basic swagger file",
5
- "version": "1.0.0",
6
- "title": "CRUD"
7
- },
8
- "host": "example.com",
9
- "tags": [
10
- {
11
- "name": "entity"
12
- }
13
- ],
14
- "schemes": [
15
- "http"
16
- ],
17
- "paths": {
18
- "/entities": {
19
- "post": {
20
- "tags": [
21
- "entity"
22
- ],
23
- "operationId": "createEntity",
24
- "consumes": [
25
- "application/json"
26
- ],
27
- "produces": [
28
- "application/json"
29
- ],
30
- "parameters": [
31
- {
32
- "$ref": "#/parameters/CreateEntity"
33
- }
34
- ],
35
- "responses": {
36
- "200": {
37
- "description": "successful operation",
38
- "schema": {
39
- "$ref": "#/definitions/Entity"
40
- }
41
- }
42
- }
43
- },
44
- "get": {
45
- "tags": [
46
- "entity"
47
- ],
48
- "operationId": "getEntities",
49
- "produces": [
50
- "application/json"
51
- ],
52
- "parameters": [
53
- {
54
- "$ref": "#/parameters/Page"
55
- },
56
- {
57
- "$ref": "#/parameters/Size"
58
- }
59
- ],
60
- "responses": {
61
- "200": {
62
- "description": "successful operation",
63
- "schema": {
64
- "$ref": "#/definitions/Entities"
65
- }
66
- }
67
- }
68
- }
69
- },
70
- "/entities/{entityId}": {
71
- "parameters": [
72
- {
73
- "$ref": "#/parameters/EntityId"
74
- }
75
- ],
76
- "get": {
77
- "tags": [
78
- "entity"
79
- ],
80
- "operationId": "getEntity",
81
- "produces": [
82
- "application/json"
83
- ],
84
- "responses": {
85
- "200": {
86
- "description": "successful operation",
87
- "schema": {
88
- "$ref": "#/definitions/Entity"
89
- }
90
- }
91
- }
92
- },
93
- "put": {
94
- "tags": [
95
- "entity"
96
- ],
97
- "operationId": "updateEntity",
98
- "consumes": [
99
- "application/json"
100
- ],
101
- "produces": [
102
- "application/json"
103
- ],
104
- "parameters": [
105
- {
106
- "$ref": "#/parameters/Entity"
107
- }
108
- ],
109
- "responses": {
110
- "200": {
111
- "description": "successful operation",
112
- "schema": {
113
- "$ref": "#/definitions/Entity"
114
- }
115
- }
116
- }
117
- },
118
- "patch": {
119
- "tags": [
120
- "entity"
121
- ],
122
- "operationId": "patchEntity",
123
- "consumes": [
124
- "application/json"
125
- ],
126
- "produces": [
127
- "application/json"
128
- ],
129
- "parameters": [
130
- {
131
- "$ref": "#/parameters/Entity"
132
- }
133
- ],
134
- "responses": {
135
- "200": {
136
- "description": "successful operation",
137
- "schema": {
138
- "$ref": "#/definitions/Entity"
139
- }
140
- }
141
- }
142
- },
143
- "delete": {
144
- "tags": [
145
- "entity"
146
- ],
147
- "parameters": [
148
- {
149
- "$ref": "#/parameters/APIKey"
150
- }
151
- ],
152
- "operationId": "deleteEntity",
153
- "produces": [
154
- "application/json"
155
- ],
156
- "responses": {
157
- "204": {
158
- "description": "successful operation"
159
- }
160
- }
161
- }
162
- }
163
- },
164
- "parameters": {
165
- "EntityId": {
166
- "type": "integer",
167
- "format": "int64",
168
- "name": "entityId",
169
- "in": "path",
170
- "required": true
171
- },
172
- "CreateEntity": {
173
- "name": "entity",
174
- "in": "body",
175
- "required": true,
176
- "schema": {
177
- "$ref": "#/definitions/CreateEntity"
178
- }
179
- },
180
- "Entity": {
181
- "name": "entity",
182
- "in": "body",
183
- "required": true,
184
- "schema": {
185
- "$ref": "#/definitions/Entity"
186
- }
187
- },
188
- "Page": {
189
- "type": "integer",
190
- "format": "int32",
191
- "name": "page",
192
- "in": "query",
193
- "required": false
194
- },
195
- "Size": {
196
- "type": "integer",
197
- "format": "int32",
198
- "name": "size",
199
- "in": "query",
200
- "required": false
201
- },
202
- "APIKey": {
203
- "type": "string",
204
- "name": "x-api-key",
205
- "in": "header",
206
- "required": false
207
- }
208
- },
209
- "definitions": {
210
- "CreateEntity": {
211
- "type": "object",
212
- "properties": {
213
- "name": {
214
- "type": "string"
215
- },
216
- "type": {
217
- "type": "string"
218
- }
219
- },
220
- "example": {
221
- "name": "name",
222
- "type": "type"
223
- }
224
- },
225
- "Entity": {
226
- "allOf": [
227
- {
228
- "type": "object",
229
- "properties": {
230
- "id": {
231
- "type": "integer",
232
- "format": "int64"
233
- }
234
- }
235
- },
236
- {
237
- "$ref": "#/definitions/CreateEntity"
238
- }
239
- ],
240
- "example": {
241
- "id": 1,
242
- "name": "name",
243
- "type": "type"
244
- }
245
- },
246
- "Entities" : {
247
- "type": "array",
248
- "items": {
249
- "$ref": "#/definitions/Entity"
250
- }
251
- }
252
- }
253
- }