Questions tagged [springdoc-openui]

43 questions
15
votes
5 answers

springdoc-openapi-ui How do I set the request to HTTPS

When I publish, I will use HTTPS requests instead of HTTP, but swagger original URL is still HTTP, I have no idea how to set it up, and there is no documentation for servers in the original springdoc-openapi-ui…
Tablo_Jhin
  • 301
  • 1
  • 3
  • 10
8
votes
1 answer

springdoc-openapi-ui + swagger don't understand @PathVariable required = false flag

I use this library for generation documentation: org.springdoc springdoc-openapi-ui 1.5.0 I have this controller: @RestController public class…
5
votes
1 answer

The provided definition does not specify a valid version field when render openapi

I am integrate the OpenAPI with my project, when I access the url: http://127.0.0.1:11014/swagger-ui/index.html, shows error like this: Unable to render this definition The provided definition does not specify a valid version field. Please indicate…
Dolphin
  • 29,069
  • 61
  • 260
  • 539
5
votes
1 answer

How to mark APIs as unused in OpenAPI 3.x

How to mark APIs as unused in OpenAPI 3.x, when the library is not ready for consumption by other microservices which intend to use the API Note: Right now, we build a lot of API(s) and they are in various stages of development. Is there a way to…
Rpj
  • 5,348
  • 16
  • 62
  • 122
5
votes
3 answers

SpringDoc - How to Add schemas programmatically

I'm using SpringDoc and trying to add a schema to OpenApi programmatically, but no success. @Bean public OpenAPI customOpenAPI() { Schema mySchema = new Schema(); mySchema .type("object") …
RoNoWhe
  • 81
  • 1
  • 6
4
votes
1 answer

How do I control tag order in Springdoc OpenAPI 3.0?

I'm switching from Springfox 3.0 to OpenAPI 3.0 + Springdoc-openapi. In Springfox the tag order is alphabetical, but in Springdoc's Swagger UI, the order appears to be random. How do I control the Tag order on the UI? I'd prefer an ordering of my…
ScrappyDev
  • 2,307
  • 8
  • 40
  • 60
4
votes
1 answer

springdoc-openapi how to display an array of strings as a response

There are no good examples out on the web of how to get the following output using the springdocs-openapi library (1.5.7). I'm looking to get the following output: [ "A", "B", "C" ] This is the code based on what examples are…
3
votes
1 answer

How to append throws exception to a rest endpoint generated by openapi-generator-maven-plugin

I'm using openapi-generator-maven-plugin to generate java class from yaml file in springboot application. I want to make all the endpoint throwing CustomException. How to configure the plugin to do this ? Here's the open-ui.yaml. I defined the…
GHASSEN
  • 51
  • 2
3
votes
1 answer

No API definition provided. - openApi - springdoc

I have a simple boot application where I have added open api swagger dependency springdoc-openapi-ui along with these…
akaliza
  • 3,641
  • 6
  • 24
  • 31
3
votes
1 answer

How can I document objects that I don't have ownership over?

I'm returning a Page In my method endpoints. In my OpenAPI UI, how can I generate a description of the fields that come from org.springframework.data.domain.Page type. Normally what I do is go to the Object that I want to document and…
Hamza Belmellouki
  • 2,516
  • 1
  • 18
  • 39
3
votes
1 answer

Getting Invalid attempt to iterate non-iterable instance for SpringDoc Open API Swagger on IE

I have recently changed swagger UI from Springfox to SpringDoc OpenApi. Swagger is working perfectly fine on Chrome. but on Internet Explore I am getting below errors. My IE version is 11
SSK
  • 3,444
  • 6
  • 32
  • 59
3
votes
1 answer

Spring docs - Open API 3 - How to set default values to body?

I am using Spring Boot + Spring Data Mongo + Spring REST + Spring HATEOAS to implement REST endpoints. Since we're passing more than 5 Query Parameters (proprietary setting of an Org, supposed to be not passed), so I though to create a EmployeeDto…
PAA
  • 1
  • 46
  • 174
  • 282
3
votes
1 answer

How to create multiple schema in @RequestBody of swagger openapi specification 3.0 using springdoc?

I have the below api for which I need to have two parameters of content type application/x-www-form-urlencoded and therefore am using @RequestBody instead of @Parameter @Operation(summary = "Revoke given permissions", description = "Allows…
2
votes
0 answers

springdoc-openapi-ui throws java.lang.ClassNotFoundException when swagger-parser is on the classpath

In a project which I currently try to upgrade to Spring Boot 3.x I'm using "springdoc-openapi-starter-webmvc-ui" and I also need "swagger-parser" for my business logic (I thought those two have no dependency on each other, they are used for two…
2
votes
2 answers

Issue in rendering Swagger OpenAPI v3 UI + Springboot project

I am getting the error - "Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0)." when I paste the generated json from /api-docs to…
1
2 3