-
How would you come about using Date with the OneOf decorator? No matter what I tried I couldn't get it to produce the correct schema. @OneOf(Date, OtherType)
@Optional()
property?: Date | OtherType; The example above doesn't work, it just treats Date as an object. How can you create a |
Beta Was this translation helpful? Give feedback.
Answered by
Romakita
Jan 6, 2023
Replies: 1 comment
-
It’s always possible to set custom raw jsonschema Using a plain object js or using schema builder: import {date, OneOf) from "@tsed/schema";
@OneOf(date(), OtherType) Any decorator should also works see you |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
janek515
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It’s always possible to set custom raw jsonschema Using a plain object js or using schema builder:
Any decorator should also works
@Any(Date, Type)
.see you
Romain