Swagger C# - Object reference not set to an instance of an object

-2

I have an epi server website. There I have some apis. Now I am thinking of using Swagger to have some documentation for the apis.

I have installed the Swagger nuget package

<package id="Swashbuckle" version="5.6.0" targetFramework="net461" />
<package id="Swashbuckle.Core" version="5.6.0" targetFramework="net461" />

I have updated the SwaggerConfig.cs file as

public class SwaggerConfig
{
    public static void Register()
    {
        var thisAssembly = typeof(SwaggerConfig).Assembly;

        GlobalConfiguration.Configuration
            .EnableSwagger(c =>
                {
                    c.SingleApiVersion("v1", "Web");
                    c.UseFullTypeNameInSchemaIds();
                    c.DocumentFilter(() => new FindFilter());

                })
            .EnableSwaggerUi(c =>
                {
                });
    }
}

Now the thing is it is listing all the apis but I am also getting

enter image description here

Does anyone know if I am missing some settings?

System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=Imazen.SlimResponse StackTrace: at Imazen.SlimResponse.ResponseFilterStream.OnTransformCompleteStringInternal(MemoryStream ms)

c#
swagger
swagger-ui
asked on Stack Overflow Sep 4, 2019 by mohsinali1317 • edited Sep 4, 2019 by mohsinali1317

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0