Questions tagged [springdoc-openapi-ui]

365 questions
1
vote
0 answers

spring-doc OpenAPI 3 modify authorization header

curl -X 'GET' \ 'http://localhost:8080/url/of/my/endpoint' \ -H 'accept: application/json' \ -H 'Authorization: Bearer "token" I want to get rid of 'Bearer' keyword in the Authorization header. how should I do that? my swaggerconfig …
1
vote
1 answer

OpenApi add example for request body

Am working with Spring boot and I am using springdoc-openapi-ui to generate spec files using swagger editor The issue Is, Am trying to avoid creating model classes just to use them in the request body to show them with swagger UI. For example : …
George
  • 2,292
  • 2
  • 10
  • 21
1
vote
0 answers

Equivalent paths are not allowed. Swagger 2.0

I have two services sharing the same path but with differnt HTTP method And here is the diffination swagger: '2.0' paths: /path/{Id}: get: summary: Get paramName parameters: - name: Id in: path …
Melad Basilius
  • 3,847
  • 10
  • 44
  • 81
1
vote
1 answer

swagger url problem with springdoc-openapi

This is not the story of springfox This is the story of springdoc -openapi. my current dependency org.springdoc springdoc-openapi-ui
powpow
  • 35
  • 1
  • 5
1
vote
2 answers

Spring boot - open api - how to read external swagger api documents using java config

I am generating multiple swagger api doc files in json format on application startup in my spring boot app and storing at location - static/swaggerdoc. I am able to read the file by mentioning the path in application.properties like…
Amit Jadhav
  • 83
  • 1
  • 10
1
vote
0 answers

The API handles a faulty request without raising an error eventhough annotated with ApiModelProperty with dataType

I am getting the following error - "The generated value is of the type integer instead of the type ‘string’" with 42crunch conformance scan with the following problem reported - "The API handles a faulty request without raising an error" In the test…
1
vote
1 answer

Automate generation of API documentation in Spring Boot

I want to automate the generation of the API documentation in a spring-boot project, for which I see two options: springdoc-openapi: works by examining an application at runtime to infer API semantics based on spring configurations, class structure…
1
vote
1 answer

Hide a method in springdoc-openapi based on a condition

We are working on a spring boot project which uses the springdoc-openapi library to generate the swagger document. We have a requirement where we need to hide a few of the APIs in a controller. Spring boot does provide a way to hide/show a…
1
vote
0 answers

Swagger + Springdoc OpenAPI + Spring Boot, how to secure the API definition endpoint

Using Swagger UI from Springdoc OpenAPI 1.5.11 in a Spring Boot 2.5.3 web application that exposes a REST API. The REST API is secured using a bearer provided JWT token. I successfully configured Springdoc to display the "Authorize" button with…
Florian Beaufumé
  • 1,751
  • 2
  • 22
  • 34
1
vote
1 answer

How to exclude the "servers" section from the generated OpenAPI doc in Spring?

OpenAPI 3.0 Spec has a set of Fixed fields mentioned as OpenAPI Object https://swagger.io/specification/ If I enable OpenAPI spec by default it will have a servers section (https://swagger.io/specification/#server-object) with details like url and…
vinit saha
  • 47
  • 3
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

how upgrade swagger2 to swagger3 in plain spring project

In our spring-webmvc project we are using the following code to configure swagger2, now we want to upgrade to swagger3, so we added springdoc-openapi-ui in pom file, what changes we need to make in our swagger-configuration…
Jijo AC
  • 23
  • 6
1
vote
2 answers

Spring boot Swagger 3 - Controller summary is not getting displayed by default in OpenApi documentation

By default, the API method name is displayed as a summary in Swagger2 But, is not displayed in OpenApi3 by default. How can I configure this property? Without using @Operation(summary = "Summary") in each controller endpoint. Dependency:…
1
vote
1 answer

Spring WebFlux functional router + OpenAPI UI

I would like to create OpenAPI UI spec, using Spring WebFlux functional router on Kotlin. Spring Boot v.2.5.2, springdoc-openapi v.1.5.9. Here is my router class: @Configuration class UserServiceRouter { @Bean @RouterOperations( …
1
vote
1 answer

Custom openapi documentation can't be applied for springdoc-openapi-ui web view

I'm trying to set up swagger-ui based on on existing json config, using 'org.springdoc:springdoc-openapi-ui:1.5.9' dependency (spring boot + gradle) what I have is: custom openapi.json file in my 'resources/static'…