@platformatic/runtime 2.0.1 → 2.1.0
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/config.d.ts +1 -1
- package/index.d.ts +1 -0
- package/lib/config.js +37 -1
- package/lib/errors.js +1 -0
- package/lib/schema.js +1 -5
- package/lib/versions/v2.0.0.js +2 -0
- package/lib/worker/app.js +1 -2
- package/package.json +13 -13
- package/schema.json +4 -7
- package/fixtures/botched-start/platformatic.runtime.json +0 -14
- package/fixtures/botched-start/services/a/platformatic.service.json +0 -14
- package/fixtures/botched-start/services/a/plugin.js +0 -11
- package/fixtures/composerApp/api1.json +0 -65
- package/fixtures/composerApp/platformatic.composer.json +0 -23
- package/fixtures/configs/invalid-entrypoint.json +0 -14
- package/fixtures/configs/invalid-schema-type.config.json +0 -19
- package/fixtures/configs/invalid-web-with-services.json +0 -36
- package/fixtures/configs/missing-property.config.json +0 -13
- package/fixtures/configs/missing-service-config.json +0 -7
- package/fixtures/configs/monorepo-composer-no-autoload.json +0 -32
- package/fixtures/configs/monorepo-composer.json +0 -19
- package/fixtures/configs/monorepo-create-cycle.json +0 -20
- package/fixtures/configs/monorepo-missing-dependencies.json +0 -9
- package/fixtures/configs/monorepo-no-cycles.json +0 -19
- package/fixtures/configs/monorepo-openapi.json +0 -12
- package/fixtures/configs/monorepo-watch-env.json +0 -19
- package/fixtures/configs/monorepo-watch-single.json +0 -12
- package/fixtures/configs/monorepo-watch.json +0 -27
- package/fixtures/configs/monorepo-with-dependencies.json +0 -8
- package/fixtures/configs/monorepo-with-management-api-without-metrics.json +0 -21
- package/fixtures/configs/monorepo-with-management-api.json +0 -20
- package/fixtures/configs/monorepo-with-metrics.json +0 -32
- package/fixtures/configs/monorepo.json +0 -27
- package/fixtures/configs/no-schema.config.json +0 -18
- package/fixtures/configs/no-services.config.json +0 -5
- package/fixtures/configs/no-sources.config.json +0 -4
- package/fixtures/configs/service-throws-on-start.json +0 -11
- package/fixtures/configs/service-with-env-port.json +0 -32
- package/fixtures/configs/service-with-stdio.json +0 -12
- package/fixtures/configs/watch.json +0 -19
- package/fixtures/crash-on-bootstrap/platformatic.runtime.json +0 -15
- package/fixtures/crash-on-bootstrap/services/service-1/platformatic.service.json +0 -14
- package/fixtures/crash-on-bootstrap/services/service-1/plugin.js +0 -5
- package/fixtures/crash-on-bootstrap/services/service-2/platformatic.service.json +0 -14
- package/fixtures/crash-on-bootstrap/services/service-2/plugin.js +0 -5
- package/fixtures/dbApp/package.json +0 -5
- package/fixtures/dbApp/platformatic.db.json +0 -28
- package/fixtures/dbApp/plugin.js +0 -12
- package/fixtures/dbAppNoName/package.json +0 -4
- package/fixtures/dbAppNoName/platformatic.db.json +0 -27
- package/fixtures/dbAppNoName/plugin.js +0 -12
- package/fixtures/dbAppNoPackageJson/platformatic.db.json +0 -27
- package/fixtures/dbAppNoPackageJson/plugin.js +0 -12
- package/fixtures/dbAppWithMigrationError/migrations/001.do.sql +0 -4
- package/fixtures/dbAppWithMigrationError/migrations/001.undo.sql +0 -1
- package/fixtures/dbAppWithMigrationError/package.json +0 -5
- package/fixtures/dbAppWithMigrationError/platformatic.db.json +0 -28
- package/fixtures/dbAppWithMigrationError/plugin.js +0 -5
- package/fixtures/do-not-reload-dependencies/node_modules/foo/foo.js +0 -2
- package/fixtures/do-not-reload-dependencies/node_modules/foo/package.json +0 -3
- package/fixtures/do-not-reload-dependencies/node_modules/foom/foom.js +0 -1
- package/fixtures/do-not-reload-dependencies/node_modules/foom/package.json +0 -4
- package/fixtures/do-not-reload-dependencies/platformatic.service.json +0 -18
- package/fixtures/do-not-reload-dependencies/plugin.js +0 -14
- package/fixtures/do-not-restart-on-crash/platformatic.runtime.json +0 -15
- package/fixtures/do-not-restart-on-crash/services/a/platformatic.service.json +0 -16
- package/fixtures/do-not-restart-on-crash/services/a/plugin.js +0 -9
- package/fixtures/empty/hello.js +0 -7
- package/fixtures/express/platformatic.runtime.json +0 -21
- package/fixtures/express/services/a/platformatic.service.json +0 -14
- package/fixtures/express/services/a/plugin.js +0 -26
- package/fixtures/express/services/b/platformatic.service.json +0 -14
- package/fixtures/express/services/b/plugin.js +0 -19
- package/fixtures/external-client/openmeter.json +0 -420
- package/fixtures/external-client/platformatic.service.json +0 -13
- package/fixtures/interceptors/external.js +0 -27
- package/fixtures/interceptors/idp.js +0 -48
- package/fixtures/interceptors/platformatic.runtime.json +0 -27
- package/fixtures/interceptors/services/a/platformatic.service.json +0 -17
- package/fixtures/interceptors/services/a/plugin.js +0 -15
- package/fixtures/interceptors-2/platformatic.runtime.json +0 -25
- package/fixtures/interceptors-2/services/a/platformatic.service.json +0 -17
- package/fixtures/interceptors-2/services/a/plugin.js +0 -15
- package/fixtures/leven/.env.sample +0 -4
- package/fixtures/leven/platformatic.runtime.json +0 -11
- package/fixtures/leven/services/deeply-spittle/platformatic.service.json +0 -25
- package/fixtures/leven/services/deeply-spittle/plugins/example.js +0 -6
- package/fixtures/leven/services/deeply-spittle/routes/root.js +0 -8
- package/fixtures/leven/services/rainy-empire/platformatic.composer.json +0 -21
- package/fixtures/management-api/package.json +0 -4
- package/fixtures/management-api/platformatic.json +0 -22
- package/fixtures/management-api/services/service-1/platformatic.json +0 -15
- package/fixtures/management-api/services/service-1/plugin.js +0 -16
- package/fixtures/management-api/services/service-2/platformatic.json +0 -9
- package/fixtures/management-api/services/service-2/plugin.js +0 -8
- package/fixtures/management-api/services/service-db/migrations/001.do.sql +0 -4
- package/fixtures/management-api/services/service-db/migrations/001.undo.sql +0 -1
- package/fixtures/management-api/services/service-db/package.json +0 -5
- package/fixtures/management-api/services/service-db/platformatic.db.json +0 -29
- package/fixtures/management-api/services/service-db/plugin.js +0 -12
- package/fixtures/management-api-custom-labels/package.json +0 -4
- package/fixtures/management-api-custom-labels/platformatic.json +0 -22
- package/fixtures/management-api-custom-labels/services/service-1/platformatic.json +0 -12
- package/fixtures/management-api-custom-labels/services/service-1/plugin.js +0 -16
- package/fixtures/management-api-custom-labels/services/service-2/platformatic.json +0 -9
- package/fixtures/management-api-custom-labels/services/service-2/plugin.js +0 -8
- package/fixtures/management-api-custom-labels/services/service-db/migrations/001.do.sql +0 -4
- package/fixtures/management-api-custom-labels/services/service-db/migrations/001.undo.sql +0 -1
- package/fixtures/management-api-custom-labels/services/service-db/package.json +0 -5
- package/fixtures/management-api-custom-labels/services/service-db/platformatic.db.json +0 -29
- package/fixtures/management-api-custom-labels/services/service-db/plugin.js +0 -12
- package/fixtures/management-api-without-metrics/package.json +0 -4
- package/fixtures/management-api-without-metrics/platformatic.json +0 -14
- package/fixtures/management-api-without-metrics/services/service-1/platformatic.json +0 -8
- package/fixtures/monorepo/composerApp/external-service.json +0 -204
- package/fixtures/monorepo/composerApp/platformatic.composer.json +0 -46
- package/fixtures/monorepo/dbApp/platformatic.db.json +0 -16
- package/fixtures/monorepo/docs/README.md +0 -1
- package/fixtures/monorepo/serviceApp/deps/dep1.js +0 -7
- package/fixtures/monorepo/serviceApp/deps/dep2.mjs +0 -2
- package/fixtures/monorepo/serviceApp/deps/dep3.mjs +0 -2
- package/fixtures/monorepo/serviceApp/deps/dep4.js +0 -1
- package/fixtures/monorepo/serviceApp/platformatic.service.json +0 -23
- package/fixtures/monorepo/serviceApp/plugin.js +0 -29
- package/fixtures/monorepo/serviceApp/with-logger/package.json +0 -5
- package/fixtures/monorepo/serviceApp/with-logger/with-logger.cjs +0 -25
- package/fixtures/monorepo/serviceApp/with-logger/with-logger.d.ts +0 -38
- package/fixtures/monorepo/serviceApp/with-logger/with-logger.openapi.json +0 -22
- package/fixtures/monorepo/serviceAppWithLogger/platformatic.service.json +0 -20
- package/fixtures/monorepo/serviceAppWithLogger/plugin.js +0 -20
- package/fixtures/monorepo/serviceAppWithMultiplePlugins/platformatic.service.json +0 -28
- package/fixtures/monorepo/serviceAppWithMultiplePlugins/plugin.js +0 -8
- package/fixtures/monorepo/serviceAppWithMultiplePlugins/plugin2.mjs +0 -5
- package/fixtures/monorepo-missing-dependencies/composer/platformatic.json +0 -24
- package/fixtures/monorepo-openapi/serviceAppWithoutOpenapi/platformatic.service.json +0 -13
- package/fixtures/monorepo-openapi/serviceAppWithoutOpenapi/plugin.js +0 -8
- package/fixtures/monorepo-watch/service1/platformatic.service.json +0 -13
- package/fixtures/monorepo-watch/service1/plugin.js +0 -8
- package/fixtures/monorepo-with-dependencies/main/clients/service-1/package.json +0 -3
- package/fixtures/monorepo-with-dependencies/main/clients/service-1/schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/main/clients/service-2/package.json +0 -3
- package/fixtures/monorepo-with-dependencies/main/clients/service-2/schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/main/external-service.schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/main/platformatic.json +0 -46
- package/fixtures/monorepo-with-dependencies/service-1/clients/service-2/package.json +0 -3
- package/fixtures/monorepo-with-dependencies/service-1/clients/service-2/schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/service-1/external-service.schema.json +0 -204
- package/fixtures/monorepo-with-dependencies/service-1/platformatic.json +0 -29
- package/fixtures/monorepo-with-dependencies/service-2/platformatic.json +0 -15
- package/fixtures/no-env.service.json +0 -25
- package/fixtures/preload/platformatic.runtime.json +0 -15
- package/fixtures/preload/preload.js +0 -1
- package/fixtures/preload/services/a/platformatic.service.json +0 -14
- package/fixtures/preload/services/a/plugin.js +0 -7
- package/fixtures/prom-server/platformatic.json +0 -16
- package/fixtures/prom-server/services/service-1/platformatic.json +0 -13
- package/fixtures/prom-server/services/service-1/plugin.js +0 -8
- package/fixtures/prom-server/services/service-2/platformatic.json +0 -12
- package/fixtures/prom-server/services/service-2/plugin.js +0 -8
- package/fixtures/restart-on-crash/platformatic.runtime.json +0 -14
- package/fixtures/restart-on-crash/services/a/platformatic.service.json +0 -16
- package/fixtures/restart-on-crash/services/a/plugin.js +0 -9
- package/fixtures/sample-runtime/.env +0 -9
- package/fixtures/sample-runtime/package.json +0 -16
- package/fixtures/sample-runtime/platformatic.json +0 -18
- package/fixtures/sample-runtime/services/rival/package.json +0 -16
- package/fixtures/sample-runtime/services/rival/platformatic.json +0 -33
- package/fixtures/sample-runtime/services/rival/routes/root.js +0 -7
- package/fixtures/sample-runtime-with-2-services/.env +0 -10
- package/fixtures/sample-runtime-with-2-services/package.json +0 -16
- package/fixtures/sample-runtime-with-2-services/platformatic.json +0 -18
- package/fixtures/sample-runtime-with-2-services/services/foobar/package.json +0 -16
- package/fixtures/sample-runtime-with-2-services/services/foobar/platformatic.json +0 -18
- package/fixtures/sample-runtime-with-2-services/services/foobar/routes/root.js +0 -7
- package/fixtures/sample-runtime-with-2-services/services/rival/package.json +0 -16
- package/fixtures/sample-runtime-with-2-services/services/rival/platformatic.json +0 -33
- package/fixtures/sample-runtime-with-2-services/services/rival/routes/root.js +0 -7
- package/fixtures/server/logger-transport/custom-transport.js +0 -15
- package/fixtures/server/logger-transport/platformatic.runtime.json +0 -21
- package/fixtures/server/logger-transport/services/echo/platformatic.service.json +0 -12
- package/fixtures/server/logger-transport/services/echo/routes/hello.js +0 -6
- package/fixtures/server/overrides-service/platformatic.runtime.json +0 -18
- package/fixtures/server/overrides-service/services/echo/platformatic.service.json +0 -19
- package/fixtures/server/overrides-service/services/echo/routes/span.js +0 -8
- package/fixtures/server/runtime-server/platformatic.runtime.json +0 -18
- package/fixtures/server/runtime-server/services/echo/platformatic.service.json +0 -12
- package/fixtures/server/runtime-server/services/echo/routes/hello.js +0 -6
- package/fixtures/serviceAppThrowsOnStart/platformatic.service.json +0 -12
- package/fixtures/serviceAppThrowsOnStart/plugin.js +0 -6
- package/fixtures/stackables/node_modules/foo/foo.js +0 -62
- package/fixtures/stackables/node_modules/foo/package.json +0 -4
- package/fixtures/stackables/platformatic.json +0 -11
- package/fixtures/start-command-in-runtime.js +0 -24
- package/fixtures/start-command.js +0 -9
- package/fixtures/starter.js +0 -9
- package/fixtures/stdio/platformatic.service.json +0 -6
- package/fixtures/stdio/plugin.js +0 -24
- package/fixtures/telemetry/platformatic.runtime.json +0 -18
- package/fixtures/telemetry/services/echo/platformatic.service.json +0 -19
- package/fixtures/telemetry/services/echo/routes/span.js +0 -22
- package/fixtures/telemetry/services/service-1/platformatic.service.json +0 -19
- package/fixtures/telemetry/services/service-1/routes/echo.js +0 -7
- package/fixtures/typescript/.env +0 -4
- package/fixtures/typescript/platformatic.runtime.json +0 -11
- package/fixtures/typescript/services/composer/platformatic.composer.json +0 -28
- package/fixtures/typescript/services/movies/.env +0 -4
- package/fixtures/typescript/services/movies/global.d.ts +0 -23
- package/fixtures/typescript/services/movies/migrations/001.do.sql +0 -6
- package/fixtures/typescript/services/movies/migrations/001.undo.sql +0 -3
- package/fixtures/typescript/services/movies/platformatic.db.json +0 -33
- package/fixtures/typescript/services/movies/plugin.ts +0 -5
- package/fixtures/typescript/services/movies/tsconfig.json +0 -21
- package/fixtures/typescript/services/movies/types/Movie.d.ts +0 -9
- package/fixtures/typescript/services/movies/types/index.d.ts +0 -7
- package/fixtures/typescript/services/titles/client/client.d.ts +0 -141
- package/fixtures/typescript/services/titles/client/client.openapi.json +0 -630
- package/fixtures/typescript/services/titles/client/package.json +0 -4
- package/fixtures/typescript/services/titles/platformatic.service.json +0 -31
- package/fixtures/typescript/services/titles/plugins/example.ts +0 -6
- package/fixtures/typescript/services/titles/routes/root.ts +0 -21
- package/fixtures/typescript/services/titles/tsconfig.json +0 -21
- package/fixtures/typescript-custom-flags/.env +0 -4
- package/fixtures/typescript-custom-flags/platformatic.runtime.json +0 -11
- package/fixtures/typescript-custom-flags/services/composer/platformatic.composer.json +0 -28
- package/fixtures/typescript-custom-flags/services/movies/global.d.ts +0 -23
- package/fixtures/typescript-custom-flags/services/movies/migrations/001.do.sql +0 -6
- package/fixtures/typescript-custom-flags/services/movies/migrations/001.undo.sql +0 -3
- package/fixtures/typescript-custom-flags/services/movies/platformatic.db.json +0 -35
- package/fixtures/typescript-custom-flags/services/movies/plugin.ts +0 -5
- package/fixtures/typescript-custom-flags/services/movies/tsconfig.json +0 -20
- package/fixtures/typescript-custom-flags/services/movies/types/Movie.d.ts +0 -9
- package/fixtures/typescript-custom-flags/services/movies/types/index.d.ts +0 -7
- package/fixtures/typescript-custom-flags/services/titles/client/client.d.ts +0 -141
- package/fixtures/typescript-custom-flags/services/titles/client/client.openapi.json +0 -630
- package/fixtures/typescript-custom-flags/services/titles/client/package.json +0 -4
- package/fixtures/typescript-custom-flags/services/titles/platformatic.service.json +0 -33
- package/fixtures/typescript-custom-flags/services/titles/plugins/example.ts +0 -6
- package/fixtures/typescript-custom-flags/services/titles/routes/root.ts +0 -21
- package/fixtures/typescript-custom-flags/services/titles/tsconfig.json +0 -21
- package/fixtures/typescript-no-env/platformatic.runtime.json +0 -11
- package/fixtures/typescript-no-env/services/composer/platformatic.composer.json +0 -28
- package/fixtures/typescript-no-env/services/movies/global.d.ts +0 -23
- package/fixtures/typescript-no-env/services/movies/migrations/001.do.sql +0 -6
- package/fixtures/typescript-no-env/services/movies/migrations/001.undo.sql +0 -3
- package/fixtures/typescript-no-env/services/movies/platformatic.db.json +0 -33
- package/fixtures/typescript-no-env/services/movies/plugin.ts +0 -5
- package/fixtures/typescript-no-env/services/movies/tsconfig.json +0 -21
- package/fixtures/typescript-no-env/services/movies/types/Movie.d.ts +0 -9
- package/fixtures/typescript-no-env/services/movies/types/index.d.ts +0 -7
- package/fixtures/typescript-no-env/services/titles/client/client.d.ts +0 -141
- package/fixtures/typescript-no-env/services/titles/client/client.openapi.json +0 -630
- package/fixtures/typescript-no-env/services/titles/client/package.json +0 -4
- package/fixtures/typescript-no-env/services/titles/platformatic.service.json +0 -31
- package/fixtures/typescript-no-env/services/titles/plugins/example.ts +0 -6
- package/fixtures/typescript-no-env/services/titles/routes/root.ts +0 -21
- package/fixtures/typescript-no-env/services/titles/tsconfig.json +0 -21
|
@@ -1,630 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.3",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Platformatic DB",
|
|
5
|
-
"description": "Exposing a SQL database as REST",
|
|
6
|
-
"version": "1.0.0"
|
|
7
|
-
},
|
|
8
|
-
"components": {
|
|
9
|
-
"schemas": {
|
|
10
|
-
"Movie": {
|
|
11
|
-
"title": "Movie",
|
|
12
|
-
"description": "A Movie",
|
|
13
|
-
"type": "object",
|
|
14
|
-
"properties": {
|
|
15
|
-
"id": {
|
|
16
|
-
"type": "integer"
|
|
17
|
-
},
|
|
18
|
-
"title": {
|
|
19
|
-
"type": "string"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"required": [
|
|
23
|
-
"title"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"paths": {
|
|
29
|
-
"/movies/": {
|
|
30
|
-
"get": {
|
|
31
|
-
"operationId": "getMovies",
|
|
32
|
-
"parameters": [
|
|
33
|
-
{
|
|
34
|
-
"schema": {
|
|
35
|
-
"type": "integer"
|
|
36
|
-
},
|
|
37
|
-
"in": "query",
|
|
38
|
-
"name": "limit",
|
|
39
|
-
"required": false,
|
|
40
|
-
"description": "Limit will be applied by default if not passed. If the provided value exceeds the maximum allowed value a validation error will be thrown"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"schema": {
|
|
44
|
-
"type": "integer"
|
|
45
|
-
},
|
|
46
|
-
"in": "query",
|
|
47
|
-
"name": "offset",
|
|
48
|
-
"required": false
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"schema": {
|
|
52
|
-
"type": "boolean",
|
|
53
|
-
"default": false
|
|
54
|
-
},
|
|
55
|
-
"in": "query",
|
|
56
|
-
"name": "totalCount",
|
|
57
|
-
"required": false
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"schema": {
|
|
61
|
-
"type": "array",
|
|
62
|
-
"items": {
|
|
63
|
-
"type": "string",
|
|
64
|
-
"enum": [
|
|
65
|
-
"id",
|
|
66
|
-
"title"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"in": "query",
|
|
71
|
-
"name": "fields",
|
|
72
|
-
"required": false
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"schema": {
|
|
76
|
-
"type": "integer"
|
|
77
|
-
},
|
|
78
|
-
"in": "query",
|
|
79
|
-
"name": "where.id.eq",
|
|
80
|
-
"required": false
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"schema": {
|
|
84
|
-
"type": "integer"
|
|
85
|
-
},
|
|
86
|
-
"in": "query",
|
|
87
|
-
"name": "where.id.neq",
|
|
88
|
-
"required": false
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"schema": {
|
|
92
|
-
"type": "integer"
|
|
93
|
-
},
|
|
94
|
-
"in": "query",
|
|
95
|
-
"name": "where.id.gt",
|
|
96
|
-
"required": false
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"schema": {
|
|
100
|
-
"type": "integer"
|
|
101
|
-
},
|
|
102
|
-
"in": "query",
|
|
103
|
-
"name": "where.id.gte",
|
|
104
|
-
"required": false
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"schema": {
|
|
108
|
-
"type": "integer"
|
|
109
|
-
},
|
|
110
|
-
"in": "query",
|
|
111
|
-
"name": "where.id.lt",
|
|
112
|
-
"required": false
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"schema": {
|
|
116
|
-
"type": "integer"
|
|
117
|
-
},
|
|
118
|
-
"in": "query",
|
|
119
|
-
"name": "where.id.lte",
|
|
120
|
-
"required": false
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"schema": {
|
|
124
|
-
"type": "integer"
|
|
125
|
-
},
|
|
126
|
-
"in": "query",
|
|
127
|
-
"name": "where.id.like",
|
|
128
|
-
"required": false
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
"schema": {
|
|
132
|
-
"type": "string"
|
|
133
|
-
},
|
|
134
|
-
"in": "query",
|
|
135
|
-
"name": "where.id.in",
|
|
136
|
-
"required": false
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"schema": {
|
|
140
|
-
"type": "string"
|
|
141
|
-
},
|
|
142
|
-
"in": "query",
|
|
143
|
-
"name": "where.id.nin",
|
|
144
|
-
"required": false
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"schema": {
|
|
148
|
-
"type": "string"
|
|
149
|
-
},
|
|
150
|
-
"in": "query",
|
|
151
|
-
"name": "where.title.eq",
|
|
152
|
-
"required": false
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"schema": {
|
|
156
|
-
"type": "string"
|
|
157
|
-
},
|
|
158
|
-
"in": "query",
|
|
159
|
-
"name": "where.title.neq",
|
|
160
|
-
"required": false
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"schema": {
|
|
164
|
-
"type": "string"
|
|
165
|
-
},
|
|
166
|
-
"in": "query",
|
|
167
|
-
"name": "where.title.gt",
|
|
168
|
-
"required": false
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"schema": {
|
|
172
|
-
"type": "string"
|
|
173
|
-
},
|
|
174
|
-
"in": "query",
|
|
175
|
-
"name": "where.title.gte",
|
|
176
|
-
"required": false
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"schema": {
|
|
180
|
-
"type": "string"
|
|
181
|
-
},
|
|
182
|
-
"in": "query",
|
|
183
|
-
"name": "where.title.lt",
|
|
184
|
-
"required": false
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"schema": {
|
|
188
|
-
"type": "string"
|
|
189
|
-
},
|
|
190
|
-
"in": "query",
|
|
191
|
-
"name": "where.title.lte",
|
|
192
|
-
"required": false
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"schema": {
|
|
196
|
-
"type": "string"
|
|
197
|
-
},
|
|
198
|
-
"in": "query",
|
|
199
|
-
"name": "where.title.like",
|
|
200
|
-
"required": false
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"schema": {
|
|
204
|
-
"type": "string"
|
|
205
|
-
},
|
|
206
|
-
"in": "query",
|
|
207
|
-
"name": "where.title.in",
|
|
208
|
-
"required": false
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
"schema": {
|
|
212
|
-
"type": "string"
|
|
213
|
-
},
|
|
214
|
-
"in": "query",
|
|
215
|
-
"name": "where.title.nin",
|
|
216
|
-
"required": false
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
"schema": {
|
|
220
|
-
"type": "array",
|
|
221
|
-
"items": {
|
|
222
|
-
"type": "string"
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
"in": "query",
|
|
226
|
-
"name": "where.or",
|
|
227
|
-
"required": false
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"schema": {
|
|
231
|
-
"type": "string",
|
|
232
|
-
"enum": [
|
|
233
|
-
"asc",
|
|
234
|
-
"desc"
|
|
235
|
-
]
|
|
236
|
-
},
|
|
237
|
-
"in": "query",
|
|
238
|
-
"name": "orderby.id",
|
|
239
|
-
"required": false
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"schema": {
|
|
243
|
-
"type": "string",
|
|
244
|
-
"enum": [
|
|
245
|
-
"asc",
|
|
246
|
-
"desc"
|
|
247
|
-
]
|
|
248
|
-
},
|
|
249
|
-
"in": "query",
|
|
250
|
-
"name": "orderby.title",
|
|
251
|
-
"required": false
|
|
252
|
-
}
|
|
253
|
-
],
|
|
254
|
-
"responses": {
|
|
255
|
-
"200": {
|
|
256
|
-
"description": "Default Response",
|
|
257
|
-
"content": {
|
|
258
|
-
"application/json": {
|
|
259
|
-
"schema": {
|
|
260
|
-
"type": "array",
|
|
261
|
-
"items": {
|
|
262
|
-
"$ref": "#/components/schemas/Movie"
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
"post": {
|
|
271
|
-
"operationId": "createMovie",
|
|
272
|
-
"requestBody": {
|
|
273
|
-
"content": {
|
|
274
|
-
"application/json": {
|
|
275
|
-
"schema": {
|
|
276
|
-
"$ref": "#/components/schemas/Movie"
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
"responses": {
|
|
282
|
-
"200": {
|
|
283
|
-
"description": "Default Response",
|
|
284
|
-
"content": {
|
|
285
|
-
"application/json": {
|
|
286
|
-
"schema": {
|
|
287
|
-
"$ref": "#/components/schemas/Movie"
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
"links": {}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
"put": {
|
|
296
|
-
"operationId": "updateMovies",
|
|
297
|
-
"requestBody": {
|
|
298
|
-
"content": {
|
|
299
|
-
"application/json": {
|
|
300
|
-
"schema": {
|
|
301
|
-
"$ref": "#/components/schemas/Movie"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
"parameters": [
|
|
307
|
-
{
|
|
308
|
-
"schema": {
|
|
309
|
-
"type": "array",
|
|
310
|
-
"items": {
|
|
311
|
-
"type": "string",
|
|
312
|
-
"enum": [
|
|
313
|
-
"id",
|
|
314
|
-
"title"
|
|
315
|
-
]
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
"in": "query",
|
|
319
|
-
"name": "fields",
|
|
320
|
-
"required": false
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
"schema": {
|
|
324
|
-
"type": "integer"
|
|
325
|
-
},
|
|
326
|
-
"in": "query",
|
|
327
|
-
"name": "where.id.eq",
|
|
328
|
-
"required": false
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"schema": {
|
|
332
|
-
"type": "integer"
|
|
333
|
-
},
|
|
334
|
-
"in": "query",
|
|
335
|
-
"name": "where.id.neq",
|
|
336
|
-
"required": false
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"schema": {
|
|
340
|
-
"type": "integer"
|
|
341
|
-
},
|
|
342
|
-
"in": "query",
|
|
343
|
-
"name": "where.id.gt",
|
|
344
|
-
"required": false
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"schema": {
|
|
348
|
-
"type": "integer"
|
|
349
|
-
},
|
|
350
|
-
"in": "query",
|
|
351
|
-
"name": "where.id.gte",
|
|
352
|
-
"required": false
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
"schema": {
|
|
356
|
-
"type": "integer"
|
|
357
|
-
},
|
|
358
|
-
"in": "query",
|
|
359
|
-
"name": "where.id.lt",
|
|
360
|
-
"required": false
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
"schema": {
|
|
364
|
-
"type": "integer"
|
|
365
|
-
},
|
|
366
|
-
"in": "query",
|
|
367
|
-
"name": "where.id.lte",
|
|
368
|
-
"required": false
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
"schema": {
|
|
372
|
-
"type": "integer"
|
|
373
|
-
},
|
|
374
|
-
"in": "query",
|
|
375
|
-
"name": "where.id.like",
|
|
376
|
-
"required": false
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
"schema": {
|
|
380
|
-
"type": "string"
|
|
381
|
-
},
|
|
382
|
-
"in": "query",
|
|
383
|
-
"name": "where.id.in",
|
|
384
|
-
"required": false
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
"schema": {
|
|
388
|
-
"type": "string"
|
|
389
|
-
},
|
|
390
|
-
"in": "query",
|
|
391
|
-
"name": "where.id.nin",
|
|
392
|
-
"required": false
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
"schema": {
|
|
396
|
-
"type": "string"
|
|
397
|
-
},
|
|
398
|
-
"in": "query",
|
|
399
|
-
"name": "where.title.eq",
|
|
400
|
-
"required": false
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
"schema": {
|
|
404
|
-
"type": "string"
|
|
405
|
-
},
|
|
406
|
-
"in": "query",
|
|
407
|
-
"name": "where.title.neq",
|
|
408
|
-
"required": false
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
"schema": {
|
|
412
|
-
"type": "string"
|
|
413
|
-
},
|
|
414
|
-
"in": "query",
|
|
415
|
-
"name": "where.title.gt",
|
|
416
|
-
"required": false
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
"schema": {
|
|
420
|
-
"type": "string"
|
|
421
|
-
},
|
|
422
|
-
"in": "query",
|
|
423
|
-
"name": "where.title.gte",
|
|
424
|
-
"required": false
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
"schema": {
|
|
428
|
-
"type": "string"
|
|
429
|
-
},
|
|
430
|
-
"in": "query",
|
|
431
|
-
"name": "where.title.lt",
|
|
432
|
-
"required": false
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
"schema": {
|
|
436
|
-
"type": "string"
|
|
437
|
-
},
|
|
438
|
-
"in": "query",
|
|
439
|
-
"name": "where.title.lte",
|
|
440
|
-
"required": false
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
"schema": {
|
|
444
|
-
"type": "string"
|
|
445
|
-
},
|
|
446
|
-
"in": "query",
|
|
447
|
-
"name": "where.title.like",
|
|
448
|
-
"required": false
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
"schema": {
|
|
452
|
-
"type": "string"
|
|
453
|
-
},
|
|
454
|
-
"in": "query",
|
|
455
|
-
"name": "where.title.in",
|
|
456
|
-
"required": false
|
|
457
|
-
},
|
|
458
|
-
{
|
|
459
|
-
"schema": {
|
|
460
|
-
"type": "string"
|
|
461
|
-
},
|
|
462
|
-
"in": "query",
|
|
463
|
-
"name": "where.title.nin",
|
|
464
|
-
"required": false
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
"schema": {
|
|
468
|
-
"type": "array",
|
|
469
|
-
"items": {
|
|
470
|
-
"type": "string"
|
|
471
|
-
}
|
|
472
|
-
},
|
|
473
|
-
"in": "query",
|
|
474
|
-
"name": "where.or",
|
|
475
|
-
"required": false
|
|
476
|
-
}
|
|
477
|
-
],
|
|
478
|
-
"responses": {
|
|
479
|
-
"200": {
|
|
480
|
-
"description": "Default Response",
|
|
481
|
-
"content": {
|
|
482
|
-
"application/json": {
|
|
483
|
-
"schema": {
|
|
484
|
-
"type": "array",
|
|
485
|
-
"items": {
|
|
486
|
-
"$ref": "#/components/schemas/Movie"
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
},
|
|
491
|
-
"links": {}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
},
|
|
496
|
-
"/movies/{id}": {
|
|
497
|
-
"get": {
|
|
498
|
-
"operationId": "getMovieById",
|
|
499
|
-
"parameters": [
|
|
500
|
-
{
|
|
501
|
-
"schema": {
|
|
502
|
-
"type": "array",
|
|
503
|
-
"items": {
|
|
504
|
-
"type": "string",
|
|
505
|
-
"enum": [
|
|
506
|
-
"id",
|
|
507
|
-
"title"
|
|
508
|
-
]
|
|
509
|
-
}
|
|
510
|
-
},
|
|
511
|
-
"in": "query",
|
|
512
|
-
"name": "fields",
|
|
513
|
-
"required": false
|
|
514
|
-
},
|
|
515
|
-
{
|
|
516
|
-
"schema": {
|
|
517
|
-
"type": "integer"
|
|
518
|
-
},
|
|
519
|
-
"in": "path",
|
|
520
|
-
"name": "id",
|
|
521
|
-
"required": true
|
|
522
|
-
}
|
|
523
|
-
],
|
|
524
|
-
"responses": {
|
|
525
|
-
"200": {
|
|
526
|
-
"description": "Default Response",
|
|
527
|
-
"content": {
|
|
528
|
-
"application/json": {
|
|
529
|
-
"schema": {
|
|
530
|
-
"$ref": "#/components/schemas/Movie"
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
},
|
|
534
|
-
"links": {}
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
},
|
|
538
|
-
"put": {
|
|
539
|
-
"operationId": "updateMovie",
|
|
540
|
-
"requestBody": {
|
|
541
|
-
"content": {
|
|
542
|
-
"application/json": {
|
|
543
|
-
"schema": {
|
|
544
|
-
"$ref": "#/components/schemas/Movie"
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
},
|
|
549
|
-
"parameters": [
|
|
550
|
-
{
|
|
551
|
-
"schema": {
|
|
552
|
-
"type": "array",
|
|
553
|
-
"items": {
|
|
554
|
-
"type": "string",
|
|
555
|
-
"enum": [
|
|
556
|
-
"id",
|
|
557
|
-
"title"
|
|
558
|
-
]
|
|
559
|
-
}
|
|
560
|
-
},
|
|
561
|
-
"in": "query",
|
|
562
|
-
"name": "fields",
|
|
563
|
-
"required": false
|
|
564
|
-
},
|
|
565
|
-
{
|
|
566
|
-
"schema": {
|
|
567
|
-
"type": "integer"
|
|
568
|
-
},
|
|
569
|
-
"in": "path",
|
|
570
|
-
"name": "id",
|
|
571
|
-
"required": true
|
|
572
|
-
}
|
|
573
|
-
],
|
|
574
|
-
"responses": {
|
|
575
|
-
"200": {
|
|
576
|
-
"description": "Default Response",
|
|
577
|
-
"content": {
|
|
578
|
-
"application/json": {
|
|
579
|
-
"schema": {
|
|
580
|
-
"$ref": "#/components/schemas/Movie"
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
},
|
|
584
|
-
"links": {}
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
"delete": {
|
|
589
|
-
"operationId": "deleteMovies",
|
|
590
|
-
"parameters": [
|
|
591
|
-
{
|
|
592
|
-
"schema": {
|
|
593
|
-
"type": "array",
|
|
594
|
-
"items": {
|
|
595
|
-
"type": "string",
|
|
596
|
-
"enum": [
|
|
597
|
-
"id",
|
|
598
|
-
"title"
|
|
599
|
-
]
|
|
600
|
-
}
|
|
601
|
-
},
|
|
602
|
-
"in": "query",
|
|
603
|
-
"name": "fields",
|
|
604
|
-
"required": false
|
|
605
|
-
},
|
|
606
|
-
{
|
|
607
|
-
"schema": {
|
|
608
|
-
"type": "integer"
|
|
609
|
-
},
|
|
610
|
-
"in": "path",
|
|
611
|
-
"name": "id",
|
|
612
|
-
"required": true
|
|
613
|
-
}
|
|
614
|
-
],
|
|
615
|
-
"responses": {
|
|
616
|
-
"200": {
|
|
617
|
-
"description": "Default Response",
|
|
618
|
-
"content": {
|
|
619
|
-
"application/json": {
|
|
620
|
-
"schema": {
|
|
621
|
-
"$ref": "#/components/schemas/Movie"
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://schemas.platformatic.dev/@platformatic/service/1.52.0.json",
|
|
3
|
-
"server": {
|
|
4
|
-
"hostname": "{PLT_SERVER_HOSTNAME}",
|
|
5
|
-
"port": "{PORT}",
|
|
6
|
-
"logger": {
|
|
7
|
-
"level": "{PLT_SERVER_LOGGER_LEVEL}"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"service": {
|
|
11
|
-
"openapi": true
|
|
12
|
-
},
|
|
13
|
-
"plugins": {
|
|
14
|
-
"paths": [
|
|
15
|
-
{
|
|
16
|
-
"path": "./plugins",
|
|
17
|
-
"encapsulate": false
|
|
18
|
-
},
|
|
19
|
-
"./routes"
|
|
20
|
-
],
|
|
21
|
-
"typescript": false
|
|
22
|
-
},
|
|
23
|
-
"clients": [
|
|
24
|
-
{
|
|
25
|
-
"schema": "client/client.openapi.json",
|
|
26
|
-
"name": "client",
|
|
27
|
-
"type": "openapi",
|
|
28
|
-
"serviceId": "movies"
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="@platformatic/service" />
|
|
2
|
-
/// <reference types="../client" />
|
|
3
|
-
import { FastifyInstance, FastifyPluginOptions } from 'fastify'
|
|
4
|
-
|
|
5
|
-
declare module 'fastify' {
|
|
6
|
-
interface FastifyInstance {
|
|
7
|
-
example: string
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default async function (fastify: FastifyInstance, opts: FastifyPluginOptions) {
|
|
12
|
-
fastify.get('/', async (request, reply) => {
|
|
13
|
-
return { hello: fastify.example }
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
fastify.get('/titles', async (request, reply) => {
|
|
17
|
-
const movies = await fastify.client.getMovies({})
|
|
18
|
-
const titles = movies.map((movie) => movie.title)
|
|
19
|
-
return { titles }
|
|
20
|
-
})
|
|
21
|
-
}
|