Closed ak99372 closed 4 years ago
Not sure if this is intended but following schema
"ApplicationInfoResult": { "type": "object", "properties": { "Name": { "type": "string" }, "Authentication": { "type": "object", "properties": { "base": { "required": true, "type": "boolean" }, "advanced": { "required": true, "type": "boolean" }, "pro": { "required": true, "type": "boolean" } } } }, "required": [ "Version", "Name", "Authentication" ] }
Generates:
export interface ApplicationInfoResult { Authentication: { 'base'?: boolean, 'advanced'?: boolean, 'pro'?: boolean }; Name: string; }
Notice the child properties defined through string 'keys' (which shouldn't be necessary) plus while all are required they are flagged as optional (?)
There's no practical difference between {a: string} and {'a': string}. So, I don't see the point. Also, the properties are optional because they are not listed in a required array.
{a: string}
{'a': string}
required
Not sure if this is intended but following schema
Generates:
Notice the child properties defined through string 'keys' (which shouldn't be necessary) plus while all are required they are flagged as optional (?)