Closed gurumaxi closed 1 year ago
@gurumaxi Sorry I had to remove it as it caused a bug in tuples.
Working on it right now, I have found another lead that's interesting (providing extension
in options). Will probably happen in 2.8 !
@gurumaxi Since 2.8.0, json-schema-to-ts
exposes ExtendedJSONSchema
and FromExtendedJSONSchema
types just for that 🥳
See docs: https://github.com/ThomasAribart/json-schema-to-ts#extensions
I am specifying my mongodb database model via json schema including bsonType attributes (e.g.
objectId
anddate
). To generate a typescript type from this schema, I am usingFromSchema
and I deserialize the bsonType fields to strings via the deserialize array. With version 2.7.2 this is not working anymore. For every bsonType field, the errorProperty 'xxx' is incompatible with index signature
appears. How can I achieve the previous behaviour with version 2.7.2?