Bruce Johnston
Bruce Johnston
I tried this out myself with AutoRest 0.15.0, and here's what I found: - The generated code for `ServiceRequest` types `ExtendedData` as `object`, not as `IDictionary`. - Both `SafeJsonConvert` and...
I've confirmed that this problem is caused by the `ReadOnlyJsonContractResolver`. Here is a minimal repro: ``` csharp using Microsoft.Rest.Serialization; using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json; namespace JsonAnonymousRepro { [TestClass] public class UnitTest1...
Whether the Swagger contains `additionalProperties` or not is a red herring. The core issue is that `ReadOnlyContractResolver` prevents anonymously-typed objects from being serialized correctly. This is because properties in anonymous...
Thanks for the details @keerthivasanm I've made sure this issue is being triaged by the right people. FYI @markcowl
@fearthecowboy JSON.NET serializes anonymous types just fine. The reason they don't work with AutoRest-generated clients is that `ReadOnlyContractResolver` prevents it (because properties of anonymous types are read-only). This is orthogonal...
Related (sort of): https://github.com/Azure/autorest/issues/783 The above issue is how we found this issue.
This duplicates some issues that I opened quite a while ago: https://github.com/Azure/autorest/issues/288 https://github.com/Azure/autorest/issues/289 I agree, it would be great to see these fixed. :)
I fixed item 1, not item 2.
@fearthecowboy That proposal was from @brnleehng, not me
Just adding a +1 here. We've had customers get confused when they try to instantiate a base class that should be abstract, but isn't.