Newest swagger Questions

Q&A for professional and enthusiast programmers

How to generate Swagger JSON file for dynamic object manually without using any POJO

I am looking for creating swagger file for my API using program (manually) as my api deals with dynamic objects so i cannot generalize it hence not able to use annotation for swagger. The option left ...

Looking for lifecycle docs how to constantly update swagger and implement with java

Can someone point me to documentation on how to update Swagger and constantly release it with Java. Is there an automated way I can update a Swagger interface, generate Java code based on that ...

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

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

Whitelabel Error Page in spring boot swagger

I have created a new Spring Boot application with different modules. In the main module I created a MySwaggerConfig class: @Configuration @Profile("production") @EnableSwagger public class ...

How to generate a Swagger file for a REST API

My requirement is to generate a Swagger File for a given ReST API URL. I have invoked the below mentioned URLs using POSTMAN client and it was working fine. However, for this URL to use in ...

How to provide texts to swagger in a properties file for spring restful service?

I am creating my spring restful service documentation with swagger. Sample request handler method and its documantation below. It works: @ApiOperation(value = "Returns user details", notes = "...

POST multiple collections

I have a method like this (the parameters name intentionally stupid for this example): [HttpPost] [Route("rest/myMethod")] public IHttpActionResult MyMethod(string param1, DateTime ...

swagger does not display calls which start with a path parameter

I encountered that when having a route to a path with a path parameter at the beginning, this method is not been display when accessing swagger via swagger-ui. Example: [Route("/{Version}/userdata", ...

Bluebird Promise with Swagger: return is not a function

I'm using Swagger to create my JS API client for calling a set of REST endpoints. I'm configuring the Swagger client to use Promises (new Swagger({ spec: spec, usePromise: true })). I require ...

C# web api swagger integration

I have a problem to integrate swagger ui with my web api, and i don't have any idee what is the problem. When i call in the browser the swagger, the page http://localhost:56381/swagger/ui/index is ...

How to integrate a swagger connexion api into an existing flask application

A Python Flask API can be generated from a Swagger API specification with swagger-codegen. The resulting Python Flask server implementation uses the Connexion library, which creates the API based on ...

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

While creating the REST API documentation using Swagger 2.0 getting this error

Why am I getting the "operation cannot have multiple body parameters" error in the Swagger Editor?

Use Swagger API specification to build RESTful Java Web Application running on Play Framework

I'm in need of generating code for the controllers section on my Java web application running on Play Framework, by using Swagger API specifications (YAML files) written by me. I found a project on ...

Azure API Management Service not recognizing swagger

I'm trying to use the Azure API Management Service. When I go to Import API, I am currently getting the error below. One or more fields contain incorrect values: Parsing error(s): Unexpected ...

Swagger API - multiple @ApiImplicitParam for JSON POST

I am trying to create my first REST app and I am using Swagger to document and test it. My controller receives POST in JSON: "body": { "search_querry" : "text", "page" : 1 } I thought I can ...

How to Parse Json String received from HTTP and loop through the values

I'm using Scala and Swagger and i need help figuring out how to loop through the values in the json and use those values for checking and others. The json string that is returned after HTTP get ...

do I really need swagger.json and swagger.yaml created in order to use Swagger for document a rest application

I spent a whole day following Swagger guidance that basically inform that after added swagger dependency and deployed/started it I will get two files describing my rest services according to the use ...

Whats is the better options for Swagger client(schema v2) with angular 1.5?

Well, I want use a Swagger(schema v2) with AngularJS(v1.5+) but I don't know what module is the better option for my requirement. I found in Saint-Google some libraries: swagger-angular-client - ...

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

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

What is wrong in this Spring Boot Swagger configuration to obtain the documentaion of my REST API? Why I can't access to the documentation?

I am working on a Spring Boot application and I am trying to configure Swagger to automatically generate my REST service documentation. I am following this tutorial: http://www.baeldung.com/swagger-2-...

Create swagger.json in java/scala

I would like to create valid swagger.json file in runtime. The brute force approach would be to model whole sagger spec in my program and then just build the swagger.json by hand taking all ...

How do I access swagger generated Java classes in Android Studio?

I used this gradle plugin with a yaml file: https://github.com/thebignet/swagger-codegen-gradle-plugin to generate model classes that I want to use in my android app were generated in the folder: ...

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

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

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

Best practices for securing NodeJS API created with Swagger

I have created an API with NodeJS and Swagger that works well, but anybody can call it and I want to restrict it to the users that have a valid API Key. Are there any best practices that I need to use ...

Swagger Spring Annotations: proper response formatting

I have Swagger code annotations for documentation purposes similar to the following: @RequestMapping(value = "/campaigns/{campaignUuid}", method = RequestMethod.GET) @ApiOperation(...

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 use swagger php for yii application

I want to use swagger php for documenting my REST API. I have my Web application build in yii. I searched for a video tutorial on the same but could not find it for php it was for node and spring. ...

Swagger API Operations Ordering

how do I sort my operation by method alphabetically e.g. DELETE, GET, POST, PUT. I have read from this post but it is in html but in my case, I have integrated Swagger into Spring-Boot so I need to ...

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-Codegen generate clients in multiple languages

I am currently trying to create Swagger clients using the Swagger-Codegen for multiple languages. Everything is fine for a single language, but when doing it for multiple languages the complexity ...

Update JSON file without destroying JSON format

I'm trying to update a Swagger JSON document in Powershell. I need to add a couple of properties and values if they do not already exist on the object. The code for doing this is pretty simple: $...

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

Swagger documentation for facebook graph api

Can we build a swagger definition in a json format for facebook graph api?

Unable to use generated client from swagger api

I am trying to use a third party api in the project where the way to access those apis are provide in swagger When i generate the client using swagger and try to use in my local i am getting the ...

Swagger - Does not support downloading of multiple files?

I am trying to create a response that will return 3 files with one request. However, if you give it to the response body, I am in trouble because I do not know whether it can be realized. The method ...

OpenAPI or swagger.json auto discovery

Is there any spec or convention on URL where one should place swagger.json (or whatever name it is agreed) so that public API of my site can be automatically discovered?

Swagger returning subdefinitions

I have a definition called User. This is the yaml-code for it: User: title: User type: object properties: email: type: string I also have two other definitions. These definitions ...

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

How do I generate swagger meta data file from Azure API App solution?

I want to generate swagger meta data, so I can generate client code. I want Azure API App #1 to consume other Azure API App #2 . Is it possible to generate metadata from locally hosted Azure API ...

Generate code for multiple swaggers in the same project

How do i generate code for multiple swagger files from within the same module/project in one pom.xml. In my application client had provided a swagger and we have one of the backend API to be called ...

Spring Security with SwaggyDoc

I am using swaggydoc to provide an automated API site for my grails application along with Spring Security. I am using the grails rest controller along with grails 3.2.1 , spring security 3.0.3 and ...

Django REST Swagger: How to build SecurityDefinition in Swagger settings

I'm trying to build the Swagger settings for SecurityDefinition in order to get the following result in openapi.json: "securityDefinitions": { "UserSecurity": { "type": "apiKey", "in": "...

Spring Boot Swagger 2 Configuration Error creating bean with name 'documentationPluginsBootstrapper'

I have problems with configuration of Swagger in my Spring Boot project. I was following the basic instruction for this, and somehow it doesn's work. Here it is: pom.xml <!--SWAGGER--> &...

Duplicate parameters output through Swashbuckle/Swagger

Code is further down in the post. Question: I would like Swashbuckle to generate the following two "GET" requests: 1. mydomain.com/api/books?apikey=12345567891011121314151617181920 2. mydomain....

Multiple documentation created for the same API

In my project I configure routing as follows: config.Routes.MapHttpRoute( name: "ApiLogin", routeTemplate: "Api/Default/{controller}/{action}", defaults: ...
Translating... 0%