Questions tagged [swagger-3.0]
121 questions
1
vote
1 answer
OpenAPI add server at Server Start
I try to modify server list (or default server) on Swagger UI.
1/ On Spring (Not Spring Boot) configuration class I add this :
@Bean
public OpenAPI customOpenAPI() {
log.info("<<>>");
Server server = new Server();
…

Rick
- 92
- 6
1
vote
2 answers
Swagger 3 and SpringMVC how to describe POJO RequestParams
I have a simple SpringMVC controller
@RestController
@Validated
@RequestMapping("/users")
public class UsersController {
@GetMapping
public String getAllUsers(@Valid Filter filter) throws MyCustomServiceException {
[...]
}
}
Since this…

Alexis
- 1,825
- 4
- 23
- 28
1
vote
0 answers
Java annotation based validation io.swagger.v3.oas.annotations.media.Schema
Now swagger3(openApi) now is current used. And based on the annotations defined in the library swagger-annoations:2.1.10 and package "io.swagger.v3.oas.annotations", api doc is easily to generator.
But now the springboot validation of…

lileliao
- 11
- 2
1
vote
1 answer
(Swagger 3) @Parameter to add an Authorization header
I'm not sure if this is a bug or I'm missing something but Swagger is not adding the "Authorization: .." header when executing a request
I have this un-authenticated endpoint
public String getUserFromAuth(
@Parameter(description =…

Alexis
- 1,825
- 4
- 23
- 28
1
vote
1 answer
How can i configure swagger3 to support https requests with @SecurityScheme
I have updated my project to Springboot version 2.6.3 and swagger 3. I need to support authorize HTTPS requests but @SecurityScheme supports only https requests. Is there a way to configure @SecurityScheme annotation to support https requests or any…

prathyaksh
- 21
- 5
1
vote
0 answers
File upload param not showing in Swagger UI 3.0
I am creating swagger document using annotations in springboot application, all the APIs params are working instead of file param, file param is not being shown in the swagger UI. It is also not giving any errors in the logs related to the file…

iUbaid
- 313
- 2
- 16
1
vote
0 answers
swagger3 cannot input multiple values for list parameter
spring boot 2.x, i added springfox-boot-starter 3.0.0 and @EnableOpenApi to use swagger3.
i have following controller
@DeleteMapping("/rate")
public void deleteRate(@ApiParam(value = "dc id") @RequestParam(required = false) Integer dcId,
…

frank
- 1,169
- 18
- 43
1
vote
2 answers
Java Spring Boot openApi How does Swagger populate the top page entry field
Swagger UI has an entry field on top of it's page. I guess that this page is a link to the documentation. Is this correct ? And how can I change this value ?
I could already figure out that /V1 is retrieved from application.yaml.
spring:
…

user2023141
- 895
- 5
- 17
- 36
1
vote
1 answer
Swagger How to encode JSON?
I get the response in the form of an associative array encoded in json, which contains 3 elements of the boolean, integer and string types.
responses:
200:
description: Success
content:
application/json:
…

Verdant
- 11
- 3
1
vote
1 answer
Swagger 3 documenting Map using annotations
I have a model for response in Scala:
case class ModelDto(
...
map: Map[UUID, AnotherDto]
...
)
How can I document this using annotations @Schema or @ArraySchema or smth like that?
Have no yml file and all fields describing using only…

mononax
- 11
- 1
1
vote
1 answer
Trying to generate stub(java file) with json(application/json) data with file(multipart) using swagger
trying to submit form with multiple attachments(file)
whether it is correct approach or i don't know if i am using multipart/form-data not able to submit json data.
paths:
/request/create:
post:
tags:
- Request Service API
summary: request for media…

Abhinandan Badanikai
- 11
- 2
1
vote
1 answer
How to document Spring Data rest endpoints using swagger 3 spring boot
I have a spring boot application with spring data rest included.i want to document spring data rest endpoint with swagger 3.I have done the following implementation.
@RepositoryRestResource
@SecurityRequirement(name = "bearer")
public interface…

Niranga Sandaruwan
- 691
- 2
- 19
- 39
1
vote
0 answers
Springfox Boot Starter 3.0.0 JsonSerializer Error
I am using io.springfox 3.0.0 version in my project. I added the dependency to my build.gradle file as following:
implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'
The external libraries were created as…

can emre ayar
- 11
- 3
1
vote
1 answer
Swagger Open API security Schema giving Object error
I am having trouble in setting security schema in open api swagger spec in yaml.
I get below error while setting security schemas:
in paths I did use Bearerauth but still same issue:
paths:
/v1/items:
get:
tags:
- Item Resources
…

VR1256
- 1,266
- 4
- 28
- 56
1
vote
0 answers
Override Swagger generated schema definition
How can I override Swagger generated schema definition with a config file?
To have a similar to adding @Schema to class.
I am documenting a Java Spring project.
Version {
String Name;
Int version;
//Getters and setters
}
Example…

Anand Wesley
- 11
- 1