@budibase/server 1.0.35 → 1.0.39
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.
- package/__mocks__/node-fetch.ts +21 -0
- package/builder/assets/bb-spaceship.8f6e81e1.svg +227 -0
- package/builder/assets/index.3079d0f9.js +1348 -0
- package/builder/assets/{index.4fb3f887.css → index.39e01193.css} +1 -1
- package/builder/assets/{vendor.470042a4.js → vendor.f9faf6ab.js} +88 -88
- package/builder/index.html +3 -3
- package/coverage/clover.xml +1589 -1344
- package/coverage/coverage-final.json +75 -74
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +3 -3
- package/coverage/lcov-report/api/controllers/application.js.html +73 -64
- package/coverage/lcov-report/api/controllers/auth.js.html +2 -2
- package/coverage/lcov-report/api/controllers/automation.js.html +22 -10
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +13 -4
- package/coverage/lcov-report/api/controllers/component.js.html +4 -4
- package/coverage/lcov-report/api/controllers/datasource.js.html +170 -68
- package/coverage/lcov-report/api/controllers/dev.js.html +3 -3
- package/coverage/lcov-report/api/controllers/hosting.js.html +3 -3
- package/coverage/lcov-report/api/controllers/index.html +39 -54
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +3 -3
- package/coverage/lcov-report/api/controllers/query/index.html +126 -0
- package/coverage/lcov-report/api/controllers/{query.js.html → query/index.js.html} +225 -120
- package/coverage/lcov-report/api/controllers/query/validation.js.html +206 -0
- package/coverage/lcov-report/api/controllers/role.js.html +2 -2
- package/coverage/lcov-report/api/controllers/routing.js.html +2 -2
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +22 -22
- package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +38 -11
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +8 -5
- package/coverage/lcov-report/api/controllers/row/utils.js.html +29 -20
- package/coverage/lcov-report/api/controllers/screen.js.html +2 -2
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +120 -12
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +19 -7
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +6 -6
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +2 -2
- package/coverage/lcov-report/api/routes/application.js.html +2 -2
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +2 -2
- package/coverage/lcov-report/api/routes/backup.js.html +2 -2
- package/coverage/lcov-report/api/routes/cloud.js.html +2 -2
- package/coverage/lcov-report/api/routes/component.js.html +2 -2
- package/coverage/lcov-report/api/routes/datasource.js.html +2 -2
- package/coverage/lcov-report/api/routes/deploy.js.html +2 -2
- package/coverage/lcov-report/api/routes/dev.js.html +2 -2
- package/coverage/lcov-report/api/routes/hosting.js.html +2 -2
- package/coverage/lcov-report/api/routes/index.html +9 -9
- package/coverage/lcov-report/api/routes/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +2 -2
- package/coverage/lcov-report/api/routes/layout.js.html +2 -2
- package/coverage/lcov-report/api/routes/metadata.js.html +2 -2
- package/coverage/lcov-report/api/routes/permission.js.html +12 -3
- package/coverage/lcov-report/api/routes/query.js.html +20 -86
- package/coverage/lcov-report/api/routes/role.js.html +2 -2
- package/coverage/lcov-report/api/routes/routing.js.html +2 -2
- package/coverage/lcov-report/api/routes/row.js.html +2 -2
- package/coverage/lcov-report/api/routes/screen.js.html +2 -2
- package/coverage/lcov-report/api/routes/script.js.html +2 -2
- package/coverage/lcov-report/api/routes/static.js.html +2 -2
- package/coverage/lcov-report/api/routes/table.js.html +2 -2
- package/coverage/lcov-report/api/routes/templates.js.html +2 -2
- package/coverage/lcov-report/api/routes/user.js.html +33 -3
- package/coverage/lcov-report/api/routes/view.js.html +2 -2
- package/coverage/lcov-report/api/routes/webhook.js.html +2 -2
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +2 -2
- package/coverage/lcov-report/automations/index.html +20 -20
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +32 -8
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +11 -11
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +5 -8
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/automations/utils.js.html +49 -16
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +25 -25
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +2 -2
- package/coverage/lcov-report/db/client.js.html +19 -19
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +15 -15
- package/coverage/lcov-report/db/index.js.html +3 -3
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +4 -4
- package/coverage/lcov-report/db/utils.js.html +108 -81
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +99 -84
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/authorized.js.html +12 -12
- package/coverage/lcov-report/middleware/builder.js.html +10 -10
- package/coverage/lcov-report/middleware/currentapp.js.html +48 -36
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +11 -11
- package/coverage/lcov-report/middleware/resourceId.js.html +18 -18
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/usageQuota.js.html +2 -2
- package/coverage/lcov-report/middleware/utils.js.html +2 -2
- package/coverage/lcov-report/threads/automation.js.html +3 -3
- package/coverage/lcov-report/threads/index.html +32 -32
- package/coverage/lcov-report/threads/index.js.html +12 -12
- package/coverage/lcov-report/threads/query.js.html +560 -65
- package/coverage/lcov-report/threads/utils.js.html +210 -15
- package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +2 -2
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +28 -19
- package/coverage/lcov-report/utilities/index.html +19 -19
- package/coverage/lcov-report/utilities/index.js.html +70 -37
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +2 -2
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +19 -19
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +247 -10
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +14 -5
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +22 -22
- package/coverage/lcov.info +2735 -2313
- package/dist/api/controllers/apikeys.js +2 -2
- package/dist/api/controllers/application.js +4 -4
- package/dist/api/controllers/auth.js +1 -1
- package/dist/api/controllers/automation.js +7 -5
- package/dist/api/controllers/cloud.js +2 -2
- package/dist/api/controllers/datasource.js +29 -0
- package/dist/api/controllers/deploy/index.js +2 -2
- package/dist/api/controllers/dev.js +2 -2
- package/dist/api/controllers/hosting.js +2 -2
- package/dist/api/controllers/permission.js +2 -2
- package/dist/api/controllers/query/import/index.js +79 -0
- package/dist/api/controllers/query/import/sources/base/index.js +64 -0
- package/dist/api/controllers/query/import/sources/base/openapi.js +42 -0
- package/dist/api/controllers/query/import/sources/curl.js +96 -0
- package/dist/api/controllers/query/import/sources/openapi2.js +142 -0
- package/dist/api/controllers/query/import/sources/tests/openapi2/data/crud/crud.json +253 -0
- package/dist/api/controllers/query/import/sources/tests/openapi2/data/petstore/petstore.json +1054 -0
- package/dist/api/controllers/{query.js → query/index.js} +88 -56
- package/dist/api/controllers/query/validation.js +38 -0
- package/dist/api/controllers/role.js +1 -1
- package/dist/api/controllers/routing.js +1 -1
- package/dist/api/controllers/row/internal.js +14 -6
- package/dist/api/controllers/row/internalSearch.js +3 -2
- package/dist/api/controllers/row/utils.js +13 -6
- package/dist/api/controllers/screen.js +1 -1
- package/dist/api/controllers/user.js +40 -4
- package/dist/api/controllers/webhook.js +5 -1
- package/dist/api/index.js +1 -1
- package/dist/api/routes/apikeys.js +1 -1
- package/dist/api/routes/application.js +1 -1
- package/dist/api/routes/automation.js +1 -1
- package/dist/api/routes/backup.js +1 -1
- package/dist/api/routes/cloud.js +1 -1
- package/dist/api/routes/component.js +1 -1
- package/dist/api/routes/datasource.js +1 -1
- package/dist/api/routes/deploy.js +1 -1
- package/dist/api/routes/dev.js +1 -1
- package/dist/api/routes/hosting.js +1 -1
- package/dist/api/routes/integration.js +1 -1
- package/dist/api/routes/layout.js +1 -1
- package/dist/api/routes/metadata.js +1 -1
- package/dist/api/routes/permission.js +1 -1
- package/dist/api/routes/query.js +6 -34
- package/dist/api/routes/role.js +1 -1
- package/dist/api/routes/routing.js +1 -1
- package/dist/api/routes/row.js +1 -1
- package/dist/api/routes/screen.js +1 -1
- package/dist/api/routes/script.js +1 -1
- package/dist/api/routes/static.js +1 -1
- package/dist/api/routes/table.js +1 -1
- package/dist/api/routes/templates.js +1 -1
- package/dist/api/routes/tests/utilities/TestFunctions.js +1 -1
- package/dist/api/routes/user.js +4 -2
- package/dist/api/routes/view.js +1 -1
- package/dist/api/routes/webhook.js +1 -1
- package/dist/app.js +1 -1
- package/dist/automations/bullboard.js +1 -1
- package/dist/automations/steps/executeQuery.js +9 -2
- package/dist/automations/steps/outgoingWebhook.js +2 -3
- package/dist/automations/utils.js +11 -1
- package/dist/constants/index.js +3 -3
- package/dist/constants/screens.js +1 -1
- package/dist/db/client.js +1 -1
- package/dist/db/utils.js +9 -1
- package/dist/definitions/datasource.js +6 -1
- package/dist/integrations/base/sqlTable.js +1 -1
- package/dist/integrations/rest.js +259 -120
- package/dist/integrations/utils.js +40 -37
- package/dist/middleware/authorized.js +2 -2
- package/dist/middleware/builder.js +2 -2
- package/dist/middleware/currentapp.js +6 -6
- package/dist/middleware/usageQuota.js +1 -1
- package/dist/package.json +11 -4
- package/dist/tests/utilities/TestConfiguration.js +55 -8
- package/dist/tests/utilities/structures.js +2 -2
- package/dist/threads/automation.js +2 -2
- package/dist/threads/query.js +195 -38
- package/dist/threads/utils.js +62 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/budibaseDir.js +1 -1
- package/dist/utilities/fileSystem/utilities.js +2 -1
- package/dist/utilities/global.js +5 -5
- package/dist/utilities/index.js +11 -1
- package/dist/utilities/redis.js +1 -1
- package/dist/utilities/rowProcessor/index.js +76 -0
- package/dist/utilities/security.js +2 -2
- package/dist/utilities/usageQuota.js +2 -2
- package/dist/utilities/workerRequests.js +3 -3
- package/package.json +12 -5
- package/scripts/replicateApp.js +1 -1
- package/src/api/controllers/apikeys.js +2 -2
- package/src/api/controllers/application.js +7 -4
- package/src/api/controllers/auth.js +1 -1
- package/src/api/controllers/automation.js +8 -4
- package/src/api/controllers/cloud.js +5 -2
- package/src/api/controllers/datasource.js +34 -0
- package/src/api/controllers/deploy/index.js +2 -2
- package/src/api/controllers/dev.js +2 -2
- package/src/api/controllers/hosting.js +2 -2
- package/src/api/controllers/permission.js +2 -2
- package/src/api/controllers/query/import/index.ts +85 -0
- package/src/api/controllers/query/import/sources/base/index.ts +87 -0
- package/src/api/controllers/query/import/sources/base/openapi.ts +24 -0
- package/src/api/controllers/query/import/sources/curl.ts +102 -0
- package/src/api/controllers/query/import/sources/openapi2.ts +163 -0
- package/src/api/controllers/query/import/sources/tests/curl/curl.spec.js +103 -0
- package/src/api/controllers/query/import/sources/tests/curl/data/delete.txt +1 -0
- package/src/api/controllers/query/import/sources/tests/curl/data/empty-body.txt +2 -0
- package/src/api/controllers/query/import/sources/tests/curl/data/get.txt +1 -0
- package/src/api/controllers/query/import/sources/tests/curl/data/headers.txt +3 -0
- package/src/api/controllers/query/import/sources/tests/curl/data/patch.txt +2 -0
- package/src/api/controllers/query/import/sources/tests/curl/data/path.txt +1 -0
- package/src/api/controllers/query/import/sources/tests/curl/data/post.txt +2 -0
- package/src/api/controllers/query/import/sources/tests/curl/data/put.txt +2 -0
- package/src/api/controllers/query/import/sources/tests/curl/data/query.txt +1 -0
- package/src/api/controllers/query/import/sources/tests/openapi2/data/crud/crud.json +253 -0
- package/src/api/controllers/query/import/sources/tests/openapi2/data/crud/crud.yaml +160 -0
- package/src/api/controllers/query/import/sources/tests/openapi2/data/petstore/petstore.json +1054 -0
- package/src/api/controllers/query/import/sources/tests/openapi2/data/petstore/petstore.yaml +711 -0
- package/src/api/controllers/query/import/sources/tests/openapi2/openapi2.spec.js +238 -0
- package/src/api/controllers/query/import/tests/index.spec.js +109 -0
- package/src/api/controllers/query/index.js +196 -0
- package/src/api/controllers/query/validation.js +42 -0
- package/src/api/controllers/role.js +1 -1
- package/src/api/controllers/routing.js +1 -1
- package/src/api/controllers/row/internal.js +14 -5
- package/src/api/controllers/row/internalSearch.js +3 -2
- package/src/api/controllers/row/utils.js +11 -8
- package/src/api/controllers/screen.js +1 -1
- package/src/api/controllers/user.js +39 -3
- package/src/api/controllers/webhook.js +5 -1
- package/src/api/index.js +1 -1
- package/src/api/routes/apikeys.js +1 -1
- package/src/api/routes/application.js +1 -1
- package/src/api/routes/automation.js +1 -1
- package/src/api/routes/backup.js +1 -1
- package/src/api/routes/cloud.js +1 -1
- package/src/api/routes/component.js +1 -1
- package/src/api/routes/datasource.js +1 -1
- package/src/api/routes/deploy.js +1 -1
- package/src/api/routes/dev.js +1 -1
- package/src/api/routes/hosting.js +1 -1
- package/src/api/routes/integration.js +1 -1
- package/src/api/routes/layout.js +1 -1
- package/src/api/routes/metadata.js +1 -1
- package/src/api/routes/permission.js +4 -1
- package/src/api/routes/query.js +14 -36
- package/src/api/routes/role.js +1 -1
- package/src/api/routes/routing.js +1 -1
- package/src/api/routes/row.js +1 -1
- package/src/api/routes/screen.js +1 -1
- package/src/api/routes/script.js +1 -1
- package/src/api/routes/static.js +1 -1
- package/src/api/routes/table.js +1 -1
- package/src/api/routes/templates.js +1 -1
- package/src/api/routes/tests/datasource.spec.js +45 -0
- package/src/api/routes/tests/permissions.spec.js +1 -1
- package/src/api/routes/tests/query.spec.js +70 -1
- package/src/api/routes/tests/role.spec.js +2 -2
- package/src/api/routes/tests/routing.spec.js +1 -1
- package/src/api/routes/tests/user.spec.js +1 -1
- package/src/api/routes/tests/utilities/TestFunctions.js +1 -1
- package/src/api/routes/user.js +11 -1
- package/src/api/routes/view.js +1 -1
- package/src/api/routes/webhook.js +1 -1
- package/src/app.ts +1 -1
- package/src/automations/bullboard.js +1 -1
- package/src/automations/steps/executeQuery.js +10 -2
- package/src/automations/steps/outgoingWebhook.js +2 -3
- package/src/automations/utils.js +12 -1
- package/src/constants/index.js +3 -3
- package/src/constants/screens.js +1 -1
- package/src/db/client.js +1 -1
- package/src/db/utils.js +10 -1
- package/src/definitions/common.ts +2 -16
- package/src/definitions/datasource.ts +98 -1
- package/src/integrations/base/IntegrationBase.ts +4 -4
- package/src/integrations/base/sqlTable.ts +1 -1
- package/src/integrations/rest.ts +311 -138
- package/src/integrations/tests/rest.spec.js +432 -21
- package/src/integrations/utils.ts +8 -7
- package/src/middleware/authorized.js +2 -2
- package/src/middleware/builder.js +2 -2
- package/src/middleware/currentapp.js +11 -7
- package/src/middleware/tests/authorized.spec.js +2 -2
- package/src/middleware/tests/currentapp.spec.js +35 -41
- package/src/middleware/tests/usageQuota.spec.js +1 -1
- package/src/middleware/usageQuota.js +1 -1
- package/src/tests/utilities/TestConfiguration.js +65 -8
- package/src/tests/utilities/structures.js +2 -2
- package/src/threads/automation.js +2 -2
- package/src/threads/query.js +204 -39
- package/src/threads/utils.js +66 -1
- package/src/utilities/budibaseDir.js +1 -1
- package/src/utilities/fileSystem/utilities.js +3 -1
- package/src/utilities/global.js +8 -5
- package/src/utilities/index.js +12 -1
- package/src/utilities/redis.js +1 -1
- package/src/utilities/rowProcessor/index.js +79 -0
- package/src/utilities/security.js +5 -2
- package/src/utilities/usageQuota.js +2 -2
- package/src/utilities/workerRequests.js +3 -3
- package/builder/assets/index.9ac33cf1.js +0 -1316
- package/src/api/controllers/query.js +0 -161
|
@@ -0,0 +1,253 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
swagger: "2.0"
|
|
3
|
+
info:
|
|
4
|
+
description: A basic swagger file
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
title: CRUD
|
|
7
|
+
host: example.com
|
|
8
|
+
tags:
|
|
9
|
+
- name: entity
|
|
10
|
+
schemes:
|
|
11
|
+
- http
|
|
12
|
+
paths:
|
|
13
|
+
"/entities":
|
|
14
|
+
post:
|
|
15
|
+
tags:
|
|
16
|
+
- entity
|
|
17
|
+
operationId: createEntity
|
|
18
|
+
consumes:
|
|
19
|
+
- application/json
|
|
20
|
+
produces:
|
|
21
|
+
- application/json
|
|
22
|
+
parameters:
|
|
23
|
+
- "$ref": "#/parameters/CreateEntity"
|
|
24
|
+
responses:
|
|
25
|
+
"200":
|
|
26
|
+
description: successful operation
|
|
27
|
+
schema:
|
|
28
|
+
"$ref": "#/definitions/Entity"
|
|
29
|
+
get:
|
|
30
|
+
tags:
|
|
31
|
+
- entity
|
|
32
|
+
operationId: getEntities
|
|
33
|
+
produces:
|
|
34
|
+
- application/json
|
|
35
|
+
parameters:
|
|
36
|
+
- "$ref": "#/parameters/Page"
|
|
37
|
+
- "$ref": "#/parameters/Size"
|
|
38
|
+
responses:
|
|
39
|
+
"200":
|
|
40
|
+
description: successful operation
|
|
41
|
+
schema:
|
|
42
|
+
"$ref": "#/definitions/Entities"
|
|
43
|
+
"/entities/{entityId}":
|
|
44
|
+
parameters:
|
|
45
|
+
- "$ref": "#/parameters/EntityId"
|
|
46
|
+
get:
|
|
47
|
+
tags:
|
|
48
|
+
- entity
|
|
49
|
+
operationId: getEntity
|
|
50
|
+
produces:
|
|
51
|
+
- application/json
|
|
52
|
+
responses:
|
|
53
|
+
"200":
|
|
54
|
+
description: successful operation
|
|
55
|
+
schema:
|
|
56
|
+
"$ref": "#/definitions/Entity"
|
|
57
|
+
put:
|
|
58
|
+
tags:
|
|
59
|
+
- entity
|
|
60
|
+
operationId: updateEntity
|
|
61
|
+
consumes:
|
|
62
|
+
- application/json
|
|
63
|
+
produces:
|
|
64
|
+
- application/json
|
|
65
|
+
parameters:
|
|
66
|
+
- "$ref": "#/parameters/Entity"
|
|
67
|
+
responses:
|
|
68
|
+
"200":
|
|
69
|
+
description: successful operation
|
|
70
|
+
schema:
|
|
71
|
+
"$ref": "#/definitions/Entity"
|
|
72
|
+
patch:
|
|
73
|
+
tags:
|
|
74
|
+
- entity
|
|
75
|
+
operationId: patchEntity
|
|
76
|
+
consumes:
|
|
77
|
+
- application/json
|
|
78
|
+
produces:
|
|
79
|
+
- application/json
|
|
80
|
+
parameters:
|
|
81
|
+
- "$ref": "#/parameters/Entity"
|
|
82
|
+
responses:
|
|
83
|
+
"200":
|
|
84
|
+
description: successful operation
|
|
85
|
+
schema:
|
|
86
|
+
"$ref": "#/definitions/Entity"
|
|
87
|
+
delete:
|
|
88
|
+
tags:
|
|
89
|
+
- entity
|
|
90
|
+
parameters:
|
|
91
|
+
- "$ref": "#/parameters/APIKey"
|
|
92
|
+
operationId: deleteEntity
|
|
93
|
+
produces:
|
|
94
|
+
- application/json
|
|
95
|
+
responses:
|
|
96
|
+
"204":
|
|
97
|
+
description: successful operation
|
|
98
|
+
parameters:
|
|
99
|
+
EntityId:
|
|
100
|
+
type: integer
|
|
101
|
+
format: int64
|
|
102
|
+
name: entityId
|
|
103
|
+
in: path
|
|
104
|
+
required: true
|
|
105
|
+
CreateEntity:
|
|
106
|
+
name: entity
|
|
107
|
+
in: body
|
|
108
|
+
required: true
|
|
109
|
+
schema:
|
|
110
|
+
"$ref": "#/definitions/CreateEntity"
|
|
111
|
+
Entity:
|
|
112
|
+
name: entity
|
|
113
|
+
in: body
|
|
114
|
+
required: true
|
|
115
|
+
schema:
|
|
116
|
+
"$ref": "#/definitions/Entity"
|
|
117
|
+
Page:
|
|
118
|
+
type: integer
|
|
119
|
+
format: int32
|
|
120
|
+
name: page
|
|
121
|
+
in: query
|
|
122
|
+
required: false
|
|
123
|
+
Size:
|
|
124
|
+
type: integer
|
|
125
|
+
format: int32
|
|
126
|
+
name: size
|
|
127
|
+
in: query
|
|
128
|
+
required: false
|
|
129
|
+
APIKey:
|
|
130
|
+
type: string
|
|
131
|
+
name: x-api-key
|
|
132
|
+
in: header
|
|
133
|
+
required: false
|
|
134
|
+
definitions:
|
|
135
|
+
CreateEntity:
|
|
136
|
+
type: object
|
|
137
|
+
properties:
|
|
138
|
+
name:
|
|
139
|
+
type: string
|
|
140
|
+
type:
|
|
141
|
+
type: string
|
|
142
|
+
example:
|
|
143
|
+
name: name
|
|
144
|
+
type: type
|
|
145
|
+
Entity:
|
|
146
|
+
allOf:
|
|
147
|
+
- type: object
|
|
148
|
+
properties:
|
|
149
|
+
id:
|
|
150
|
+
type: integer
|
|
151
|
+
format: int64
|
|
152
|
+
- "$ref": "#/definitions/CreateEntity"
|
|
153
|
+
example:
|
|
154
|
+
id: 1
|
|
155
|
+
name: name
|
|
156
|
+
type: type
|
|
157
|
+
Entities:
|
|
158
|
+
type: array
|
|
159
|
+
items:
|
|
160
|
+
"$ref": "#/definitions/Entity"
|