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

Append properties to Swagger $ref

Hi guys I'm trying to append a new properties to a reference object but I can't seem to find the correct answer here's what I'm trying to achieve and the result should be something like below { "results": { "param1": "Add", …
MadzQuestioning
  • 3,341
  • 8
  • 45
  • 76
0
votes
1 answer

Django Rest Swagger: 'APIGroupAction' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method

I am getting this issue while integrating django-rest-swagger==2.1.2 with existing project djangorestframework==3.5.3 . I tried using quickstart with class based views which mention serializer_class in them: schema_view =…
Haziq
  • 2,048
  • 1
  • 16
  • 27
0
votes
0 answers

How create Swagger JSON for multiple resources

I am using TEST Application class which consumes three different resource classes example:-HondaApplication.java -carResource.java - bikeResource.java - planResouce.java I am getting one JSON file by using…
Gopal Rao
  • 151
  • 1
  • 1
  • 6
0
votes
2 answers

Showing DropDown for Client sdk in swaggerUI

I am having my api documetation in swagger. I would like to provide my users with Client sdk dropdown with options of php and java. below is my code. public void ConfigureServices(IServiceCollection services) { …
maxspan
  • 13,326
  • 15
  • 75
  • 104
0
votes
1 answer

Swagger code generator error with a reusable parameter

I have a following swagger file (parses fine with the Swagger online editor): swagger: '2.0' info: title: Sample version: 1.1.0 basePath: /base paths: /sample: get: summary: Gets the samples parameters: - $ref:…
Nemanja Trifunovic
  • 24,346
  • 3
  • 50
  • 88
0
votes
1 answer

swashbuckle mediatype application/octetstream

I have an endpoint that produces mediatype as application/octet-stream. However, when I generated the swagger json, it specifies "produces" as "application/json" I did not do any special configs in swagger. All I did was import swagger nuget and…
0
votes
1 answer

swagger 2 documentation not working

i'm trying to implement api documentation using swagger2 and springfox. my project isn't a spring boot or maven , it depend on xml files. i have added the class : SwaggerConfig import org.springframework.context.annotation.Bean; import…
Elias
  • 130
  • 1
  • 3
  • 13
0
votes
0 answers

How to define swagger docket bean in .xml file?

I done swagger integration from this link It works ! But i want to configure docket bean in .xml file can i define docket bean in .xml file ? If yes then how to define docket bean and it properties.. Currently i'm doing the follwing way …
0
votes
2 answers

xml to swagger 2.0 spec conversion using golang

I am having trouble converting xml (WSDL) to swagger 2.0 specs in golang. i found a library on github that converts xml to normal json but i need to convert to swagger 2.0 json. suggest me libraries if any. Thanks in advance!
vijay varikol
  • 81
  • 3
  • 10
0
votes
0 answers

swagger 2.0 errors on body parameters

I have two errors Next to - name: data Schema error at paths['/datas/{id}'].patch.parameters[1] should NOT have additional properties additionalProperty: descripton, schema, name, in, required Next to - in: body Schema error at…
Renaud
  • 110
  • 1
  • 7
0
votes
1 answer

AWS API GATEWAY - Import and export APIs with Swagger template

It's been a couple of weeks that I've been fighting with AWS API Gateway. I've a working version of our APIs with a client certificate and a custom lambda authorizer in my API gateway console. I am trying to export to a swagger file to import…
Dario
  • 755
  • 1
  • 7
  • 19
0
votes
1 answer

SwaggerUI through Swashbuckle documenting two different models against 1 ASP.NET WEB API action

I have a scenario where my ASP.NET WEB API returns 2 different models depending upon the request object. I am using swagger UI (through swashbuckle) to document my ASP.NET WEB API and currently is unable to find a way to document these 2 models…
0
votes
1 answer

How can I set up my swagger-node route to accept any content type?

Currently, I have my Swagger YAML set up to accept application/json by default for each route with the following on the top-level Swagger definition: swagger: "2.0" info: version: "0.0.1" title: my App # during dev, should point to your local…
millerbr
  • 2,951
  • 1
  • 14
  • 25
0
votes
1 answer

Swagger: Sending `Date` as an request header parameter in REST API

I need to send Date as part request header parameters to my REST API. I created Swagger-UI API document. If I tried accessing my API from Swagger-UI, the Date parameter is not getting delivered in application. If we change the name Date to Date1, It…
GOPI
  • 71
  • 2
  • 3
  • 8
0
votes
1 answer

GCP Endpoints v2: @ApiMethod(name = ) not working when returning a collection

In my GCP endpoints v2 project i have created a service that returns Collection of POJOS. I noticed that when returning a List or a CollectionResponse the @ApiMethod(name = ) does not work. Below an example: @ApiMethod(name = "getCountryList", …
1 2 3
99
100