Skip to content

Add hi, pl, ko to JSON Schema language maps#43

Merged
hasaneyldrm merged 1 commit into
hasaneyldrm:mainfrom
umutcakirai:schema-add-missing-languages
Jul 16, 2026
Merged

Add hi, pl, ko to JSON Schema language maps#43
hasaneyldrm merged 1 commit into
hasaneyldrm:mainfrom
umutcakirai:schema-add-missing-languages

Conversation

@umutcakirai

Copy link
Copy Markdown
Contributor

Problem

data/exercises.schema.json was added in a081e72, before the Hindi (73b0c68) and Polish/Korean (118e4bd) instructions landed. It was never updated, so languageMap and languageStepsMap still declare only six languages:

required: [en, es, it, tr, ru, zh]

Meanwhile all 1,324 records ship nine languages, and the README documents nine.

Because both maps set additionalProperties, hi / pl / ko were accepted but never validated or required — so a record silently missing them still passed validation. The schema couldn't catch the exact regression it exists to catch.

Change

Declare all nine languages in properties and required for both languageMap and languageStepsMap. Data files are untouched.

Verification

With jsonschema (Draft 2020-12), against the real data/exercises.json:

Check Result
1,324 real records vs. updated schema 0 errors
Record missing hi/pl/ko vs. old schema 0 errors — silently accepted
Record missing hi/pl/ko vs. new schema 6 errors — now caught
instructions.ru set to a non-string still rejected

No behavior change for consumers already producing complete records; the schema now simply matches what the dataset and README already promise.

The schema was added before the Hindi (73b0c68) and Polish/Korean
(118e4bd) instructions landed, so languageMap and languageStepsMap
still only declared en, es, it, tr, ru, zh.

All 1,324 records carry all nine languages and the README documents
nine, but `additionalProperties` let hi/pl/ko through unvalidated and
unrequired — a record silently missing them still passed validation.

Declare all nine in `properties` and `required` for both maps.
Verified: the 1,324 records validate cleanly against the updated
schema, and a record missing hi/pl/ko is now rejected.
@hasaneyldrm
hasaneyldrm merged commit daceea8 into hasaneyldrm:main Jul 16, 2026
rarhs added a commit to rarhs/exercises-dataset that referenced this pull request Jul 16, 2026
Adds instructions.bn and instruction_steps.bn to all 1,324 records in
both data/exercises.json and the EXERCISES blob in index.html, registers
Bengali in the browser UI language tabs, and updates the README
(language count 10 -> 11, schema table, sample record, usage examples).

Following the precedent of hasaneyldrm#43/hasaneyldrm#44, bn is added to the JSON Schema
language maps as a required language.

Also adds the instructions_fr / instructions_bn columns to the SQL
templates and insert generator in setup.html — the French PR (hasaneyldrm#44) had
updated the LLM prompt but not the SQL generation, so generated SQL
silently dropped French text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants