autorest icon indicating copy to clipboard operation
autorest copied to clipboard

(Ruby) Polymorphic code hard-codes discriminator value to 'dtype'

Open bitsforthought opened this issue 11 years ago • 1 comments

The generated code for Ruby doesn't consult the model's "discriminator" property to determine the name of the polymorphic discriminator property. Instead, it hard-codes "dtype". You can repro this by modifying the polymorphic example in the TestServer to use a discriminator called something like "fishtype" instead of "dtype", and then running the Ruby tests.

bitsforthought avatar Nov 05 '15 23:11 bitsforthought

I'm going to take a stab at fixing this myself.

bitsforthought avatar Nov 05 '15 23:11 bitsforthought