Questions tagged [swagger-ui]

Swagger UI is a collection of HTML, CSS and JavaScript objects that dynamically generate documentation from a Swagger-compliant API

Swagger UI is part of the Swagger project.

It adds form to your APIs by making them look good and presentable so that client code can be written easily, at the same time it also makes documentation easier by integrating it with code.

It originated out of the Open API Specification. The source can be found here.

A sample Swagger UI can be found at the Pet Store.

4353 questions
2
votes
0 answers

Swagger Response Messages using Django

views.py: from django.http import JsonResponse from rest_framework import schemas from rest_framework import status, response from rest_framework.decorators import api_view, renderer_classes from rest_framework_swagger.renderers import…
Avijit Karmakar
  • 8,890
  • 6
  • 44
  • 59
2
votes
1 answer

user and role authorization in swagger api express

guys on my exisiting api i already have user authhication using Bearer security. Using http header api_key and later tokens. My problem seems to be i have diffefrent end point that are only need to be consumed based on roles. For example to post a…
Develop4Life
  • 7,581
  • 8
  • 58
  • 76
2
votes
1 answer

using apache camel REST DSL using restlet adding swagger

I am using apache camel REST DSL using springboot. All the configuration works fine. Now I want to add REST documentation using camel swagger java component. The REST DSL and swagger java, works out of the box. I can see the JSON output of the…
rak22
  • 338
  • 4
  • 13
2
votes
0 answers

Docker container for Swagger UI not loading

Running the following command results in 404 error in browser for 127.0.0.1:80 or 127.0.0.1:8080: docker pull schickling/swagger-ui docker run -d -p 127.0.0.1:80:80 -e API_URL=http://localhost:4000/swagger schickling/swagger-ui docker pull…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
2
votes
0 answers

Swagger is stripping the website name off the Base URL

I'm using swagger but when I host my webapi in IIS, swagger is stripping the website name off. The website is a virtual directory/application in IIS called LotsWebApi. When I hit this url: http://localhost/LotsWebApi/swagger/ui/index.html I get…
FeeFiFoFum
  • 1,719
  • 1
  • 11
  • 18
2
votes
0 answers

Jersey (rest) file upload with @FormDataParam and no files gives 400 bad request

I've made a resource with Jersey, that can handle file uploads in @FormDataParam-annotated parameters (the resource is configured to receive query and header parameters too). Testing with Swagger-UI, as long as I send in a file along with other…
watery
  • 5,026
  • 9
  • 52
  • 92
2
votes
0 answers

Failed to customize Swagger UI in my project with Swashbuckle

I followed the instruction and added two files as "Embedded Resources" in my Swagger folder: APIDemo | |------ Swagger | |----index.html |----style.css My SwaggerConfig.cs: .EnableSwaggerUi(c => { …
Bagusflyer
  • 12,675
  • 21
  • 96
  • 179
2
votes
1 answer

Passing a list of object in ServiceStack

I have created a customer service using ServiceStack but i am not able to pass a list of object from this method. Customer Service - public class EntityService : Service { /// /// Request for entity information list …
Dev
  • 295
  • 1
  • 4
  • 22
2
votes
0 answers

Swagger-ui + oauth -> index.js:24 Uncaught TypeError: Cannot read property 'api' of undefined

first of all i am using a bit modified version of the standard html/js code offered from swagger-ui. Changes are rather simple, instead of using only a single SwaggerUI element like: window.swaggerUi = new SwaggerUi({ …
Gobliins
  • 3,848
  • 16
  • 67
  • 122
2
votes
0 answers

Springboot, springfox, more than one API

I have one application with Springboot (1.3.0), Springfox-swagger2 (2.2.2) and Springfox-swagger-ui (2.2.2). I have configured two APIs, on of them show the docs of some services in certain paths (/my-root/internal.*) and in the other the rest of…
Cucho
  • 21
  • 2
2
votes
1 answer

Nested query parameters in Swagger 2.0

I'm documenting a Rails app with Swagger 2.0 and using Swagger-UI as the human-readable documentation/sandbox solution. I have a resource where clients can store arbitrary metadata to query later. According to the Rails convention, the query would…
amcaplan
  • 986
  • 6
  • 7
2
votes
1 answer

ECMA 262 regex "^/" does not match input string "https://domain.herokuapp.com"

I have deployed my play 2.4 API based project to heroku. On production the api is seen on /swagger but it also shows some error. On navigating through the error it shows the json. { schemaValidationMessages: [{ level: "error", …
singhakash
  • 7,891
  • 6
  • 31
  • 65
2
votes
1 answer

Java Swagger UI - How to properly configure enums?

I am using Swagger-UI with Java spring/hibernate. The Swagger UI version is 2. I am having hard time in using enums. I have a POJO model in which I have following enum property declared. @Enumerated(EnumType.STRING) @Column(name =…
jarvo69
  • 7,908
  • 2
  • 18
  • 28
2
votes
0 answers

Rails Swagger-UI can't read swagger JSON

I've been tried a lots ways, but I just stuck here. Grape API can do post and get perfectly, but the swagger-ui encountered some problems. I put swagger-ui in public folder, when I open it. It threw Can't read swagger JSON from…
rj487
  • 4,476
  • 6
  • 47
  • 88
2
votes
1 answer

How to change Swagger-ui URL?

I have tried to change the swagger URL, right now i have "http://localhost:8080/context-root/rest/swagger-ui.html", i want it to be "http://localhost:8080/swagger". I tried using the DOCKET.Host("swagger"), but browser is spinning. And its not…
prathap
  • 21
  • 1
  • 2
1 2 3
99
100