Closed NikitaIT closed 2 years ago
You forgot type: "object"
before properties
@NikitaIT sorry I didn't respond earlier. I'm not so sure to want to resolve this issue.
From the spec (and the comment in your linked stack overflow page), type Dog
should be a union: { balance, ... } | string | null | boolean | number | unknown[]
. Which is not much better than unknown
, and would increase type computations and reduce performances.
Use case: does-json-schema-to-ts-work-on-json-file-schemas
Look at: schema-object-without-a-type-attribute-in-swagger-2-0