NSwag
NSwag copied to clipboard
Bug: string.Empty is not valid JSON
When request body (POST, PUT, PATCH) is empty, NSWag generates a string content as following:
request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json;odata.metadata=minimal;odata.streaming=true");
Empty string is not valid json (should be "" or {} or just without this instruction) which causes exception.
VERSION: 14.08 and below