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
Node.js doesn't honor x-ms-enum values field #2706
Comments
I spoke with @amarzavery about this and he said it was a pretty easy fix. It sounds like it should be fixed in the next sprint. |
The current version 'version: 2.0.4283; node: v12.4.0', throws exceptions: "Values specified by 'enum' mismatch those specified by 'x-ms-enum' (name: 'Reason'): 'AccountNameInvalid', 'AlreadyExists' vs '0', '1'" When processing: https://github.com/OzBob/autorest/blob/master/Samples/1d-common-settings/base/folder/generated/AwesomeNamespace.json |
According to here there is a
values
collection supported on enums, for specifying doc-strings for the individual enum values (among other things). But the generated Node code doesn't actually use these doc strings at all.For example, this snippet of Swagger (from the Azure Batch swagger specification):
But in Node, we don't actually define the enums anywhere, so this extra documentation gets lost, which is unfortunate because in some of the strongly typed languages (i.e. C#) this is correctly rendered onto the generated enums and makes the experience for the customer significantly better.
Python has a similar issue, but in Python there is a place to put the docs: See #2704
The text was updated successfully, but these errors were encountered: