Questions tagged [swashbuckle]

Swashbuckle is an open source framework which adds Swagger and Swagger-ui to ASP.NET Web API projects.

Swashbuckle combines ApiExplorer, Swagger and Swagger-ui to provide a rich discovery, documentation and playground experience to your ASP.NET Web API consumers.

Core features:

  • Auto-generated Swagger 2.0
  • Seamless integration of swagger-ui
  • Reflection-based Schema generation for describing API types
  • Extensibility hooks for customizing the generated Swagger doc
  • Extensibility hooks for customizing the swagger-ui
  • Out-of-the-box support for leveraging Xml comments
  • Support for describing ApiKey, Basic Auth and OAuth2 schemes ... including UI support for the Implicit OAuth2 flow

The Swashbuckle tag should be used for questions about:

  • Configuring Swashbuckle
  • Extending Swashbuckle with the interfaces ISchemaFilter, IOperationFilter and IDocumentFilter
  • Customizing the embedded Swagger-UI

Questions specifically addressing Swagger or Swagger-UI should not be tagged with the Swashbuckle tag.

Source code: https://github.com/domaindrivendev/Swashbuckle

1366 questions
-1
votes
1 answer

How to change the example value for an enum property in the Swagger UI?

I'm using AddSwaggerGen in an ASP.NET Core project. I wrote an ISchemaFilter to change the property values that the Swagger UI uses in its example JSON. I used this approach because the filter instantiates my model types to get the default values…
Kevin Krumwiede
  • 9,868
  • 4
  • 34
  • 82
-1
votes
1 answer

How to customize Swagger UI in .NET Core 6.0

I am using Swashbuckle.AspNetcore v6.5. How to align endpoint summary to right side corner?
Cust_1
  • 85
  • 1
  • 1
  • 6
-1
votes
1 answer

ASP.NET Core WebAPI - .NET 7: Swagger UI is empty, but still have HTML source

My project file acc.csproj net7.0 enable enable
Vy Do
  • 46,709
  • 59
  • 215
  • 313
-1
votes
1 answer

Swashbuckle.AspNetCore.Filters doesn't recognize my JsonPropertyNames

I am developing a web API in .net-core 3.1 I am currently using Swashbuckle.AspNetCore.Filters to show a specific example of the JSON date format. However, when I use this library, it does not take the values ​​of [JsonPropertyName]. My example JSON…
-1
votes
2 answers

Generating client code from OpenAPI spec fails

I stumbled across this article and out of curiosity, I gave it try. I could successfully generate the OpenAPI spec as a JSON file from our ASP.NET Core Web API. But when trying to create a Connected Service within Visual Studio 2019 to generate the…
mu88
  • 4,156
  • 1
  • 23
  • 47
-1
votes
1 answer

customize swagger ui to show parameter schema

I have a swashbuckle swaggergen UI output that looks like: [![put request][1]][1] And (for reasons), I don't want to use a typical validation attribute, instead I validate in the request body. My containername is an Azure Blob Storage container, so…
roberto tomás
  • 4,435
  • 5
  • 42
  • 71
-1
votes
1 answer

Swashbuckle 5.0.0 generated json not consistent

I have an issue most likely just not understanding how swashbuckle generates swagger json file. I have a couple API's and all of them share some infrastructure so it is packaged and therefore is shared among all of them. In that infrastructure is…
ag_
  • 69
  • 2
-1
votes
1 answer

SwashBuggler.swaggerDocument fails to created document

Project Structure: Console application - Launch the WebAPI startup API Project(DLL) - Only configuration (Container and authorization and Controller class initialization using(AssemblyPart)) ControllerClass(DLL) - Has API…
Saiprabhu
  • 1
  • 1
-1
votes
1 answer

How to Add multiple security schemes Bearer and ApiKey in swashbuckle

can anyone suggest how to add multiple security schemes in Swashbuckle? and declaring both schemes are applicable globally 1. Bearer Token and 2. Apikey
zeusmos
  • 168
  • 1
  • 4
  • 13
-1
votes
3 answers

Is swashbuckle.aspnetcore supporting asp.net core 3.0?

I am installing a new asp.net core 3.0 its using services.AddControllers(); instead of services.addMvc(); and its using app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); instead of…
aspnetcoreguy
  • 135
  • 2
  • 12
-1
votes
1 answer

How do I change the type of a Swagger response?

I have a swagger API constructed that uses a POST endpoint to take in a JSON file and returns a valid JSON schema for that file. However when the JSON schema is constructed and returned the string also contains escape character backslashes. For…
Jake12342134
  • 1,539
  • 1
  • 18
  • 45
-1
votes
1 answer

How to add custom css in swagger-ui using .Net

Hi I'm using swagger ui in my web api project. It's very good but i am facing some ui issue in page. this is the snapshot How can I fix this issue by adding custom css. if i have to add custom css then where i have to add. in project file or in…
Jitendra singh
  • 413
  • 11
  • 27
-1
votes
2 answers

How to access to Swashbuckle.AspNetCore protected api to test auto-documentation?

I'm developing a solution with IdentityServer4, a protected web api and a consumer (console app to testing). I use Swashbuckle.AspNetCore package to auto-document my web api. In my ConfigureServices method in the web api I write this…
Mini Dev 1
  • 169
  • 1
  • 2
  • 8
-1
votes
1 answer

Assign Default Request Data in Model Schema on Swagger UI using Swagger 6.0.0-rc1-final

Please help me out in implementing default request data to the model schema on the Swagger UI with Swagger 6.0.0 with C#.
U rao
  • 49
  • 8
-3
votes
1 answer

Swagger is giving error when I try to pass json object in Get API as query string parameter in C# ASP.Net

Swagger is giving error when I try to pass json object in Get API as query string parameter in C# ASP.Net. I read the solution of the similar issue post where it was suggested to update the OpenAPI to 3.0. I tried adding [FromQuery], SwaggerUI…
1 2 3
90
91