waltsbjr
5 years agoOccasional Visitor
Not showing methods
I had implemented swagger in my .net 4.6 api but it load the swagger but not showing any controller method.
The json file not showing any path also.
My project contains owin security and JWT framework.
config
.EnableSwagger(c =>
{
c.SingleApiVersion("v1", "IntegApi");
c.IncludeXmlComments(GetXmlCommentsPath());
c.UseFullTypeNameInSchemaIds();
c.RootUrl(req => "http://localhost:53540");
c.PrettyPrint();
c.ApiKey("apiKey")
.Description("ACPNET")
.Name("client_id")
.In("header");
})
.EnableSwaggerUi(c =>
{
c.DocExpansion(DocExpansion.None);
c.EnableApiKeySupport("client_id", "header");
});
And json:
{
"swagger": "2.0",
"info": {
"version": "v1",
"title": "IntegApi"
},
"host": "localhost:53540",
"schemes": [
"http"
],
"paths": {},
"definitions": {},
"securityDefinitions": {
"apiKey": {
"type": "apiKey",
"description": "ACPNET",
"name": "client_id",
"in": "header
}
}
}
Thank you!