glideapps / glideapps/quicktype
How to *not* "Detect integers in strings" when using quicktype as a library
- Dominant language
- TypeScript
- Stars
- 13.9k
- Forks
- 1.2k
- Avg merge
- 8h 53m
- Merged PRs (30d)
- 369
Description
I am using `quicktype-core` as a library in my app.
My code looks like:
```
const qtInputData = new InputData();
const qtData = { name: 'SomeName', samples: [jsonString] }
const qtMagic = () => jsonInputForTargetLanguage(new JSONSchemaTargetLanguage(), undefined, false)
qtInputData.addSourceSync("json", qtData, qtMagic)
const qtResult = quicktypeMultiFileSync({
lang: new JSONSchemaTargetLanguage(),
inputData: qtInputData
});
const schema = combineRenderResults(qtResult).lines.join('')
```
Downstream I have a few consumers of the schema. None of them understand `{"type": "string", "format": "integer"}`.
How can I stop quicktype from detecting integers in strings?
Contributor guide
Assessment
This issue has not been assessed yet.