Newest 'swagger-ui' Questions

Q&A for professional and enthusiast programmers

isset method returns false even when the key is present

I am using lumen integrated with swagger for writing a Rest api. The issue i am having is, that the isset() method of php is returning false, even when the key in array is present, mentioned is my ...

Error when running Swagger-tester for Heroku-pets example

I was trying to test heroku-pets example file(http://editor.swagger.io/#/) using swagger tester. I am getting an error- ERROR:connexion.api:Failed to add operation for PUT /pet/ ResolverError: <...

Consumer Aware Feature for Spring-fox-Swagger

I am using springfox-swagger-2.4.0, and was successfully able to view the doc on separately deployed swagger-ui. Screenshot below: Currently, we have around 20 API and all the listing are on /rest/...

Swagger UI behind google end point

I've setup a Google Endpoint in front of a Google Container Engine service. The container is running Loopback, which serves the swagger UI by default at /explorer. I would like to access the UI, but ...

Add authorization header to Springfox

I'm using spring boot with an angular 2 front end and I want to add authorization to my swagger configuration. My current springfox setup looks like: @Configuration @EnableSwagger2 public class ...

what are the advantages and dis-advantages of using swagger, RAML and API-blueprint [closed]

Swagger, RAML and API Blueprint all three are top specification formats for REST API's. I want to know which one is the best. I have gone through many blog posts, i am really confused which one i ...

Is there anything available to display custom error code in php swagger?

Am new for php swagger and i worked to display custom error code while running api in swagger.

How to mark api parameter as optional for Swagger UI for Web API 2?

I am using Swagger for WebApi 5.5.3 nuget package for API documentation. In swagger UI it is showing required option for optional parameter. I tried XML comment option in Visual studio. Below is the ...

Swagger for camel servlet

I am using Camel Rest DSL and I also want to expose my WS over swagger. So I did it like this: @SpringBootApplication @Configuration @EnableSwagger2 public class RiskyGatewayApplication extends ...

Specify swagger.json url for swagger UI wildfly swarm

I have REST application with Wildfly Swarm and using default settings I have swagger.json on url /swagger or /swagger.json and ui for swagger on url /swagger-ui. But UI parsing petstore from example ...

Swagger : List endpoints which are in another dll

I have a ASP.NET web API, which is OWIN hosted. It refers to another project (c# library) which contains Contoller, endpoints. Is it possible to configure Swagger to show the endpoints which are in ...

Using different Swagger Models properties for collection/detail request/response

I'm beginner of Swagger, and I'm trying to define endpoints which have: Some read-only properties that isn't allowed in request but show in response Some white-only properties and hidden that allowed ...

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

Response Model Schema is coming as empty object in Swagger - C# | Swashbuckle

This is my API: /// <summary> /// Gets activity logs. /// </summary> /// <param name="locationId">Location id.</param> /// <param name="...

Can I obtain the Swagger documentation from pre existing Java code?

I am absolutly new in Swagger and I have the following doubt: I know that gnerally I have to create Swagger document before code my REST API and the use this document to create my API (I know that ...

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

How change language in Swagger-UI using Swashbuckle

How change language to pt-br in Swagger-UI using Swashbuckle? I'm add in SwaggerConfig: .EnableSwaggerUi(c => { c.InjectJavaScript(Assembly....

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

Web Api How to add a Header parameter for all API in Swagger

I searched for possible ways to add a request header parameter that would be added automatically to every method in my web-api but i couldn't find a clear one. While searching i found that the ...

How to extract parameters from an object to show in parameters in documentation

I have the following API endpoint: @ApiResponses( value = { @ApiResponse(code = 200, message = "OK", responseHeaders = { @ResponseHeader(name = "X-RateLimit-...

Cant locate swagger.json on Java + Jetty + httpservlet + swagger integration

I recently followed this blog to integrate swagger in my embedded jetty project but after running, I'm not able to access the swagger.json file on any path combination. Accessing the servlets for the ...

Grape-api swagger docs via GrapeSwaggerRails not including base_path

tearing my hair out with Grape Rails / Swagger. I want the doc.json to return the base path to the api, but anywhere I try base_path, nothing appears in the JSON. (note I'm using swagger 1.2 as needed ...

I can't get swagger.json neither swagger.yaml created althought I followed the guidance step by step

I followed strictly https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-Jersey-1.X-Project-Setup-1.5#configure-and-initialize-swagger (Using Jersey's container Servlet (with web.xml)) but ...

No detail in Swagger docs for Spring Data Rest's GET requests

I'm testing out Swagger-UI with a rest api generated by Spring Data Rest. I have a very basic repository: @Repository public interface EmployeeRepository extends JpaRepository<Employee, Integer&...

Security Roles are not displaying in swagger ui

I am unable to display security role in swagger ui. I have generated security roles through swagger maven plugin and I can see them in a yaml file but when I run that yaml file in swagger ui I cannot ...

Unable to override Basic Auth Swagger UI

All the rest end points are secured by Basic Auth in my application. I am unable to test with different credentials as it always takes first given crendentials. window.swaggerUi.api....

Django Swagger Different HTTP methods for different API

I am documenting API using swagger for Django, but I noticed that there are GET, POST, PATCH, DELETE methods for API even though I have specified in Django code only GET method. How can I remove ...

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

Generate data from swagger model definition?

I'm building a fuzzer for rest application that have swagger specification. I want to test all available path from the swagger spec, generate data to test servers, analyse responses code and content, ...

Add Authentication to /swagger/ui/index page - Swagger | Web API | Swashbuckle

I'm working on a Swagger (Web API) project. When I first run the application it shows the Login page for Swagger UI. So, a user first has to login to access Swagger UI Page, However, if user directly ...

How should I expose byte[][] as a function parameter in Azure API Apps and Swagger?

I have a byte[][] that I need exposed as a function parameter via Azure API Apps. I will use Logic apps to push an array of binary data to this. What is the best way to expose this in Azure API Apps,...

Swagger UI blank PDF download

I'm having a problem with Swagger UI when trying to download a PDF file. Everything works fine outside Swagger UI (using curl or Postman there is no problem), but when I try to download via Swagger UI ...

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

How to generate swgger.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 ...

Springfox Swagger generation creates odd schema

I am using Springfox-swagger to generate a Swagger page for my Spring Boot REST service. As a part of one of my POJOs that I serialise to JSON I use: javax.money.MonetaryAmount java.time.LocalDate ...

How to use Flasgger with Flask applications using Blueprints?

I am adding Swagger UI to my Python Flask application using Flasgger. Most common examples on the Internet are for the basic Flask style using @app.route: from flasgger.utils import swag_from @app....

Swagger 2: use enum reference in query parameter of array type

Can not get how to use reference of string type with enum values in array parameter. I can make reference in items key and it is working, but Swagger produce error: Not a valid parameter definition ...

how to add a route to swagger-ui

I've been trying to add a route (health check) to swagger-ui. But haven't been able to figure out what is going on? I added a routes object to SwaggerUi.js: routes: { 'health': 'health' }, health:...

Rails 5, Swagger UI not generating documentation json files for controllers

I was following this Swagger tutorial to get familiar with the swagger environment and API documenting. I looked all the related issues on the sample app's repo but none of them worked for me. When I ...

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

Enabling Swagger Api-key security

I'm new to using swagger as my UI to test and debug and show documentation of my web API projects. in a recent project (type: ASP.NET Web API) i encountered a problem, my API doesn't have any kind of ...

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

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 Controller Mappings

Working with Swagger-API I am trying to set all of my services that start with /crud.* in the same swagger container, but the methods are defined in 2 separate controllers. I know swagger is ...

How to give a swagger parameter default value?

I want somes params on swagger have its own default value. Is there anyway to give a default value ? like this this note has to be filled automatically with "stackoverflow"

Spring REST / Swagger / Postman - Damaged/Blank File being dowloaded

I followed this post for the functionality: client can download a file(ie, csv,pdf and zip) as of now. But either I am getting pdf which is blank or when trying with zip file, it is coming as ...

include yaml file as a reference in another yaml file swagger

I want to include a yaml file in my main yaml file I have used ref keyword but that one is not working, below is my yaml main yaml file --- swagger: "2.0" info: $ref: /another.yaml version: "1" ...

Index.html page for Swagger

Have implemented code for Swagger+ Spring Boot. The APIs are getting correctly documented at http://localhost:8080/swagger-ui.html. Have to configure the UI display page. But there is no html page ...
Translating... 0%