Newest 'swagger-ui' Questions

Q&A for professional and enthusiast programmers

Running swagger on server is adding a port

When running swagger the browser url has the correct url, but the swagger browser bar is adding the port and failing to run swagger,I had to add <li>@Html.ActionLink("Swagger", "", "swagger", ...

POST,PUT,DELETE Methods are not working in swagger ui but GET Works

POST, PUT and DELETE methods are not working in swagger UI but GET works for all my endpoints. I even tried copy paste executing the curl command on shell and it is also working. Is there any ...

@ApiResponses and @ApiResponses in swagger

I have annotated my method like, @ApiOperation( value = "Get time spent on category", response = CategoryBean.class, responseContainer = "List", notes = "API to get the time spent on all tasks based ...

How can I configure securityDefinitions for swagger-ui?

I've added the latest swagger ui to a project which auto generates the swagger.json definitions but doesn't include the new securityDefinitions object. I want to set up basic auth and have seen ...

Swashbuckle not displaying methods that have a collection as a paramater

I have a Web API (WebApi 2). I am trying to use Swashbuckle for documentation. I have a GET method that takes a List as a paramater. The method works but does not show up in the Swashbuckle ...

What is Swagger, Swashbuckle and Swashbuckle UI

This is my understanding: Swagger is a notation/rules to write documentation. But why is it called a framework(Like angular/MVC)? Swashbuckle is a program(javascript ?) that generates the ...

Setting up Swagger (ASP.NET Core) using the Authorization headers (Bearer)

I have a Web API (ASP.NET Core) and I am trying to adjust the swagger to make the calls from it. The calls must contains the Authorization header and I am using Bearer authentication. The calls from ...

Backend REST Service test for Angular Frontend

I've a front-end AngularJS App that consumes a set of REST APIs which are implemented in JAVA. I don't have any control over backend and the team gives me a new release each week or even every day. ...

Swagger and springfox

I'am using swagger version 2.2.2. If I go to the address, http://localhost:8080/swagger-ui.html , I will directly get the swagger UI. Is there any way, a security layer can be added, like, user should ...

Azure ApplicationInsights conflict with Swagger UI

I use Swagger UI for my Jersey app on Tomcat 8. Here is the configuration from my web.xml: <servlet> <servlet-name>Jersey2Config</servlet-name> <servlet-class>io....

swagger2 polymorphisme: add list of abstract classes to swagger documentation

I have a spring-boot application with swagger2. I want to be able to map a list of parent objects to my request model in swagger. I am using annotations atm but using a yaml file is also possible. ...

How to create a custom layout/theme for swagger-ui 3.x

I would like to create a custom theme (and maybe later a layout) for Swagger-ui 3.x. Being unfamiliar with React i have a hard time finding the right starting point. Can anybody point me in the right ...

Include default responses to swagger documentation

I am building an application using swagger in python. I specified all outcomes produces by my code in the swagger yaml file. Connexion, the library which I am using, also checks for validity of the ...

ServiceStack.Swagger.Api supportedSubmitMethods

I have a service set up that uses ServiceStack.Swagger.Api. My service has several endpoints that support OPTIONS requests. Is there a way to configure the SwaggerAPI plugin to add 'options' to the js ...

swagger2 for springboot microservice do no produce response on ui

I created one micro service with spring boot, I don't have resource folder and i wanted to add swagger support. So I followed as per document So Added swagger dependency. Added docker class as it ...

How to test Rest API call with swagger if needs authentication

I have springfox-swagger2 (version 2.6.1) and springfox-swagger-ui (version 2.6.1) in spring application. How to I can configure authorization token for calls which needs authorized for continue (how ...

what is api_key in swagger UI

I am new on Swagger , I am able to run swagger UI with spring . But I want to know what is api_key in swagger . What is use of api_key ? Could be search any api (rest controller in spring ) with ...

How can I add Spring Security authentication to Swagger?

How can I add Spring Security authentication to Swagger using annotations? My SwaggerConfig is like: private ApiInfo apiInfo() { return new ApiInfoBuilder().title("Spring REST Sample with ...

swagger-ui 3.0.6 - Add custom authorization header client side (through javascript dropdown onchange event)

I'm interested to understand how to auto-add my custom authorization header to all "try it out" requests with swagger-ui 3.0.6. In my frontend page I have a dropdown that contains multiple ...

Swagger UI response model display

If I annotate like @ApiOperation( value = "Add a tag to a task", responseContainer = "List", httpMethod = "POST" ) @ApiImplicitParams( { @ApiImplicitParam( name = RestRequestHeader....

Swagger UI Not adding Header to Requests

I am using Swagger 2.0 and Swagger UI 3.0.3. In my api_definition.yaml I have the following before my paths: swagger: '2.0' #######################################################################...

REST API : Passing Colon (:) in url using attribute Routing doesn't work

I am using swagger ui to test a POST method. I am passing the parameter in URL but it doesn't work. swagger-ui: I enter this Date: 2017-03-03T12:12:12 this is how it goes in url: https://...

swagger API : How to include in our application

I have an application in which on clicking on one link, i have to display swagger generated page. Using swagger editor online on giving yaml as input , it generates REST call s list . I want show ...

Swagger-ui v3.0.2: API methods sorting

API method sorting has a known issue in v3.0.2, about which I have already posted on Stackoverflow question refernce and on Github issue reference. I am looking for some temporary work around for the ...

Swagger UI No scope showing instead showing error

I am trying to implement swagger API documentation to the project, I have enabled the OAuth2 and done the required step as per the documentation. Authentication button is not showing up instead RED ...

Swagger: How to get formatted example json

I'm really struggling to understand the format of the examples section of a response. I have the following response defined for a 500 Internal Sever error. 500InternalServerError: description: ...

Grouping of API's in swagger UI

If there are different groups of API's in swagger UI, I will get all group names in a dropdown menu. How to make one of the groups to list their API's by default?

Using SwaggerClient with resources with response code 302

I'm using SwaggerClient (v 2.2.10). I'm calling a resource which returns HTTP status code 302 with a locaiton header. SwaggerClient does the redirection to the location header once it gets the ...

What's app-root in this project?

I'm going on to start a Spring boot Restful project using this article to build a restful application and then this link to add swagger2 to it. in second link it says somewhere that you can test ...

Swagger Integration with spring boot

For one of the rest call /rest/task/addAttachmentToNote which is POST request, I'am getting OPTIONSand PATCH being displayed in the Swagger UI. Why?

Validating the Request and Response Metadata Schema defintions for each path in Swagger

We have several APIs and recently they are converted to swagger. Each Swagger as several API endpoint with corresponding REST operations such as GET or POST. And each of those endpoint has both ...

Remove API info from Swagger

I don't want to show the API information on my Swagger UI. How do i remove this? <div class="info" id="api_info"> I tried looking for #api_info or .info from css so i can set the ...

Loopback Swagger HTML doesn't show Parameters for the Endpoints

In a NodeJS based project, the Swagger that comes with loopback-component-explorer (version 2.7.0) doesn't show the "Parameters" in the HTML page in which we can provide the required params for the ...

Swagger UI - Custom html page does not show API list

I added custom index.html & downloaded the code for index.html from following location (https://github.com/domaindrivendev/Swashbuckle#injecting-custom-content) & changed the URL in the new ...

Conditional Query Parameters in Swagger [duplicate]

I'm working with Swagger Editor to create an API, and in implementing a search endpoint, I am trying to do something like this: /pets: get: summary: Retrieve a list of pets ...

Swagger UI Authentication Header

Currently I have a process that a user can go through to get a JSON Web Token (JWT). This JWT is then used to set the X-Access-Token header for all http requests to the API. I am having trouble ...

File Upload error: The request sent by the client was syntactically incorrect with jersey 2.x and swagger 1.5

I am trying to create RESUfull web services with swagger documentation. After i googled and found the below mentioned two dependencies are the latest and both works fine. <dependency> <...

Swagger UI not accepting xml values

I am using Swagger to document my REST API. I have a Person entity with name, Phone number and Set. I have Address entity which has Address Line 1, City and Pin Code. The Person has a one-to-many ...

How to describe input model as much as possible using Swagger

I have an example input model as follows: public class CarInputModel { public string Name { get; set; } public string ModelName { get; set; } } This values will come from UI, what kind of ...

How to prevent xml-wrapper element in Swagger-ui

I am using swagger-ui version 2.2.8 Our existing API can produce application/json as well as application/xml. For a single record result in json it produces: { "person": { "id": 23, "name":...

Can't acces swagger server into docker container

I have a swagger server api in python that I can run on my pc and easily access to the user interface via web. I'm now trying to run this API into a docker container and place it into a remote server. ...

Code Block in Description in Swagger UI

I would like to put a Markdown code block in the description of my API but the Swagger UI seems to be reading as though it was a single line code snippet. I currently have: description: | This ...

Swagger Pattern not working with Swagger UI

I am making an API with swagger and am trying to update the YAML to add regex pattern requirements to the parameters. Currently I am trying the following: # getCPIStatesForCountry endpoint /...

SpringFox Swagger and LocalTime

Anybody knows how to format LocalTime in Springfox? Converting to ISO format works for LocalDate with this setting to ObjectMapper .featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) ...

swagger-ui No mapping found for HTTP request

I'm trying to document and existing Rest API a Spring MVC project (NOT spring boot!). My application is called api so http://localhost:9090/api would be the root endpoint. Because I'm using spring-...

Swagger UI generating wrong Curl command

Swagger UI generating wrong Curl command as pasted below and due to this query string truncating curl -X GET http://domain:8080/v1/endpoint?access_token=affsfafasfa&type=1 -H "accept: ...

Swagger UI example data

Is there a way in swagger to show example data for; model, both input & output, query parameters, headers, etc? I have been unable to find anything related to this in the annotations documentation;...

Generated html of swagger file does not show example

The generated html and html2 pages of my swagger file doesn't show the examples. But I can see them on Swagger Editor output panel. Here is an example of what I am doing: /getMyObject post: .....

Array Object using Swaggard Gem

I am now using this gem for my API. However, I'm having a hard time adding some parameters like array object. This is my sample parameter on postman and I want to try this on swaggard. But I ended ...

Using profiling with swagger UI

I have implemented Swagger UI for my spring boot application and applied profiling in it. I am able to access the endpoints from the local but when I try to access the same application using QA URL, ...
Translating... 0%