Closed DavidFaizulaev closed 5 years ago
discriminator
support was never implemented. #241 is for tracking this.
@whitlockjc , thank you for the reply, do you believe adding support for discriminator
is possible in a relatively short amount of time? I saw that the project is using schema from 'http://json-schema.org/draft-04/schema' and that discriminator is configured as a String, do you know of any json-schema that has the discriminator
configured properly?
Also, I saw the sway
project, does it have support for discriminator
?
The discriminator
in OAS is very complex to implement. It seems simple but since any model can have a discriminator, you have to walk a schema and its referenced/sub schemas and basically turn them into an anyOf
. It's quite complex. sway
is where the current work is happening since swagger-tools
is deprecated (See #335).
Hello,
I'm trying to use
discriminator
but when the validation occurs, it gets the discriminator name, and that's it, I does not get the relevant object.For example
The schema gets
payment_method_type
as String - for example it equalsCrypto
but it does not get the definition ofCrypto
and compares the request to this object.Please advise.