Newest 'swagger-ui' Questions

Q&A for professional and enthusiast programmers

Cross Domain Issue : Camel Swagger with Jetty in a Karaf Environment

I'm working in a OSGi environment project. I have discovered that camel offer an integration for swagger. So i have used it. It's working well until launching a request with swagger UI. I mean when i ...

swagger-node only to serve API Docs

Is there a way to install and start only "reduced" Swagger-node configuration, being able only to serve API specs? I am not using swagger-node web server, as I have my own. I would just use swagger-...

How to show XML comments of class properties in Swagger (MVC 6 Web API JsonResult)

I've added XML comments to my class members but Swagger won't show them in the UI. Am I doing something wrong? UPDATE: It looks like you can't document your model classes in Swashbuckle (5.5.3) ...

How i can copy “../node_modules/swagger-ui/dist” with angular-cli

How I can copy ../node_modules/swagger-ui/dist to dist/swagger-ui with angular-cli Like. "apps": [ { "root": "src", "outDir": "../../../target/www", "assets"...

How to change swagger request host URL? I'm running my api @ localhost:8080/api/v1/, but swagger is requesting on http://127.0.0.1:8081/

Is there a way to change this? If I use postman or something to hit localhost:8080/api/v1/findFriends?zip=10001, I get some results back. Thanks

Hide/remove Spring MVC endpoint in Swagger2

I'm using Swagger 2 for API UI. So, my gradle.build has: compile "io.springfox:springfox-swagger2:${swaggerVersion}" compile "io.springfox:springfox-swagger-ui:${swaggerVersion}" I've configured ...

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....

How to post Json request in Swagger

I have a Json request as follows and I need to POST this in swagger. { "example_json": { "myid":"abc", "country": "GB", "card":"123", "lan": "en-GB", "application": "ecn", "tarl": 1, "os": "android", ...

Swagger-ui editor gives 403 error

What is wrong here? swagger: "2.0" info: version: "2.0" title: Web API # during dev, should point to your local machine host: url.com # basePath prefixes all resource paths basePath: /v2.0 # ...

Where does swagger_yard place the JSON it generates?

Where does swagger_yard place the JSON file it generates? It doesn't say so in the README, https://github.com/livingsocial/swagger_yard I'm trying to point swagger-ui_rails to that JSON file.

How to pass Array of Objects as parameter in Java swagger UI?

I need to pass an array of objects as parameter in java Swagger UI. I am unable to do it. However I can easily pass array of string as parameters. But cant figure out how to pass array of objects ...

Keycloak integration in Swagger

I've a Keycloak protected backend that I would like to access via swagger-ui. Keycloak itself is provide the oauth2 implicit and accessCode flow but both I didn't got work. Currently Keycloak's ...

Swagger UI not showing responses examples

While using swagger-editor I create the below YAML that shows an example of the response object. It's properly displaying in the swagger-editor. When I then download the JSON and display it in ...

Swagger Multipart Upload service for json and a file. Empty Request Body

I want to create an upload service that accepts json and a file using multipart in Apache CXF. The service generates SHA1 checksum to check if it received a file correctly. I also want to make the ...

stackoverflowError when run swagger2 with spring boot

i config swagger2 with spring boot . that works good in small project. but in big project with many rest cause stackOverflowError. swagger config: @Configuration @EnableSwagger2 public class ...

Swagger UI/Swashbuckle response description with caret not rendering correctly

I am using Swashbuckle with Swagger UI in a .Net project. I am using the following attribute on a controller. [SwaggerResponse(HttpStatusCode.OK, "IEnumerable<EmployeeModel>", typeof(...

Swashbuckle doesn't render HTML Swagger documentation properly anymore

I've got Web service methods which return the same HTTP response for different reasons, such as a 400 Bad Request for different qualities of posted data. I use Swashbuckle to generate the Swagger API ...

Swagger-ui in Dart

I'm using Dart, and i want to implements swagger-ui, as a web on my proyect. I have the json/yaml file of my API and that API running on local. The JS+Css+Html Option of swagger-ui works fine, but, is ...

How to access swagger yaml defined objects from javascript

I used Swagger Yaml to describe an endpoint and generate the mock server. The existing endpoint (that I'm mocking) doesn't follow RESTful principles 100%, so I simply want to overwrite the response ...

Spring Boot and Swagger

I have a spring boot 1.5.1RELEASE app that I am trying to use Swagger with. I added the dependencies: compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.5.0' compile group: 'io....

How to generate swagger.json

I am using java spring boot framework to create REST api for my project and I am using "springfox-swagger2 and springfox-swagger-ui" for generating swagger documentation. I am able to see my ...

Swagger UI Multi level tagging

I just started working on Swagger api 2.0 recently.I am looking for some ways to organize the API documentation. Currently am using @Api(tags = {"Heading1"}) annotation to tag each api. Now the ...

Swagger UI integration

I am trying to integrate swagger for the first time for my Rest API documentation but I am getting this error "Can't read swagger JSON from http://localhost:8080/REST/rest/swagger.json" Here is my ...

swagger-ui not working in docker container

swagger-ui does not render when Spring Boot application is running in a docker container, only swagger.json. It works fine when running locally (IntelliJ). I'm not clear on how boot adds static ...

How to pass array of string as parameters in swagger ui

Below is the REST api which i want to document using Swagger UI @ApiOperation( nickname = "alertForBundleId", value = "alertForBundleId", notes = "", ...

Add type definition for type not used in any api method

I have an api end point that takes a custom header. This header is a object that looks like this: User: {"UserId":"someguid"} If I have the type as a parameter in a api method I can do as follows: ...

Swagger UI error in lower right

I'm getting this error data from swagger-ui when I load the JSON that was written with swagger-editor. { "schemaValidationMessages": [ { "domain": "validation", "...

How to configure oAuth2 with Swagger ui in spring boot rest application

I have spring boot rest api (resources) which uses another spring boot authorisation server, I have added Swagger config to the resource application to get a nice and quick documentation/test platform ...

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 ...

Swagger UI incorrectly render java.util.Map

I am trying to integrate my Spring MVC application with Swagger to get REST API documentation clean and up to date. But I run into a problem of representing java Map in swagger UI. Here are my simple ...

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://...

Remove authentication from Swagger so that WebScout works

We have a Asp.net web api service - access requires a SSL Certificate. Swagger (swashbuckler 5.4.0) works fine when I provide the certificate. Can I expose the swagger document without any ...

Swagger XML attribute and content definition

I would like to describe the XML response payload of a RESTful interface with swagger. However, I struggle describing a particular XML tag in the swagger data model. I can't get swagger ui to create ...

How can I describe this JSON object in swagger parameters?

I've looked at a few other related questions and I still can't seem to find what I'm looking for. This is an example JSON payload being sent to an API I'm writing: { "publishType": "Permitable", ...

Swagger-UI: Protect Swagger-UI access

I am using a locally hosted Swagger UI on top of Node on an EC2 Ubuntu instance. Currently, in a browser when I type localhost:3000/myproject, I get the rendering, which basically pulls: http://...

swagger api-docs get mixedup, when I try to hit one rest/api-docs it gives docs for all the rest calls

My swagger api-docs get mixed up though I access one rest api-docs, it shows api-docs for all the rest calls.

SwaggerUI auth redirect swaggerUiAuth of null

I'm trying to redirect a user if token doesn't exists in the cookie/localstorage. I'm doing a check whether a token exist if not then redirect to http://authserver.webazure.net (e.g url). if (...

ASP.NET Core resolve url in startup?

I would like to be able to register certain url's that take into account actual url of the resources. Specifically: the Swagger end point for my Web API documentation. public void Configure(...

Swagger Controller Mappings

With Swagger-UI I am trying to display methods that have the same base URL underneath one Swagger container regardless of which controller they fall under. Imagine this code. // Current Swagger ...

How to pass swagger api key in header

I'm trying to use Swagger for testing my WebAPI. I'm able to get it to accept the api key. But the key is being passed as a part of the query string. How do I make swagger pass it in the request ...

Camel swagger-ui disable on production

I am using this swagger in my project. I was wondering if anyone knows a way to disable and enable swagger in different environments?

Show only selected controllers in swagger-swashbuckle UI

I am currently using swagger in my project and i have more than 100 controllers there. I guess due to the large number of controller, swagger UI documentation page takes more than 5 min to load its ...

Exclude complete services from swagger-ui with servicestack

I am trying to figure out a way to hide/remove complete services from the swagger-UI. According to the documentation on the servicestack swagger integration there should be a Exclude attribute. But ...

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{...

How to use ResourceOwnerPasswordCredentialsGrant with swagger ui

I am using swagger, swagger ui with spring rest api to get a platform for testing/documenting the API, so I need to get oAuth2 authorisation working in swagger ui, I am using password grant with the ...

Lumen $request->all() returns empty array

I'm trying to make a POST request from Swagger UI to my server (Lumen), but everytime I just get an empty array instead. Swagger UI request: curl -X POST --header 'Content-Type: application/json' --...

I want to have the values of my variable at only one place (something like property file) rather than using @ApiModelProperty() annotation in class?

Here i want to avoid using ApiModelProperty() annotation for every variable and rather define a common property file and define these variables there and make swagger fetch variable values from that ...

How to create Dotnet Core WebApi endpoint returning a PDF that works in Swagger UI

I have a WebApi method returning a FileStreamResult containing a PDF. This works as supposed when using PostMan to retrieve the PDF. But when looking at the API using Swagger, the Download file link ...

Swagger and JSONAPI paging

We are using both JSONAPI and Swagger for the API in our Rails application, and also using the swagger-blocks gem to document the API for Swagger. For paging the specification uses square brackets, ...

WebApi controller summary is not showing on Swagger documentation

When I enable this documentation feature through Swagger I'm able to see all kind of information about my documentation but there is no details about my Controller name detail/description. How to ...
Translating... 0%