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
2 answers

Swagger/OpenAPI 3.0 issue with example on responses

This is a simplified version of my OpenAPI 3.0 definition I'm viewing on the Swagger Editor online. I am trying to have the two responses for error codes 401 and 403, that share the same schema, show different examples - this doesn't seem to work…
Iacopo Pace
  • 117
  • 1
  • 8
5
votes
8 answers

Swagger-ui.html not showing api list

I'm using spring boot + swagger 2 for documenting all the REST API .I'm able to list all the api of a controller when i have the below project structure. If i move the swaggerconfig.java to the config package then i'm not able to list all api of a…
Sundar G
  • 1,069
  • 1
  • 11
  • 29
5
votes
0 answers

Swagger 3.0.1 and oAuth1

Currently, there is no oAuth1 support in OpenApi 3.0.1 specifications I need to indicate that some endpoints require an oAuth1. May someone has some ideas, insights how to do it? I'm not expecting to have a full swagger functionality, Just a…
zghib
  • 61
  • 4
5
votes
0 answers

Best approach to use swagger generated data-models in business logic app

I have a Python program which encapsulates the business logic of an app. An example: $ app pets list [{ "name": "Hasso", "age": 21 },{ "name": "Lassy", "age": 15 }] Now I want to realize a REST API with Swagger.io. An extract of the YAML…
Maus
  • 2,724
  • 5
  • 32
  • 37
5
votes
1 answer

Swagger Client API key authentication

I have to authenticate to Bitmex API using my Api key but I got this error Unable to connect: TypeError: Cannot read property 'add' of undefined 'use strict'; var SwaggerClient = require("swagger-client"); var _ = require('lodash'); var…
sparkle
  • 7,530
  • 22
  • 69
  • 131
5
votes
0 answers

Need to publish swagger-codegen generated jar file to maven

I am facing some issues with the gradle plugin to deploy/publish the jar which is generated by swagger-codegen plugin. I already looked at this question and my needs are completely different but it is acting like this. It is deploying the jar…
Aditya Peshave
  • 667
  • 9
  • 26
5
votes
1 answer

Correct way to define an array of one or more strings using the OpenAPI v3 Specification

I wish to POST an array containing a variable number of strings, such as ["string1", "string2", ... "stringN"] My present OpenAPI document defines it this way: schema: type: array items: description: networkIds type: string Is…
Mike
  • 676
  • 1
  • 8
  • 17
5
votes
2 answers

OPENAPI/Swagger codegen AdditionnalProperties extends HashMap : play(jackson) deserialization failure.

My problem is a little bit complicated, I'll try to explain it clearly. To do it, I've done a simple project. I'm using Swagger codegen to generate Java classes from swagger file. In the swagger file, a definition is using additionnalProperties. …
user3560649
  • 91
  • 2
  • 3
5
votes
2 answers

Swagger not scanning ApiModel and ApiModelProperty annotations in entity classes that are in a different jar file

I have the following two entity classes. The first class is SampleApiEntity: package my.company.rest; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.hibernate.annotations.Type; import…
El Goodo
  • 284
  • 1
  • 4
  • 14
5
votes
2 answers

How using ref into examples Swagger?

JSON spec: "responses": { "200": { "description": "Успешный ответ сервиса", "schema": { "$ref": "#/definitions/BaseResponse" }, "examples": { "application/json":…
Rohan Warwar
  • 810
  • 1
  • 13
  • 27
5
votes
0 answers

Pros vs cons: Using Swagger middleware in a production environment

I'm building a high traffic API using Swagger and is looking for advice on using Swagger in a high traffic production environment. My focus is performance and security. I have seen numerous ways of implementing Swagger in Node projects where the…
ChrisRich
  • 8,300
  • 11
  • 48
  • 67
5
votes
1 answer

Django OAuth Toolkit and Django Rest Swagger Integration

I'm using OAuthToolkit and DjangoRestSwagger. I've created an application using Django Admin, and now I've client_id and client_secret. I want to generate the token using client_id and client_secret. Currently, I use curl to generate the token. curl…
Praful Bagai
  • 16,684
  • 50
  • 136
  • 267
5
votes
4 answers

How to document function-based views parameters?

I'm developing a REST API with Django 1.11 and Django REST Framework 3.7. I installed Django REST Swagger 2.1 to generate the documentation. I'm using a function-based view like this: from rest_framework.decorators import api_view,…
GuiTeK
  • 1,561
  • 5
  • 20
  • 39
5
votes
1 answer

Sort Swagger Tags

Hi I'm using flasgger/swagger but I was wondering if there are feature where in I could sort all my tags in alphabetical order? right I don't understand the order of my tags. It's neither Alpha nor Numeric. Sample order is like this User - API…
MadzQuestioning
  • 3,341
  • 8
  • 45
  • 76
5
votes
1 answer

Does ReDoc have a live editor similar to the Swagger Editor?

I've started using ReDoc to publish my documentation but don't have a good way to know what it will look like before pushing it to my web server. I've used http://editor.swagger.io/ in the past and found it pretty useful. Is there anything like that…
Hill
  • 63
  • 1
  • 5