Questions tagged [swagger-3.0]
121 questions
1
vote
0 answers
How to write the extensions values as unnamed property within the Swagger generated by SpringFox?
I added in my code a vendor extension named x-my-test using the extensions method from the ApiInfo class:
new ApiInfoBuilder()
...
.extensions(List.of(
new ListVendorExtension<>("x-my-test", List.of("myvalue"))
…

Edu Costa
- 1,414
- 13
- 13
1
vote
0 answers
OAuth2 SecurityReference AuhtorizationScope ignored in Swagger Docket configuration using SpringFox
I'm facing problem or misunderstanding of using AuthorizationScope in Security Reference while setting up docket for Swagger.
I expect AuthorizationScope from SecurityScheme would be enforced by SecurityReference, but it is actually ignored -…

hastings
- 11
- 2
1
vote
0 answers
How to add style to Example Values in Swagger 3.0 with Spring Boot
I want to add styles and colors to the example values, just like the one Swagger has as example here:

Hugo Lezama
- 198
- 2
- 7
1
vote
1 answer
What is the Springdoc equivalent of the Swagger 2 Springfox useDefaultResponseMessages() method?
We are moving away from Springfox to Springdoc and would like to know if Springdoc has a useDefaultResponseMessages() equivalent?
Have seen some solutions that require some coding but what I would like to know if there is something that can be…

VianneN
- 143
- 3
- 12
1
vote
1 answer
Adding bearer token to swagger requests using swagger-client
I'm trying to add a bearer JWT token to a swagger request upon login of an account but I can't seem to get it working. The documentation leaves a lot to be desired.
const SWAGGER_CLIENT = SwaggerClient(".../api.yml");
const carsResponse = await…

user.io
- 396
- 1
- 6
- 17
1
vote
1 answer
Spring Boot 2.2.4 springdoc OpenApi Swagger V3 hateoas issue
After integrating the springdoc-openapi-data-rest library to map Pageable(spring-date-commons) object to correct URL-Parameter in Swagger UI I encountered this problem:
***************************
APPLICATION FAILED TO…

Oscar
- 157
- 1
- 9
1
vote
1 answer
Swagger: How to get formatted json string
Below is the format of a sample JSON string currently returning and showing in Swagger UI . Is there a better way to get formatted JSON string returned and get displayed on UI without explicit String Replace function.
"IdentifierDetails":…

venkat
- 5,648
- 16
- 58
- 83
1
vote
0 answers
Problem Configuring Swagger openAPI 3.0 Authentication with firestore
I am using the swagger openAPI for retrieving data of firestore. I wanted to apply security from swagger not from firestore and when i do this and perform GET request UI displays the data stored on firestore and not display the unauthenticated…

Syed Talha
- 11
- 1
1
vote
1 answer
Swashbuckle SwaggerResponseRemoveDefaults attribute still adding 200 Success response to Swagger
I'm using Swashbuckle and Swagger UI in a .NET Core 3.1 project, with my XML comments imported into Swagger. I have a POST request on a controller that I want to register a number of response statuses (201, 401, 403, 404) for in Swagger. The problem…

Sam W
- 13
- 1
- 6
1
vote
0 answers
Server stub in spring from swagger yaml
I am using spring server stub from swagger yaml to generate POJO classes. In my definition, I am having allOf keyword for image property of the Images model. But, the stub generated does not have the correct class reference. It is generating with…

Codez
- 35
- 7
1
vote
2 answers
Swagger 3.0.1 server generator
When I generate a nodejs-server with swagger 3.0.1 in the online tool https://editor.swagger.io/ and try to npm start the project I always get the following error:
Error: Cannot find module './middleware/swagger.router'

Alex
- 119
- 1
- 10
1
vote
1 answer
Swagger UI: explode=true ignored for object array in post request body
I am trying to use Swagger to document an API POST call which has an object array parameter. But when I try to test it in Swagger UI, it seems the explode: true is ignored in encoding:filters.
This is my code:
openapi: 3.0.2
info:
description: >-
…

FrankPl
- 573
- 4
- 19
1
vote
0 answers
spring boot 2.2 cannot serve swagger-resources when used with springdoc-openapi
https://www.dariawan.com/tutorials/spring/documenting-spring-boot-rest-api-springdoc-openapi-3/
According to this, using springdoc openapi dependencies should pull in swagger3
I am using
org.springdoc
…

Kalpesh Soni
- 6,879
- 2
- 56
- 59
1
vote
1 answer
How can I set the Bearer token after authentication in Swagger UI
I have a REST API service provider, written in PHP. I tested it successfully in Postman, and it works properly there.
Now I am going to prepare API documentation for it, and I am using Swagger UI 3. I set it up properly and I can process…

Belkin
- 199
- 15
1
vote
0 answers
Swagger 3.0 array's null values
Is it possible to define an array that can not contain null?
I'm compiling it to Java with Open API 3.0
For example for this
A:
type: array
minItems: 1
items:
$ref: "#/components/schemas/B"
B:
type: string
pattern: ^[a-z]+$
I consider…

radekkl
- 21
- 4