Files
CoqDecks/server/generate-validators.sh
Gareth Latty 9b75e479df Overhaul of the config system.
Resolve #98: Switch to a patch based config system.
Resolve #99: Allow users to view configuration to start new games.
Resolve #21: Check for a sane number of responses.
2020-02-07 03:17:01 +00:00

19 lines
534 B
Bash

set -e
# Ugly hack to get around issues with typescript-json-validator.
npx typescript-json-validator src/ts/action/validation.ts \
--collection \
--noExtraProps \
--format=full \
--aliasRefs \
--ignoreErrors \
--usedNamedExport
sed -i \
-e 's/allErrors: true/allErrors: false/g' \
-e 's/<any>//g' \
-e 's/\/\* tslint:disable \*\//\/\* eslint-disable \*\//g' \
-e 's/ajv.addMetaSchema(require("\(.*\)"));/import metaSchema from "\1";\najv.addMetaSchema(metaSchema);/g' \
src/ts/action/validation.validator.ts