Usage of discriminators is already supported by our code generation engine. We are happy to announce that now support for using discriminators has also been added to Node.
- Discriminator is a field that is used to differentiate between a parent model and models that inherit from it.
- The response is deserialized into the parent model or one of its child classes by inspecting the discriminator field's value in the response.
- Using a discriminator field, you can build leaner models by not having to build unions of fields needed by a polymorphic response.
Please generate your SDK again if you want to use this feature.