cancel
Showing results for 
Search instead for 
Did you mean: 

Not showing methods

Highlighted
Occasional 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
    }
  }
}




000.png

 

Thank you!

 

1 REPLY 1
Highlighted
Moderator

Re: Not showing methods

Hi @waltsbjr,

 

This looks like an issue with Swashbuckle (.NET library that your app uses to add Swagger UI). Swashbuckle is not our project and we don't know it well enough to provide guidance. Your best bet is to go through the Swashbuckle documentation at https://github.com/domaindrivendev/Swashbuckle, and if no information is available, file a ticket with that project for further support.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Tags (1)
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors