When generating C# code in NSwagStudio it is somewhat confusing when downloading an openapi file.
Create local Copy, I get the following exception:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: o. Path '', line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonReader.ReadAndMoveToContent()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at NSwagStudio.ViewModels.SwaggerGenerators.SwaggerInputViewModel.<>c__DisplayClass8_0.<<LoadSwaggerUrlAsync>b__0>d.MoveNext() in C:\projects\nswag\src\NSwagStudio\ViewModels\SwaggerGenerators\SwaggerInputViewModel.cs:line 30
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MyToolkit.Mvvm.ViewModelBase.<>c__DisplayClass14_0.<<RunTaskAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MyToolkit.Mvvm.ViewModelBase.<RunTaskAsync>d__12`1.MoveNext()
So it kinda makes sense that I'm seeing this, but the yaml does get downloaded into the Swagger Specification JSON field and is able to generate C# code.
When generating C# code in NSwagStudio it is somewhat confusing when downloading an openapi file.
Create local Copy
, I get the following exception:So it kinda makes sense that I'm seeing this, but the yaml does get downloaded into the Swagger Specification JSON field and is able to generate C# code.
Is yaml now supported or not? //cc @gillesdb