glideapps / glideapps/quicktype

Is the --no-combine-classes switch broken ?

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

Description

Hi,

I have a very simple json file.

When using the online tool (app.quicktype.io), I can use the "Merge Similar Classes" toggle button to customise my output (json to code). However, when trying to do the same from the command line, the "--no-combine-classes" switch has no effect and quicktype always leads to merging.

quicktype -t Trade c:\temp\Trade.json --lang cs --array-type list --features complete --no-combine-classes -o c:\temp\cs\Trade.cs

As an example, with the json snippet below, online, I can toggle between merging the 'Rate' and 'Amount' generated classes.

Via the 'quicktype' command line, these two classes are always merged into a 'Rate' class.
Am I using the correct switch (--no-combine-classes) and in the correct manner?

Many thanks,
Best.

{
"body": {
"name": "Bob",
"info": {
"tradeDate": "2019-01-24"
},
"product": {
"legs": [{
"schedule": {
"currency": "GBP",
"amount": {
"initialValue": 1000000.0
}
},
"calculation": {
"dayCount": "Act/365F",
"rate": {
"initialValue": 0.012
}
}
}, {
"schedule": {
"currency": "GBP",
"amount": {
"initialValue": 1000000.0
}
},
"calculation": {
"dayCount": "Act/365F",
"rate": {
"initialValue": 0.012
}
}
}]
}
}
}

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.