Questions tagged [swagger]

Swagger is a framework implementation for describing, producing, consuming, and visualizing RESTful web services, based on Open API specification

0
votes
0answers
4 views

how to define nested array object in swagger 2.0

I try to define an object array in swagger as response: /product: get: operationId: api.product.read_all tags: - Product summary: Read the Products description: ...
1
vote
0answers
19 views

Swagger code generation java, XML attributes

I'm fairly new to swagger and struggling for a while now. I'm using the maven swagger codegen plugin (groupId: io.swagger.codegen.v3, artifactId: swagger-codegen-maven-plugin, version: 3.0.0): <...
0
votes
0answers
7 views

Recommended way to install swagger ui or swagger editor

Going through this GitHub repo swagger Github repo it looks like there are 2 ways one can implement swagger: 1. separate from the app 2. embed it into the app My question here is, which is the ...
0
votes
0answers
12 views

Setting response content type for swagger using annotations in scala

I am trying to take a file as input from swagger and trying to send {status,data,message} as output,the functionality is working fine except for response which is showing response body as in this ...
0
votes
0answers
6 views

openapi 3 attribute conditional presence

I am writing an OpenAPI 3 sepc. Lets say I have a OpenAPI 3 model with 3 attributes. One of these attributes presence in a post request is conditional on the value of another attribute. The other ...
0
votes
0answers
5 views

How to use swagger with complex query data type for “get” request in spring mvc?

