(ts) reference tsconfig.json in schema generator so it picks up the ~ import alias

it didn’t generate a schema for Category, so it passed even on wrong configuration
This commit is contained in:
Valentyne Stigloher 2025-04-19 12:16:41 +02:00
parent 6e636f4288
commit 8f6c1cb04f
3 changed files with 34 additions and 12 deletions

View File

@ -11,6 +11,7 @@ const __dirname = new URL('.', import.meta.url).pathname;
const generateConfigJsonSchema = async () => { const generateConfigJsonSchema = async () => {
const schema = createGenerator({ const schema = createGenerator({
path: `${__dirname}/config.ts`, path: `${__dirname}/config.ts`,
tsconfig: `${__dirname}/../tsconfig.json`,
strictTuples: true, strictTuples: true,
markdownDescription: true, markdownDescription: true,
// speed up schema generation; type checking happens separately // speed up schema generation; type checking happens separately

View File

@ -154,17 +154,36 @@ terminology:
enabled: true enabled: true
published: true published: true
categories: categories:
- 'Orientamento sessuale' -
- 'Orientamento romantico' key: 'sexual orientation'
- 'Orientamento terziario' text: 'Orientamento sessuale'
- 'Genere' -
- 'Espressione di genere' key: 'romantic orientation'
- 'Modello di relazione' text: 'Orientamento romantico'
- 'Lingua' -
- 'Attrazione' key: 'tertiary orientation'
- 'Politica' text: 'Orientamento terziario'
- 'Pregiudizio' -
key: 'gender'
text: 'Genere'
-
key: 'gender expression'
text: 'Espressione di genere'
-
key: 'relationship model'
text: 'Modello di relazione'
-
key: 'language'
text: 'Lingua'
-
key: 'attraction'
text: 'Attrazione'
-
key: 'politics'
text: 'Politica'
-
key: 'prejudice'
text: 'Pregiudizio'
route: 'Terminologia' route: 'Terminologia'
names: names:

View File

@ -158,7 +158,9 @@ terminology:
- -
key: 'politică' key: 'politică'
text: 'politică' text: 'politică'
- 'prejudiciu' -
key: 'prejudiciu'
text: 'prejudiciu'
route: 'terminologie' route: 'terminologie'