glideapps / glideapps/quicktype

Schema flag for folders incorrectly treats "*.schema.json" files

Open
#1,278 8 comments 12 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
13.9k
Forks
1.2k
Avg merge
8h 53m
Merged PRs (30d)
369

Description

When using the `--schema` option with a folder with schema files, quicktype will treat files with the `.schema.json` or `.json` extension like normal JSON files, not as schema files.

That is to say, it will generate code for `id`, `$schema` etc. properties in the JSON files, and not treat them as schema files.

We have only been able to work around this by naming the files with a ".schema" extension, which makes quicktype behave correctly, but which isn't the convention for naming JSON schema files, and is not supported by default in many editors.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.