Skip to content

Commit b0c247c

Browse files
fabiovincenziJamieSlomekriswestjescalada
authored
refactor: migrate configuration system from JSON Schema to QuickType (finos#1140)
* feat: create zod schema for config * refactor: migrate config loader to Zod * refactor: integrate Zod-based loader and pass config to services * chore: ignore jsonschema in unused deps check * fix: fix config schema * feat: migrate configuration system from JSON Schema validation to QuickType * fix: fix failing tests * chore: remove unused deps * fix: fix types checks errors * feat: add banner on top of auto-generated types * test: add tests for proxy * test: increase tes coverage * test: increase tes coverage * test: increase test coverage for generated config * test: increase test coverage for config * test: increase test coverage * test: increase test coverage * refactor: remove unused variables * chore: remove unused jsonschema dependency * fix: instantiate Proxy class in tests instead of using class directly * feat: add ci step for generate-config-types check * chore: remove jsonschema * style: fun format * fix: add prettier formatting to generate-config-types script * test: add test for default config * chore: use deprecated annotation for ssl paths * chore: re generate config types --------- Co-authored-by: Jamie Slome <jamie.slome@citi.com> Co-authored-by: Kris West <kristopher.west@natwest.com> Co-authored-by: Juan Escalada <97265671+jescalada@users.noreply.github.com>
1 parent 6c516a3 commit b0c247c

File tree

16 files changed

+2480
-251
lines changed

16 files changed

+2480
-251
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@
5858
"react": {
5959
"version": "detect"
6060
}
61-
}
61+
},
62+
"ignorePatterns": ["src/config/generated/config.ts"]
6263
}

.github/workflows/lint.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,11 @@ jobs:
3838
3939
- name: Check formatting
4040
run: npm run format:check
41+
42+
- name: Check generated config types are up-to-date
43+
run: |
44+
npm run generate-config-types
45+
if ! git diff --exit-code src/config/generated/config.ts; then
46+
echo "Generated config types are out of date. Run 'npm run generate-config-types' locally and commit the changes."
47+
exit 1
48+
fi

.github/workflows/unused-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
node-version: '22.x'
2222
- name: 'Run depcheck'
2323
run: |
24-
npx depcheck --skip-missing --ignores="tsx,@babel/*,@commitlint/*,eslint,eslint-*,husky,mocha,ts-mocha,ts-node,concurrently,nyc,prettier,typescript,tsconfig-paths,vite-tsconfig-paths,history,@types/domutils"
24+
npx depcheck --skip-missing --ignores="tsx,@babel/*,@commitlint/*,eslint,eslint-*,husky,mocha,ts-mocha,ts-node,concurrently,nyc,prettier,typescript,tsconfig-paths,vite-tsconfig-paths,@types/sinon,quicktype,history,@types/domutils"
2525
echo $?
2626
if [[ $? == 1 ]]; then
2727
echo "Unused dependencies or devDependencies found"

config.schema.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@
149149
},
150150
"required": ["enabled", "key", "cert"]
151151
},
152+
"sslKeyPemPath": {
153+
"description": "Deprecated: Path to SSL private key file (use tls.key instead)",
154+
"type": "string",
155+
"deprecated": true
156+
},
157+
"sslCertPemPath": {
158+
"description": "Deprecated: Path to SSL certificate file (use tls.cert instead)",
159+
"type": "string",
160+
"deprecated": true
161+
},
152162
"configurationSources": {
153163
"enabled": { "type": "boolean" },
154164
"reloadIntervalSeconds": { "type": "number" },

0 commit comments

Comments
 (0)