typescript-json-schema
typescript-json-schema copied to clipboard
Record or custom implemented Record not handled
Hi,
Here a small example :
interface Truc {
name: string
}
interface Test {
myKey: Record<string, Truc>
}
That gives :
{
"type": "object",
"properties": {
"myKey": {
"$ref": "#/definitions/Record<string,Truc>"
}
},
"required": [
"myKey"
],
"definitions": {
"Record<string,Truc>": {
"type": "object"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
- The definition name is very ugly (but why not ...)
- The definition is "object", nothing else. I have no more details.
Do you know why ?
Note : same problem with
interface Dictionary<T> {
[key: string]: T
}
interface Truc {
name: string
}
interface Test {
myKey: Dictionary<Truc>
}
Thanks. Regards