question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nswag.exe encoding

See original GitHub issue

Hi, I am using the nswag.exe command line to generate a C# client as it is described here: https://github.com/RSuter/NSwag/wiki/CommandLine

nswag.exe run nswag.json

However, the generated document is UTF-16 LE encoded. Is there are way to change the encoding of the generated file to UTF-8?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
anton-gcommented, Jun 30, 2018

Personally I’d be fine with just changing it to UTF-8 (without BOM, since that isn’t recommended for UTF-8).

1reaction
kapsiRcommented, Jun 8, 2020

@RicoSuter Would be cool if we’d had a setting for that.
I love consistency and I think a minor update should not break this existing behavior? (e.g. I think in VS the default is UTF-8 with BOM?)

Additionally, the new default could be to honor the editorconfig charset property? 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

nswag.exe encoding · Issue #1416
Hi, I am using the nswag.exe command line to generate a C# client as it is ... nswag.json However, the generated document is...
Read more >
CommandLine · RicoSuter/NSwag Wiki
To see all available commands and parameters, run the command line application "nswag.exe" without parameters and enter "help" as command.
Read more >
Get started with NSwag and ASP.NET Core
Learn how to use NSwag to generate documentation and help pages for an ASP.NET Core web API.
Read more >
Automatically generating C# API clients on build with NSwag
Coding, Azure DevOps and more. ... This target will invoke nswag.exe using an nswag.json config file to generate the required code.
Read more >
How To Use Nswag With ASP.NET Core And Generate ...
The NSwag project provides tools to generate Swagger specifications from existing ASP.NET Web API controllers and client code from these Swagger ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found