#Help in writing recursive object validation

11 messages · Page 1 of 1 (latest)

rich crystal
#

How do I write validations for expression1 and expression2?

lament slate
#

Can you elaborate?

rich crystal
#

I mean how do I write valodation decorators in this case

#

Since 2 types are nested

#

And can be of 4 possible types

lament slate
#

Probably a raw def. I don't know how well swagger handles recursive types

rich crystal
#

Currently Im using a custom vallidator

lament slate
#

Swagger and validation are two different things

rich crystal
#

Just want to know of theres a better way

rich crystal
lament slate
#

With class-validator you'll need a custom validator to handle that