Skip to content

Commit

Permalink
Return $metadata resource as odata + openapi spec
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
fisehara committed Mar 14, 2022
1 parent 9523257 commit 7e03cea
Show file tree
Hide file tree
Showing 6 changed files with 360 additions and 141 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
"memoizee": "^0.4.15",
"pinejs-client-core": "^6.10.0",
"randomstring": "^1.2.2",
"typed-error": "^3.2.1"
"typed-error": "^3.2.1",
"odata-openapi": "^0.12.0"
},
"devDependencies": {
"@balena/lint": "^6.2.0",
Expand Down
1 change: 0 additions & 1 deletion src/database-layer/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ if (maybePg != null) {
config.keepAlive ??= env.db.keepAlive;
// @ts-expect-error maxLifetimeSeconds is valid for PgPool but isn't currently in the typings
config.maxLifetimeSeconds ??= env.db.maxLifetimeSeconds;
// @ts-expect-error maxUses is valid for PgPool but isn't currently in the typings
config.maxUses ??= env.db.maxUses;
const p = new pg.Pool(config);
if (PG_SCHEMA != null) {
Expand Down
Loading

0 comments on commit 7e03cea

Please sign in to comment.