Closed vdecristofaro closed 7 years ago
I suspect that you installed NJsonSchema v9+ with NSwag v10.6 which is not compatible (NJS v9 is used in NSwag v11)
You have to downgrade to NJS v8.33
This is what I have at the moment
Could you please suggest the right combination of packages? Thanks!
Just downgrade njs to v8.33
ASP.NET Web API 2 project deployed in multiple urls (production, staging, development)
I have integrated the Nswag by following the NSwag Tutorial: Integrate the NSwag toolchain into your ASP.NET Web API project and more specifically the Register the OWIN middlewares in your Global.asax section.
I have then deployed wverything on an internal server we use for tests.
When I first browsed the url
https://api.myserver.lab/swagger/index.html?url=/swagger/v1/swagger.json
I have got an error sayingI have then enabled CORS on my API but the error remains the same.
What i have discovered is that by browsing directly to the generated json
https://api.myserver.lab/swagger/v1/swagger.json
I get the following error
Stack trace
at NSwag.SwaggerGeneration.WebApi.Processors.OperationParameterProcessor.<ProcessAsync>d__2.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder
1.Start[TStateMachine](TStateMachine& stateMachine) at NSwag.SwaggerGeneration.WebApi.Processors.OperationParameterProcessor.ProcessAsync(OperationProcessorContext context) at NSwag.SwaggerGeneration.WebApi.WebApiToSwaggerGenerator.any suggestion?