Questions tagged [swagger-2.0]

Swagger is a specification and framework implementation for describing, producing, consuming, and visualizing RESTful web services. Swagger 2.0 is the current generation of the spec and includes many improvements over 1.X. This specification is now known as Open API 2.0.

Read more about Swagger 2.0 here.

Learn about how to migrate from 1.x to 2.0 here.

1666 questions
0
votes
1 answer

Is it possible to specify multiple assemblies for a Swashbuckle CustomAsset?

I am using Swashbuckle to embed Swagger documentation for our API into our .NET Web API 2.2 application (.NET 4.5). Up until now all the controllers have lived in the main Web API dll but as we start building out the API we are moving different…
abraganza
  • 135
  • 2
  • 9
0
votes
1 answer

Polymorphism in Swagger produces strange error message on discriminator

I'm writing a service with a GET that can return one of five different but closely related types. Since the user wants the option of searching through all five types at once, it has to be a single get call. I'm returning JSON, which can easily…
MiguelMunoz
  • 4,548
  • 3
  • 34
  • 51
0
votes
1 answer

Swagger js codegen on how to generate models

I am using swagger js codegen to generate source code in nodejs .it works superb. However i have question , If we use swagger codegen and use java lang , models and handlers gets generated as part of stubs generation but in swagger js codegen it…
0
votes
1 answer

Passing indexed array in Swagger Editor UI

I have an API for sorting some items, I am using jquery UI sortable for sorting. When I pass order array to API, If I console, I get an array something like this in the below screenshot So In swagger I am using like this: parameters: -…
Salih K
  • 701
  • 2
  • 12
  • 31
0
votes
1 answer

When writing a spec for Google Cloud Endpoints, are there any rules governing operationId?

The first time I tried to launch an API spec on Google Cloud Endpoints, it errored out on missing 'operationId'. Fair enough -- I should have seen that in the tutorial. What I don't understand is if there are any rules or guidelines governing what…
0
votes
1 answer

Springfox Swagger2 and Guava - java.lang.StackOverflowError

I added Springfox Swagger2 2.8.0 in my Spring Boot 2 project and during startup of the application, run into the following issue: com.google.common.util.concurrent.ExecutionError: java.lang.StackOverflowError at…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
0
votes
0 answers

Generating Swagger for Map>?

I'm using swagger 2.0 with Spring Java. I have some class like this. public class Profile{ private Map> namesMap; } I know the correct swagger specification for namesMap: namesMap: type: object …
Supun Wijerathne
  • 11,964
  • 10
  • 61
  • 87
0
votes
2 answers

Why don't the array examples appear for my mocked Swagger 2 API on SwaggerHub?

Here is the snippet of code: /getappsettings: get: summary: Gets the collection of app settings. responses: 200: description: The successful get app settings response. schema: type: array …
dodgy_coder
  • 12,407
  • 10
  • 54
  • 67
0
votes
0 answers

Create more than one parameter swagger

I'm facing some issues trying to create more than one parameter for a route. I have the id from request parameters (path) which is ap araemter from the path and another parameter, the content from the body (request body) . I can't find a way to put…
Cátia Matos
  • 820
  • 1
  • 8
  • 26
0
votes
1 answer

Retrieve a specific object or array inside a Swagger definition

Suppose I have a definition as follows: definitions: assetList: type: object properties: assets: type: array items: type: object properties: id: type: string …
Arlo
  • 963
  • 3
  • 11
  • 20
0
votes
1 answer

Request validation using swagger

I need to validate incoming REST request using swagger(YAML file) in java. So can anyone help me with this. Thanks in advance.
0
votes
1 answer

AWS Api Gateway Documentation - cant create schema

Today i got into swagger and swagger-ui to create the documentation of our API. We are using AWS API Gateway with a Lambda function, since AWS is comming with an in-built option for documentation we are going with it. Sadly, I am pretty limited with…
sHamann
  • 789
  • 3
  • 10
  • 36
0
votes
1 answer

Why not showing swagger response data in all format Content type

net web api swagger respnse is not showing in all format for some of methods I want to display in this format. application/json, test/json, application/xml and text/xml but it's showing only application/json and test/json in some of apis. how can…
Jitendra singh
  • 413
  • 11
  • 27
0
votes
1 answer

swagger-2 integration with Spring Boot

I have a Spring Boot Project running. I want to integrate swagger-2 with the project. I have included all required dependencies and beans and http://localhost:8000/AllergiesConditions/swagger-ui.html#/ loads successfully, but not exactly in a way I…
Naveen Kumar
  • 384
  • 2
  • 11
  • 31
0
votes
1 answer

Extending DelegatingWebMvcConfiguration causes Swagger PageNotFound

I had Swagger (2.7.0) properly configured and working fine together with Spring Boot (1.5.4) but after I added custom class extending DelegatingWebMvcConfiguration (used to configure own RequestMappingHandlerAdapter) Swagger stopped being displayed…
m52509791
  • 449
  • 5
  • 13