Newest 'swagger-ui' Questions

Q&A for professional and enthusiast programmers

Swagger POST/PUT body parameters not passing to my controller

My simple swagger API documentation. parameters not passing to my controller while performing post and put operations.(Get and Delete operations performs fine) Swaggerjson file: "paths": { ...

Pre-populate request model in swagger

I would like to populate the default request data to the model schema on the Swagger UI. I managed to create an attribute that actually populates the request data using IOperationFilter as shown below:...

Spring Boot + SWagger UI changing port

I integrated Spring Boot with Swagger (spring fox) but it runs on 8080 port and my application is running on different port. How can I access Swagger UI on my application port?

SpringFox Docket per controller not working in spring boot

In my spring boot application, I have multiple Rest Controllers and need to generate swagger for each controller seperately. By using below Docket config for each controller in my spring boot ...

Enabling Azure AD Auth for Swagger UI hosted in Service Fabric

We enabled Swagger for Web API application which is hosted on Azure Service Fabric. We want to enable security on Swagger UI. So I followed below url which enables security – https://blogs.msdn....

Swashbuckle OAuth2 Authorization with Client Credentials Flow

I use Swashbuckle to documentation of WebAPI controllers. Also I use OAuth2 with Client Credentials Flow. So to authorize I need to pass client_id and client_secret. I have following code: config....

Swagger UI integration with Camel …not able to access index.html on port

I'm using Camel to integrate Swagger. I downloaded dist folder renamed to swagger and updated index.html but I'm not able to access ui it through my application port: http://localhost:${port}/${...

Swagger not working for the Services exposed over the Google Endpoint 2.0

I have created the Jersey Rest Post Service (say /hello ). I have used endpoint over container engine. Create another Swagger project and deployed over the seperate container engine. Next from the ...

Swagger doesnt show inherited objects

I have a class "SubModel" which inherits from class "SuperModel". My REST request returns an object of one of these classes. Now i want to document that in my Swagger UI that either an object of ...

Can Swagger have different security for different tags?

Can Swagger have different security for different tags? I can't find the setting for tag's security in the Swagger Specification. I hope the same tag will own the same security, and different tags ...

Swagger UI with SailsJS v0.12.13

I'm having the following errors when rendering swagger-ui : I've copied the contents of the dist folder from swagger-ui under assets/docs but can't get it to work. Thanks

Unable to set basePath in swagger.properties using spring

I am trying to set all the swagger properties using a properties file. I am able to read all the properties except host and basePath (swagger.host= and swagger.basePath=). The properties in the ...

How to use jaxrs-analyzer standalone to create swagger specific documents?

My project is creating different jar files. These are located in different locations. I need to run jaxrs-analyzer.jar to generate my swagger.json file. How can I give multiple jar location to the ...

Swagger 1.5 not generating valid JSON description

I am trying to make swagger document my API composed of Jersey-spring 2.22.2 with Spring 4.3 and Jackson 2.22.2. The swagger package I'm using is: <dependency> <groupId>io....

how to ensure completeness of Swagger documentation in spring project.

I am using swagger for documentation in my spring project for Rest. Is there a way to check completeness of this documentation when a new code or end point is introduced ?

Array title not showing up in Swagger UI Models

I have a Response object and an array of Response objects with "title": "Responses". But Responses title text is not showing up in Models section of Swagger UI. Is this expected or something wrong ...

JAX-RS Swagger Snake case

I am the swagger generator for JAX-RS: <dependency> <groupId>io.swagger</groupId> <artifactId>swagger-jaxrs</artifactId> <version>1.5.12</...

Changing Name and Description endpoint in Swagger-ui

I am using Spring boot and Spring Data Rest to implement my Rest API. To document it, I have been using Swagger, with these maven dependencies: <dependency> <groupId>io....

Swagger client generation with Spring REST Docs

I have seen this Spring REST Docs - video We are doing Spring boot projects and are using springfox library for generating the Swagger-ui and swagger documentation as outlined here We like what ...

Swagger-ui cannot access JS scripts

I followed the swagger-ui installation and I cannot get this work. The problem is that java-script files are not accessible. It seems that the names are wrong - index.html expects ...

Swagger array of strings without name

Currently I am trying to create a swagger file for my software. Now I would like to create a definition for a timeRange. My problem is that this array looks like this: timeRange: { "2016-01-15T09:...

Rest API version header in SwaggerUI

I want to use Springfox SwaggerUI for my Rest API (spring-mvc) documentation. I use version header in @RequestMapping annotation, but if I have two versions of same method, in SwaggerUI I can see only ...

Swagger 2 (Spring fox) adds 'es' to my API's

I was just trying to integrate Swagger into my Spring Boot (JAX-RS) project built with Gradle.I was able to generate a docker (Swagger UI) for the same as following : I have configured my swagger ...

Enabling security for Swagger UI on Service Fabric Web API Services

We enabled Swagger on Azure Service Fabric application using below link. Swagger for Azure Service Fabric Stateless Web API application But, we are unable to secure the swagger UI using OAuth (Azure ...

No “Try it out” button for HEAD method in Swagger UI

I have a Swagger spec that defines a HEAD operation: head: description: show flight exist or not. parameters: - name: flight_no in: path type: string description: Flight_no ...

Swagger UI, while exploring working api-doc shows Uncaught TypeError: Cannot read property 'indexOf' of null and stuck forever fetching url

swagger-ui : Swagger api-docs shows "apiVersion":"1.0","swaggerVersion":"1.2" a swagger file reproducing the issue Api doc return response with json output while accessing following url http://...

Springfox Swagger2 operations not sorting alphabetically

My Rest Api (screenshot below) is not sorting alphabetically and I'm not sure how to get it to. I have the following in my web config but the "alpha" sorting is not happening. @Bean UiConfiguration ...

Why head method is not working in swagger using docsstring in flask?

Docstring in triple quotes is not working in the head method. I am using the package flassger. I am not able to use docstring in head method for swagger ui. However, it is working in patch, post, put, ...

Customizing Request Header description in Swagger UI using Springfox-Swagger2

I am using Springfox Swagger2 version 2.4.0, Springfox Swagger UI version 2.4.0 and Swagger Annotations version 1.5.0 in my Spring Boot application. The question here is, I am able to generate ...

Swagger UI is changing the protocol in the request from https to http

In the swaggerUI it's default takes the 'http' but the actual API will support the 'https' One possible way, will remove the 'http' in the schema, but in local unable to test the 'https' so what is ...

Swagger-ui problems trying to use a object parameter containing a array

Seem to almost have it... Trying to have swagger send an anonymous hash of parameters in the request body. I have an anonymous hash containing one key named list that contains an array. Trying to ...

Generate interactive API docs from Tornado web server code

I have a Tornado web server that exposes some endpoints in its API. I want to be able to document my handlers (endpoints) in-code, including description, parameters, example, response structure, etc., ...

Swagger: wildcard path parameters

I have an API which allows any arbitrary path to be passed in, for example all of these: /api/tags /api/tags/foo /api/tags/foo/bar/baz Are valid paths. I tried to describe it as follows: /tags{...

flasgger exposing api on other address [on hold]

Hi I have used flasgger to generate my documentation. It is so easy and I am able to get documentation at http://localhost:5000/apidocs/index.html but instead of localhost I tried to type my ip ...

How to get Swagger UI to work based on documentation guide? (even the example)

I am trying to use Swagger UI to document our node.js API, so I went to http://swagger.io/docs/, down to Swagger UI Documentation -> Usage, to find this Now, this is not the only place that provides ...

How to use Basic auth in swagger ui v.3.0

in swagger ui 2.0 it was code var basicAuth = new SwaggerClient.PasswordAuthorization("basicAuth", username, password); window.swaggerUi.api.clientAuthorizations.add("basicAuth", basicAuth); Can ...

Update Swagger during runtime

In my internship we are developing an API for a website to control various products. Each product has a so called connector that exposes the different endpoints that can be used for that product. ...

Authorization key issue: Swagger-ui v3.0.2

i am using Swagger-ui version 3.0.2, i have hosted it locally and provided it my Json file and API it opens the document fine and lists all the method in the json file, after i put basic ...

Swagger: Add description with ref

I want to add a description to an object property that his definition is referenced. Something like that: newCreditCard: type: object properties: billingPhone: ...

Swagger UI model rendering issue in WSO2

Swagger UI in a WSO2 application renders model schemas in the Model tab incorrectly. Currently it shows the HTML markup as is: It is supposed to look like this: I would really appreciate if someone ...

How to add oAuth info to swagger UI?

I've created a node server and a documenting the API with swagger using swagger-jsdoc. I'm using Auth0 for authentication and would like to be able to tell swagger about it so it can pass the right ...

Customize generated model names - Swagger UI

I'm trying to adjust the "displayName" of the model being used in an automatically generated Swagger definition. Currently, the model name being returned from code is something like this: b.c.d.e....

Rest API Token Based Authentication Mechanism with Swagger Not Working

I am trying to make an API call with rest token based authentication from swagger. But at server side, I don't find token in the request. I tried the same API call with poster and swagger. In Poster ...

How can I describe this complex json model in swagger

I'm trying to use swagger to describe a rest api I added to some code. This is one of my simple returns. Saw a couple good examples but didn't have any luck trying to make sense how to apply it to ...

validatorUrl : null NOT WORKING in Swagger

I am trying to disable the online validator error from swagger. I used validatorUrl : null But it is not working and i am still getting the error at the bottom of the page. On clicking of the ...

Dynamically populating Swagger UI enums

I'm constructing a web api for people to get data about project lifecycles... one of the services is "get all projects in phase X". Phases are determined by pulling from a table with another service, ...

Swagger annotation to get authorize button

I am using swagger to document my java REST API. X-Auth-Token should be send in a header of each api (except one). I would like to have the button like in the pet store V2 of authorize. Can be found ...

How do I find yaml code at localhost of swagger api-documentation?

I recently started using swagger for documentation and I am unable to access yaml for api documentation. I followed the following steps. I have written yaml in online swagger editor and generated ...

same page route using anchor tag in angular2

I have implemented swagger-ui(swagger-ui.js) in my angular2 application. When it is rendered and I click on any link(#!users/get_user) it routes to the link instead of scrolling to that div. window['...

Swagger not considering @JacksonXmlProperty for XML representation

I am trying to solve a resource representation issue where my model has a property which is a list of an object. In Swagger 2 UI json is represented corrects but xml shows it in a different way. ...
Translating... 0%