Questions tagged [swagger-2.0]

Swagger is a specification and framework implementation for describing, producing, consuming, and visualizing RESTful web services. Swagger 2.0 is the current generation of the spec and includes many improvements over 1.X. This specification is now known as Open API 2.0.

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: ...
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
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
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
0
votes
0answers
22 views

enable basic authentication in swagger UI

I have enabled the basic authentication on the swagger UI with the following configuration code in the SwaggerDocumentationConfig.java @Bean public Docket customImplementation(){ List<...
0
votes
1answer
57 views

Maven: package io.swagger.annotations does not exist

I want to document my project with swagger. I add swagger annotations and io.springfox dependencies to my project but when I run mvn clean package I have a lot of errors: PS D:\parent-project> mvn ...
0
votes
0answers
9 views

OpenAPI 2.0 - ability to specify minimum/maximum date

The OpenAPI spec includes the ability to specify minimum and maximum values for numeric values. I'm trying to figure out how to specify minimum/maximum values for date values. So for example, for a ...
0
votes
1answer
11 views

OpenAPI definition error with required path parameter

I'm just getting started with creating my first OpenAPI definition (version 2.0), and I keep getting stuck on this error: Invalid OpenAPI file. Please fix the schema errors:\n\"/parameters/...
0
votes
1answer
25 views

Swagger UI API-DOC not working no matter what

I have a Spring-Boot application which has some rest endpoints , everything is working fine (apis.yaml , application.properties) .... even : http://localhost:8083/api/v1.0/api-swagger returns the ...
2
votes
1answer
52 views

Accessing Swagger outside the Spring Boot Context path

My spring boot application have a contextPath like as shown below server.contextPath=/api I have added springfox swagger configuration and was able to get the swagger url from the given url like as ...
0
votes
0answers
16 views

How to define basePath in swagger 2.0

Reviewing the swagger documentation specifically the annotations I did not find how to define the host and basePath properties. Any idea where to set them? documentation consulted: Swagger-2.X---...
0
votes
1answer
22 views

SwaggerUI/YAML - Parser error bad indentation of a mapping entry

Screenshot of Swagger Editor & code Hi, I am new to API testing and Swagger and am getting this parser error message in the Swagger Editor and I am having problems locating the problem. Bellow is ...
0
votes
0answers
22 views

Is it possible to configure swagger and swaggerUI as separate module in multi module spring boot project?

I am thinking to separate the configuration for swagger as a sub-module of spring boot. I don't want to build the swagger code and configuration in the production environment. Could anyone please give ...
0
votes
0answers
14 views

How do I customize swagger json based on Operation level for same Java object?

I have few attributes which will be generated in post operation and I don't want swagger to display them. Same object is being shared by get operation where I need to display generated attributes as ...
0
votes
1answer
18 views

error when using my own input with swagger 2 and spring boot 2

I'm new to spring boot and trying to set up a swagger documentation for a web app I'm working on. It works quite well when my endpoints only require strings, list or other basic request bodies but ...
0
votes
0answers
26 views

How to retrieve Swagger Definitions from java

I annotated my various controller methods with swagger Annotations but now I want to be able to retrieve the info for a given method programmatically, e.g. I want to retrieve the APIOperation value ...
0
votes
0answers
25 views

Enable Json Editor using Swagger-UI

How can I use the Json Editor using the following github (https://github.com/jensoleg/swagger-ui)? What codes do I need to use in order to enable JSON editor for the request body? Tried changing my ...
2
votes
0answers
28 views

NoSuchMethodError due to guava jars

I am getting NoSuchMethodError and the error is: Caused by: java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.maximumSize(J)Lcom/google/common/cache/CacheBuilder; at springfox....
0
votes
1answer
10 views

Swagger on Apiary editor renders default value 0 as null

I'm using Swagger YAML file for producing interactive documentation on apiary.io. I've noticed a strange issue where if I specify a default value 0 for an integer, the interactive documentation doesn'...
0
votes
0answers
23 views

Swagger 2 Swagger-UI Customization

I just upgraded my team's RESTful framework to utilize Swagger 2 due to upgrading to Spring Framework 5.x and found that the operation endpoints must be shown and grouped by the controllers. e.g. ...
0
votes
1answer
20 views

swagger with list of elements in an array

I am new to swagger implementation. I have a query parameter 'Geschaeftsvorfall' which can be of string value A or P and when I hit the end point. I expect an array[validPsd2Ids] filled with integers. ...
0
votes
0answers
63 views

How does swagger-2 work with spring boot?

I want to know about the things that happens under the hood when we configure swagger with spring boot.
0
votes
1answer
26 views

Swagger Validator complaining about seemingly well-formed request

I'm using the swagger-express-validator to validate inputs to a small API server (using Swagger 2 format) My path definition is as follows /api/v1/users: post: produces: - "application/...
1
vote
0answers
27 views

Swagger with Spring Boot and AWS Lambda

I am trying to deploy a spring boot , Java, Swagger application, everything is working fine except the swagger UI. I am getting this below error. File path not allowed: /swagger-ui.html at com....
0
votes
0answers
22 views

How to remove the response body of an operation in Springfox Swagger?

I'm working in a REST service made with spring-boot, which to this day is documented using springfox-swagger2:2.7.0 (implementation first). The last operation I've added looks like this: @...
1
vote
0answers
38 views

Fetch error FABRIC_E_TIMEOUT for SwaggerUI/swagger.json

I am developing an Azure Service Fabric Service, in which I have used Swashbuckle.AspNetCore to build API List. I am using the following code in my Startup.cs file In ConfigureServices(...
0
votes
1answer
30 views

Swagger example attribute hiding all other attributes

I'm writing a Swagger definition on swaggerhub. There's an option to share models among multiple Swaggers. After swaggers are complete there's an option to download resolved Swagger with the linked ...
0
votes
0answers
25 views

Swagger reference to definitions in externalFile

I have many swagger files, using the same definitions. I want to move this definitions to a separate file and reference them. Main swagger file looks like: swagger: '2.0' info: version: 1.0.0 ...
0
votes
0answers
15 views

Swagger schema for aws lambda

I am using AWS version 4 signing process for creating signature for AWS lambda service with API ListFunctions.I am getting correct URL which on postman worked.But when running that python file I am ...
0
votes
0answers
28 views

404 not found on swagger api-docs using SpringMVC and JDK 1.6

I'm working on an application which use jdk 1.6, SpringMVC but not SpringBoot and i have trouble to make swagger works. Indeed, my console is saying to me that swagger seem ready to be requested as ...
0
votes
0answers
7 views

Springfox Swagger2: Special character support in ApiOperation notes

In my spring boot app, I am using springfox-swagger2 (2.9.2) to generate Rest API doc. My @ApiOperation.notes contains some special characters like 'ě' which are wrongly interpreted in the resulted ...
1
vote
0answers
29 views

How to validate all properties of an object in go-swagger?

I have a swagger.json which accepts a POST body as an object with some required properties with data types. I can see the ServeError() being invoked when either of the properties is missing or if ...
0
votes
0answers
15 views

Why does my Swagger UI try to access non http content when loaded on https?

I'm using AWS:ALB, so I have a rule which forwards all traffic to a specific target group. When working locally, I am able to access the swagger ui page with no issues since HTTP. When deployed to AWS ...
0
votes
0answers
39 views

Swagger body with multiple parameters

Lets say I have body parameters like this below: "parameters": [ { "in": "body", "name": "body", "description": "Pet object that needs to be added to the store", "required": ...
0
votes
0answers
27 views

How to describe specific Json example in swagger using json

Since it is vacation time, I have to complete a teammates task. He was using swagger to describe the API I program. We now have a much more complex method in our API and I am having trouble how to ...
0
votes
0answers
26 views

Spring Multipart File upload under Pojo

Hi All I need help for Multi-Part File Upload under the POJO class. I'm using Swagger Image for Uploading the List File's. When I run my code it show the request pattern as JSON instead of File ...
0
votes
0answers
31 views

swagger mark all methods deprecated

I have a swagger config that contains several versions of the API, I would like to show as deprecated all operations that match the following paths: @Bean public Docket v1(SwaggerProperties ...
0
votes
0answers
23 views

Swagger constructor based mandatory fields

When I use Swagger-codegen, The only constructor generated is the default constructor. I want a constructor with all my fields, for example: public Person(String name, int age) { }; Do you know ...
1
vote
1answer
28 views

Azure API Management - Import API using Swagger 2.0 spec - schema property on the responses is not considered

i would like to ask your help in relation with one issue i am facing. So basically i defined a swagger 2.0 spec for an API, and on the operation's responses i used the schema property in order to ...
2
votes
1answer
44 views

How to override get_swagger_view to enable django-rest-swagger to display all endpoints?

By default django-rest-swagger displays my views which do not require authentication(JWT Auth in this case). I tried to override the default get_swagger_view shortcut by adding IsAuthenticated in the ...
1
vote
0answers
16 views

How to provide authentication in Swagger API on Spring Boot application

I have integrated Swagger to generate API documentation for Spring REST application using Spring Boot. It works well, I could see the generated API documentation when I hit the URL : http://localhost:...
0
votes
0answers
22 views

Swagger does not validate enum query parameter

I'm using swagger 2.0 to define my API. I'm using enums as described in the docs here. I have the following endpoint in my swagger.yml file: /my-endpoint: x-swagger-router-controller: my-...
0
votes
0answers
17 views

how to parsing json file to swagger2markup and save to a swagger.json

try { URL remoteSwaggerFile = new URL("http://petstore.swagger.io/v2/swagger.json"); Path jsonFile = Paths.get("./build/asciidoc").resolve("swagger.json"); Path ...
0
votes
1answer
33 views

PHP REST API with Swagger - LiveHelperChat

I downloaded Live Helper Chat (an Open Source application built with PHP) from here: https://livehelperchat.com/, and I have been trying to add a custom endpoint to the REST API which is built on ...
0
votes
1answer
9 views

How to analyze requests (with queries) on swagger and send different response body?

Is that possible to analyze the request (based on queries) on swagger hub api 3.0? For example, I need to reproduce the next thing. For request getUser?id=1 swager swagger has to send response to ...
1
vote
1answer
34 views

How to reuse swagger 2.0 string pattern definition?

I'm defining the following in swagger 2.0 "definition" section. I first defined the format of timestamp that I would use in many object's properties for different purposes, such as created timestamp ...
0
votes
0answers
19 views

AWS API Gateway & Lambda Python 3 integration incorrect status code

I've created an API Gateway using a Swagger 2.0 definition: swagger: "2.0" info: description: "Everything to do with Client Management" version: "1.0.0" title: "Client Management API" basePath: ...
0
votes
0answers
11 views

Allow duplicate mapping key in Swagger 2.0 [duplicate]

I'm currently creating a Swagger documentation for an existing API. This API has a POST interface which requires an XML document in it's body which can look like this: <?xml version="1.0" encoding=...
0
votes
0answers
23 views

“Export as Swagger” and “Export as Swagger + Postman” from API gateway is missing 'parameters' object

I have an API gateway endpoint (/item/{itemId}) with a path parameter 'itemId' in it. Here's the swagger definition I used to create the endpoint in API gateway. { "swagger": "2.0", "info": { ...
0
votes
0answers
13 views

Does swagger codegen add @PermitAll annotation for no secuirty

In my path object i have overridden the security to [] but in generated code it does not add @PermitAll annotation in the resource file. /foo: security: [] Is it supported ? Does swagger codegen ...