Questions tagged [swagger]

Swagger is a framework implementation for describing, producing, consuming, and visualizing RESTful web services, based on the OpenAPI specification

Swagger is a specification and framework implementation for describing, producing, consuming and visualizing RESTful web services. It is a unique way to document your RESTful APIs on the go, as and when you code them.

The main advantage of Swagger is its flexibility - it can produce static and dynamic REST API documentation. There is even the possibility to interact with the webservice and send example queries.

It's developed by SmartBear.

On Nov 5th, 2015, the Open API Initiative extended Swagger as an OpenAPI specification to advance connected application development through open standards. Please refer to the announcement for more information.

Useful links

Frequently Asked Questions

People often ask about the following Swagger topics:

Related tags

11997 questions
5
votes
1 answer

Generate Swashbuckle API documentation based on roles / api_key

I’m using Swashbuckle (5.3.2) and it generates a nice API documentation. To clarify my problem, I set up a small example project with no real meaning. The API can only be used with a valid API key. For that I introduced an ApiKeyFilter which…
Ray
  • 115
  • 1
  • 9
5
votes
3 answers

Springfox swagger - no api-docs with spring boot jersey and gradle

I have a spring boot application with jersey and gradle, and I am trying to automatically generate the API documentation using springfox. I have followed the steps here: http://springfox.github.io/springfox/docs/current/ Here is what I…
Guy Hudara
  • 247
  • 4
  • 13
5
votes
1 answer

Amazon API Gateway Import From Swagger Error - Not taking Generics

I'm trying to create new APIGateway via import from Swagger, but having validation errors: The particular class causing the issue is our PaginationModel class. Code model definition: public class PaginationModel { public IEnumerable items…
5
votes
0 answers

How to update generated AutoRest code, after server REST API changed?

Context I am writing client code to access Web API REST service. I am using typed client classes by using Visual Studio 2015 "Add"/"REST API client..." Now the serverside API changed and I would like to update my generated client code…
g.pickardou
  • 32,346
  • 36
  • 123
  • 268
5
votes
2 answers

Changing to Url-Form-Encoded Post Request in Swagger

I was wondering is it possible to create a url-form-encoded post request within Swagger? For example: POST https://url.co.uk Host: server.example.com Authorization: Bearer Content-Type:…
Jaindreas
  • 69
  • 1
  • 1
  • 8
5
votes
1 answer

Showing Swagger UI for API in a different project (Swashbuckle)

We have a .NET solution with 2 projects: ASP.NET MVC Portal project OWIN Host API project (with custom controller selector) We are trying to expose a public documentation to a few API controllers in the OWIN-based API project We would like to…
Igorek
  • 15,716
  • 3
  • 54
  • 92
5
votes
2 answers

Listing API Methods Under Multiple Groups

I have Swashbuckle annotated code that looks like this: [Route("api/Subscribers/{id}/[controller]")] [Route("api/Organizations/{id}/[controller]")] public class AddressesController : Controller { [HttpGet("{aid}")] …
Brent Arias
  • 29,277
  • 40
  • 133
  • 234
5
votes
2 answers

reuse complex spring-fox swagger annotation

I am using the spring-fox2 @ApiImplicitParam annotation to make the swagger-ui show a box for including an Authorization header with a request: @ApiImplicitParams({ @ApiImplicitParam( name="Authorization", …
user152468
  • 3,202
  • 6
  • 27
  • 57
5
votes
1 answer

Add a swagger annotation for bearer auth

I am working on a dropwizard REST service. I have added authentication with a jwt using https://bitbucket.org/b_c/jose4j/wiki/Home The token has to be into the Authorization header Authorization: Bearer [TOKEN] I would like to find the good way to…
Ôrel
  • 7,044
  • 3
  • 27
  • 46
5
votes
1 answer

Show XML/JSON sample value in Swagger UI using swagger's annotations

I am implementing Jersey based REST API and using swagger to generate HTML based documentation for the same. I am using swagger's annotations to read and scan the resources to generate documentation. I have specified response for each resource using…
Ashish KUmar
  • 77
  • 1
  • 6
5
votes
2 answers

Does Swagger 2.0 support matrix parameters?

Does Swagger 2.0 support matrix parameters of JAX-RS specification? JAX-RS specification have Matrix-Parameter support. I have some matrix parameter present in my application such as /map/color;lat=50;long=20;scale=32000. I want to derive Swagger…
Moon Mysterious
  • 164
  • 1
  • 14
5
votes
5 answers

Swagger converting underscore to camelcase

So, I'm having trouble using an XML object definition with Swagger (Core 1.5.7). Here's my XML code:
Schrödinger's Box
  • 3,218
  • 1
  • 30
  • 51
5
votes
4 answers

splitting swagger definition across many files

Question: how can I split swagger definition across files? What are the possibilities in that area? The question details are described below: example of what I want - in RAML I do have experience in RAML and what I do is, for example: /settings: …
ducin
  • 25,621
  • 41
  • 157
  • 256
5
votes
2 answers

Jersey 2: render Swagger static content correctly without trailing slash(/)

What I did is to use Grizzly/Jersey to host swagger-ui, which is static content. Here's part of build.gradle: compile 'org.glassfish.jersey.core:jersey-server:2.22.1' compile…
macemers
  • 2,194
  • 6
  • 38
  • 55
5
votes
2 answers

Import swagger into existing project in Android Studio

Hello I'd like to add swagger generated zip into my gradle powered android project in Android studio. Which way is the best practice to import it continuously every time when swagger file change? Now I'm executing mvn package in unzipped dir from…
matusalem
  • 2,461
  • 2
  • 26
  • 35
1 2 3
99
100