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.

Application will not start with NSwag in .net Core 2 - works fine with swashbuckle

See original GitHub issue

After getting all of my client models working with NSwag (amazing tool BTW), I am trying to move my generation across to get the whole chain working with one system.

I have followed the wiki and this, essentially adding the NUGET packages and the Configure code; `
app.UseStaticFiles();

// Enable the Swagger UI middleware and the Swagger generator
app.UseSwaggerUi(typeof(Startup).GetTypeInfo().Assembly, settings =>
{
    settings.GeneratorSettings.DefaultPropertyNameHandling = PropertyNameHandling.CamelCase;
});`

Unfortunately my application starts, but then hangs trying to get the swagger.json. Any ideas on what I can try to figure out what is going on? It isn’t my .net core model because that works perfectly with my swashbuckle implementation - and yes, I did take the sb code out when implementing nswag.

Any help appreciated.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
statlercommented, Apr 11, 2018

It works with swagger 3 - so close away.

0reactions
RicoSutercommented, Apr 11, 2018

Can we close this or should we investigate?

Read more comments on GitHub >

github_iconTop Results From Across the Web

asp.net core - Why do NSwag fail on my computer and not ...
I'm working on a large C# Asp.NetCore 3.1 project where we uses Nswag to generate swagger.json and a C# ProxyClient for our API....
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 >
Swashbuckle vs. NSwag in ASP.NET Core
We will start with Swashbuckle, which is a popular open-source library for generating API documentation for ASP.NET Core applications.
Read more >
Mastering Web APIs with Swagger, ApiExplorer and NSwag
How to expose a second Web API in Swagger with Swashbuckle and consume it in a command line app with an NSwag generated...
Read more >
Auto Generated .NET API Clients using NSwag and ...
This article shows how auto generated code for a C# HTTP API client could be created using Swagger and NSwag . The API...
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