Skip to content

Commit 7e03cea

Browse files
committed
Return $metadata resource as odata + openapi spec
Returning odata and openapi specs in json format. Specs are scoped to the request permissions. Different users (roles) will receive different metadata endpoints and resources. Change-type: minor Signed-off-by: Harald Fischer <harald@balena.io>
1 parent 9523257 commit 7e03cea

File tree

6 files changed

+360
-141
lines changed

6 files changed

+360
-141
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
"memoizee": "^0.4.15",
5757
"pinejs-client-core": "^6.10.0",
5858
"randomstring": "^1.2.2",
59-
"typed-error": "^3.2.1"
59+
"typed-error": "^3.2.1",
60+
"odata-openapi": "^0.12.0"
6061
},
6162
"devDependencies": {
6263
"@balena/lint": "^6.2.0",

src/database-layer/db.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ if (maybePg != null) {
475475
config.keepAlive ??= env.db.keepAlive;
476476
// @ts-expect-error maxLifetimeSeconds is valid for PgPool but isn't currently in the typings
477477
config.maxLifetimeSeconds ??= env.db.maxLifetimeSeconds;
478-
// @ts-expect-error maxUses is valid for PgPool but isn't currently in the typings
479478
config.maxUses ??= env.db.maxUses;
480479
const p = new pg.Pool(config);
481480
if (PG_SCHEMA != null) {

0 commit comments

Comments
 (0)