tagged [swashbuckle]

How can I tell Swashbuckle that the body content is required?

How can I tell Swashbuckle that the body content is required? I have a WebAPI controller that accepts binary packages and stores them somewhere. As these packages can become quite large, I don't want ...

Swashbuckle adding 200 OK response automatically to generated Swagger file

Swashbuckle adding 200 OK response automatically to generated Swagger file I am building swagger docs using Swashbuckle in my WebApi 2 project. I have the following definition of the method: ``` [Http...

14 Jun at 18:37

How can I hide response code 200 with Swashbuckle.AspNetCore?

How can I hide response code 200 with Swashbuckle.AspNetCore? Ciao, I'm working on a asp.net web api core (target framework .NET Core 2.1). I'm documenting my API using Swagger specifications. I chose...

How can I change order the operations are listed in a group in Swashbuckle?

How can I change order the operations are listed in a group in Swashbuckle? I'm using Swashbuckle to generate Swagger UI. It has options for choosing a grouping key (controller by default) and the ord...

21 Sep at 08:38

Swagger UI Web Api documentation Present enums as strings?

Swagger UI Web Api documentation Present enums as strings? Is there a way to display all enums as their string value in swagger instead of their int value? I want to be able to submit POST actions and...

Swagger gives me HTTP Error 403.14 - Forbidden

Swagger gives me HTTP Error 403.14 - Forbidden I am trying to use Swagger with Web API. I am just using the "Azure API App" template from the ASP.NET 4.6 templates installed with Visual Studio, which ...

k__BackingField remove in C# (seen via Swashbuckle / Swagger)

k__BackingField remove in C# (seen via Swashbuckle / Swagger) I am using Swashbuckle 5 in my ASP.NET webapi project with all default settings. It serializes my method's output in order to show me sche...

17 Apr at 14:22

Swagger 'swagger.json' loads, but 404 error on swagger UI '{localhost}/swagger' in AspNet project

Swagger 'swagger.json' loads, but 404 error on swagger UI '{localhost}/swagger' in AspNet project Working on setting up swagger for a web application hosted with IIS using AspNetCore. The .json page l...

How to set base path property in swagger for .Net Core Web API

How to set base path property in swagger for .Net Core Web API i've built a Web API in ASP.Net Core (version 1.1.2) and i use the Swashbuckle.AspNetCore for generating the swagger definition. below is...

How to use a custom model binder with Swashbuckle, Swagger and NSwag?

How to use a custom model binder with Swashbuckle, Swagger and NSwag? I have an ASP.NET Core Web API that contains the following endpoint. This endpoint takes a CSV

Swagger - Web API - Optional query parameters

Swagger - Web API - Optional query parameters ``` [HttpGet] [Route("students")] [SwaggerOperation(Tags = new[] { "Student" })] [SwaggerResponse(HttpStatusCode.OK, Type = typeof(ResponseModel>))] [Swag...

How can I make url path in Swashbuckle/Swaggerwork when api is served from inside another project?

How can I make url path in Swashbuckle/Swaggerwork when api is served from inside another project? all. I am trying to document a WebApi 2 using Swashbuckle package. All works great if the API is runn...

How to configure Swashbuckle to ignore property on model

How to configure Swashbuckle to ignore property on model I'm using Swashbuckle to generate swagger documentation\UI for a webapi2 project. Our models are shared with some legacy interfaces so there ar...

Adding Query String Params to my Swagger Specs

Adding Query String Params to my Swagger Specs I am using Swashbuckle (swagger for C#) with my Web API. I have several GET End-Points that return lists and I allow the user to add a perpage and page p...

17 Aug at 19:12

How to make Swagger show examples of objects returned from the API?

How to make Swagger show examples of objects returned from the API? I am creating a set of API's for the first time. Here's one of the methods: ``` // GET: api/Doors/0 /// /// Get a list of all do...

2 Mar at 20:12

Swagger is not Working Asp.net Core how to open swagger ui

Swagger is not Working Asp.net Core how to open swagger ui This is my `Startup.cs` file This is my `ConfigureService` method in Startup.cs. I have modified it exactly according to documentation, but i...

1 Nov at 17:14

Add `host`, `basePath` and `schemes` to swagger.json using Swashbuckle Aspnetcore

Add `host`, `basePath` and `schemes` to swagger.json using Swashbuckle Aspnetcore I am using official doc step by step method to configure Swagger UI and generate Swagger JSON file in my ASP.NET core ...

Swagger not loading - Failed to load API definition: Fetch error undefined

Swagger not loading - Failed to load API definition: Fetch error undefined Trying to setup swagger in conjunction with a web application hosted on IIS express. API is built using ASP Net Core. I have ...

19 Feb at 15:31

Customize generated model names - Swagger UI

Customize generated model names - Swagger UI I'm trying to adjust the "displayName" of the model being used in an automatically generated Swagger definition. This will only affect the Swagger names, m...

Manually set operationId to allow multiple operations with the same verb in Swashbuckle

Manually set operationId to allow multiple operations with the same verb in Swashbuckle I need to know if it's possible to set up custom operationid, or a naming convention, I mean I know that operati...

Mark strings as non-nullable in ASP.NET Core 3.0 Swagger

Mark strings as non-nullable in ASP.NET Core 3.0 Swagger I'm using ASP.NET Core 3 and Swashbuckle with mostly default configuration and I have a DTO parameter with a string on it that I want to be non...

30 Sep at 06:51

500 Error when setting up Swagger in asp .net CORE / MVC 6 app

500 Error when setting up Swagger in asp .net CORE / MVC 6 app I'm trying to setup a basic swagger API doc in a new asp .net CORE / MVC 6 project and receiving a 500 error from the swagger UI: `500 : ...

29 Jun at 19:11

Swagger UI not displaying when deploying API on IIS

Swagger UI not displaying when deploying API on IIS Well, I'm using Swagger for my API documentation and it works perfectly in localhost, the problem begins when I host it on the IIS. For somereason i...

System.Text.Json Field Serialization in .NET 5 not shown in Swashbuckle API Definition

System.Text.Json Field Serialization in .NET 5 not shown in Swashbuckle API Definition # Problem I'm using ASP.NET Core with .NET 5 and am using the `System.Text.Json` serializer to serialize types co...

Not supported by Swagger 2.0: Multiple operations with path

Not supported by Swagger 2.0: Multiple operations with path I have integrated swagger in WebApi 2 application. It works fine when application has single controller. When I added second controller in t...