I used swagger to generate document for spring mvc project. For post request,it is OK. @ApiOperation("post") @PostMapping("post") public Map<String, String> post(@RequestBody Foo foo) { ...
0
votes
0answers
6 views

Swagger for Micronaut with maven

I want to switch to the Micronaut framework from Spring Boot 2. And I am struggling with the Swagger settings. In Spring Boot 2 project I have the following dependencies: <dependency> ...
0
votes
0answers
16 views

Swagger 2.0 Make group of property

I would like to make a common group of properties and use it when required by #ref(put/post) and any else method. Swagger 2.0 POST METHOD @SWG\Property(property="name", type="string", ...
0
votes
0answers
23 views

How to set dynamic basePath for swagger codeinginter

I am using swagger for codeginter and using lib https://github.com/panxp/codeigniter-swagger my question is how can i set base api path so i just get into /** * @package * @category * @...
1
vote
1answer
25 views

Swagger dependency not recognized by maven

i'm trying to add springfox/swagger to my spring boot app, however when added to pom file, versions of dependencies are not recognized by maven. Unfortunatley i couldn't find the reason behind it. ...
0
votes
0answers
5 views

Change Response type on Swagger

How do you change the response content-type on Swagger? I tried changing the media type to "content" : { "text/plain; charset=utf-8" :{ "ABC, XYZ" } Results in an error to remove additional ...
1
vote
1answer
8 views

What is the media type of an OpenAPI schema?

Whenever searching for this I find resources on how to specify the media type of a resource that the schema defines, but I can't see an answer on what the actual media type of the schema itself is. ...
0
votes
0answers
17 views

How can I prevent unused values in a JSON response from returning as null with Springfox in Java?

For example, my Spring boot Java API was returning: { "contact": "John Smith", "badgeNumber": "12345", "inProcess": true } Then I added SpringFox dependencies for Swagger and now all my ...
0
votes
0answers
16 views

Model OpenAPI 2.0 file download, type string:binary vs. type file

I'm a little confused how to model a file download with Swagger/OpenAPI v2. Take this small example: /files/{name}.zip: get: summary: Returns the requested ZIP file as "file download" i.e. with ...
0
votes
0answers
11 views

Resteasy & Swagger: issue with path in generated openapi json

Here are the relavant dependencies from pom.xml: <!-- Resteasy --> <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-jaxrs</artifactId&...
0
votes
0answers
9 views

Swagger 2.0 removing GroupPostData and GroupPutData and want to make it GroupData

I am using swagger 2.0 I want definition model as similar below /** * Definition * * @SWG\Definition( * definition="GroupPostData", * type="object", * @SWG\Property(property="name", ...
0
votes
0answers
12 views

Set full path to output directory for generated code using swagger and gradle

Im using the Gradle Swagger Generator Plugin plugin to generate models from yaml files. Im using the generateSwaggerCode command. Instead of generating the models in the build directory, I want them ...
0
votes
0answers
25 views

SwaggerUI: TypeError: Failed to fetch

I'm using a swagger ui instance on my tomcat8. It loads a .yaml file which describes a swagger specification. Everything is loading fine, when I try to use the "try it out" function it sends a http-...
0
votes
0answers
27 views

Django Base url Redirection for API

i am new to Django Python and working on redirection of Apis I am Having issues in Redirection. For ex : www.example.com which is working now and the second server is www.api.example.com in which i ...
0
votes
0answers
23 views

swagger.json endpoint throwing “404 Not Found” on WAS Server

I am using Jersey 2.x and integrated Swagger into my application. API Doc for Swagger Integration with Jersey : Swagger-Core-Jersey-2.X-Project-Setup <dependency> <groupId>io....
0
votes
1answer
8 views

swagger - how to add custom header parameters in request details

parameters: - in: "body" name: "body" description: "Pet object that needs to be added to the store" required: true schema: $ref: "#/definitions/Pet" - in: "header" name: "...
1
vote
0answers
9 views

Testing API with Swagger/OAS

I've spent some time documenting an API with Swagger/OAS 3. I want to validate our current API conforms with the OAS 3 document. How can I do this?
0
votes
1answer
20 views

How to override the default loopback model API paths

How can we override the default loopback REST API model end points? For example, I would like to invoke a custom model method named list when the following GET API is invoked. I am referring to the ...
0
votes
0answers
10 views

How to generate API key in Swagger?

I am new in using swagger and apis. I can't figure out how to generate an api key using Swagger. Can someone guide me in right direction? Thanks
3
votes
0answers
18 views

How to customize error message in swagger when mandatory fields value are not sent in API?

Below is my api.yml: openapi: 3.0.0 info: title: 'AutoDelievery API' description: 'AutoDelievery API Documentation' termsOfService: 'https://www.yopmail.com' contact: name: ...
0
votes
0answers
31 views

How to set escape {proxy+} as a path with gin and swagger?

golang newb here ;) I'm using gin, with an example API being: // @Summary GET proxied request // @Produce json // @Router /exampleapp/proxy/{proxy+} [get] func getter(c *gin.Context) { ...
0
votes
0answers
25 views

c# swagger generic types ProducesResponseType like t IEnumerable<KeyValuePair<string, int>>

Couple of our API controller produces response of type ProducesResponseType(typeof(IEnumerable< KeyValuePair < string, int> >) (int)HttpStatusCode.OK) Swashbuckle.AspNetCore version 2.40 it ...
0
votes
0answers
11 views

How to use a Swagger generated client (Feign)

After generating a client library as explained on this post I'm trying to use this library in my consumer, I added the dependency and added @EnableFeignClients annotation on my main class. However, ...
0
votes
1answer
18 views

What does * mean on web api

I am studying Udaru and on Swagger Web API there is * on resource here. i would like to know what does this mean ?
0
votes
0answers
28 views

Java, Spring boot, Swagger and form base authorization

I've created rest-api with BasicAuthenticationEntryPoint. It looks like this @Component public class AuthenticationEntryPoint extends BasicAuthenticationEntryPoint { @Override public void ...
0
votes
0answers
12 views

OpenAPI and CLI generators tools for server stubs

I'm familiar with RESTful APIs, however, I'm new to Swagger and Open API. I'd like to clarify the role of tools such as openapi-generator-cli and how to make the best use of these tools. Using the ...
0
votes
2answers
21 views

Controllers loaded from assembly in ASP NET CORE project cannot be found by swagger

I have an asp .net core console project that is loading an API assembly by using ApplicationPart. I need to add swagger to expose the APIs but when I installed Swashbuckle to the console project and ...
0
votes
0answers
17 views

Vertx : Valid yaml causes null pointer exception in OpenAPI3RouterFactory

I have a yaml that goes : openapi: 3.0.0 info: version: "1.0-Snapshot" title: "Hub-Interface v2.5" I cannot share the full file but know that the YAML is parsed and presented correctly when i ...
2
votes
0answers
40 views

Swagger in Azure Functions V2

I'm creating a V2 Function App and want to use Swagger/Open API for docs, however it is not yet supported in the Azure Portal for V2 Functions. Any suggestions on how I can use Swagger with V2 ...
0
votes
0answers
17 views

How to handle db objects with Swagger?

Hey fellow programmers, I've got a question regarding Swagger.io, I'm looking for the best way to pass objects. Recently I made a REST-api with Swagger and deployed it with Restlet studio. It's all ...
0
votes
1answer
24 views

API-Platform: Filtering Custom Data Provider

I'm currently experiencing issues when trying to filter my results when using an external API source (Stripe) in API-Platform. What I need to be able to do, is return a list of subscriptions for a ...
2
votes
0answers
25 views

How to split swagger API documents by versions and groups in asp.net core

I have an API which has separate swagger documents for each version. Currently in project configuration I am iterating through ApiVersionDescription list and creating separate swagger document in ...
1
vote
0answers
14 views

How to change swagger response for the class JSONObject

ResponseEntity<JSONObject> getJsonObject(@ApiParam(value = "class path",required=true) @PathVariable("hdfsPath") String hdfsPath) I edit the response class "JSONObject" manually, but i do not ...
0
votes
1answer
28 views

HttpPost a list of items in Swagger

I have a model class like so - public class Request { public List<ProductIDs> ProductIDs { get; set; } public string Pid { get; set; } } In Swagger, it shows up like this - In the ...
2
votes
0answers
16 views

Swagger 2.0 (Open Api 3.0) with Play Framework 2.6 (Java)

There is swagger-play plugin, that says to support Swagger 2.0, however actually it uses swagger annotations 1.5.x, not 2.0, thus, not supporting Open Api 3.0. Has anyone managed to wire Open Api 3 ...
0
votes
0answers
10 views

Are there dummy operations that would allow me display documentation in Swagger UI?

I am looking at an API with a huge amount of information in the overall "description" field. We're talking a table of contents and multiple sections. Really detailed and broad docs. An external ...
0
votes
0answers
8 views

django-rest-swagger urls not getting mapped with swagger

I am trying to implement django-rest-swageer for documentation i have added the following in my root urls from rest_framework_swagger.views import get_swagger_view schema_view = ...
0
votes
0answers
24 views

How to put auth around the documentation endpoint for swagger UI in flask-restplus?

I love flask restplus and swagger UI, the only thing that I haven't been able to figure out is how to put a custom auth decorator around the call to the documentation endpoint to prevent others from ...
0
votes
0answers
12 views

Why Swagger Codegen is giving config class not load error when running from java?

I am trying to use Swagger Codegen from within java code to build an API automatically in spring like this: String[] args = new String[4]; args[0] = "generate"; args[1] = "-i swagger.json"; args[2] = ...
0
votes
0answers
33 views

Swagger 2.0 java codegen metamodel

Starting from a simple swagger definition, like: swagger: "2.0" info: title: Sample API description: API description in Markdown. version: 1.0.0 host: api.example.com basePath: /v1 schemes: - ...
1
vote
1answer
23 views

Send bearer token in Swagger using Swagger-Net

I have recently made the transition from Swashbuckle to Swagger-Net. One problem that I'm having after making the change is that now I'm unable to call my APIs which require a token sent in the ...
1
vote
1answer
19 views

remove some routes from sails + swagger autogenation

I have a sailsjs API and I want to integrate it with swagger. I tried various npm packages which do the trick of generating the swagger.json confifg file. The problem is it generates swagger configs ...
0
votes
1answer
30 views

Passing in arguments in a Dockerfile for a Swagger generated Go server

I'm new to writing Dockerfiles and using Swagger so I was wondering if someone could help me with one thing. I'm building a binary from Swagger generated server code and I need to pass in arguments ...
1
vote
0answers
22 views

my api xml comments are not updating in swagger UI .NetFramework Not .netcore

Only some of the summary tags on my controller actions are showing up. And if I change the description in any of them it does not update in swagger UI it still displays the original first time I built ...
0
votes
0answers
6 views

How to display proper error message in Microsoft Flow Connector?

I have developed a CONNECTOR for Microsoft Flow using OpenAPI definition. If something goes wrong in backend API I am seeing "Cannot read property of 'error' of undefined". I am looking for showing a ...