Return values should be renameable
The naming of results is not so intuitive, e.g. list result becomes result.body.value which was result.StorageAccounts before. Allowing us to override value to be StorageAccounts (or any other value) would make this API a lot more clear.
Acceptance
APPROVED FOR CONSIDERATION AND DESIGN DEBATE
- Add swagger extension for client parameter/property called 'x-ms-client-name' which controls the publicly presented name for the property
- Support this extension in swagger generator for list types
- When present, swagger modeler shoudl use the name from the extension, and copy the wire name
- Add acceptance tests with renaming
One more consideration to include here: enable override for more than list property names. We should be able to override the property name for any schema member. This would be similar in style/design to the json serialization markup in C#:
[JsonValue("**assemblyClrName**")]
[PropertyBinding]
[Documentation("Gets or sets the name of the assembly.")]
public string **Name** { get; set; }
The above shows that the json value for a property is "assemblyClrName" but the property name in generated code is just "Name"
Here's a duplicate issue with even more scenarios where this would be useful: https://github.com/Azure/autorest/issues/316
@brjohnstmsft thanks for linking this issue. I couldn't find it.