test: sync open api spec (#9687)

test: sync spec file
This commit is contained in:
Jason Rasmussen
2024-05-23 07:40:57 -04:00
committed by GitHub
parent a5e8b451b2
commit e7aa50425c
9 changed files with 45 additions and 16 deletions

View File

@@ -24,7 +24,8 @@ function typescript {
npm --prefix typescript-sdk ci && npm --prefix typescript-sdk run build
}
node ./bin/sync-spec-version.js
# requires server to be built
npm run sync:open-api --prefix=../server
if [[ $1 == 'dart' ]]; then
dart

View File

@@ -1,9 +0,0 @@
const spec = require('../immich-openapi-specs.json');
const pkg = require('../../server/package.json');
const path = require('path');
const fs = require('fs');
spec.info.version = pkg.version;
fs.writeFileSync(
path.join(__dirname, '../immich-openapi-specs.json'),
JSON.stringify(spec, null, 2)
);