Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
brjohnstmsft opened this issue Nov 5, 2015 · 1 comment
Closed
Labels

Comments

@brjohnstmsft
Copy link
Member

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.

@brjohnstmsft
Copy link
Member Author

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

brjohnstmsft added a commit to brjohnstmsft/autorest that referenced this issue Nov 6, 2015
Issue: Azure#456

Previously the discriminator property name was hard-coded to 'dtype'. It
looks like the property used in the tests was mistaken for a convention, so
I renamed it to 'fishtype' to make it obvious that it is specific to the
test data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants