Questions tagged [springdoc-openapi-ui]

365 questions
0
votes
1 answer

springdoc-openapi how to display an list of object class as a response?

using the springdocs-openapi library (1.6.8).I'm looking to get the following output: { "result":200, "data":{ "raoGroup":[ { "name":"S/MIME RA Operator" } ] }, "resultMessage":"操作成功" } It's…
Mr.Kao
  • 111
  • 2
  • 9
0
votes
1 answer

Swagger UI not redirecting to /swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config

I'm using springdoc-openapi-ui 1.6.4 and springboot 2.7.5. I try to access http://localhost:8080/swagger-ui.html, I expect the URL will redirecting to http://localhost:8080/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config but it always…
AlexYu
  • 87
  • 1
  • 11
0
votes
1 answer

How to disable default response for springdoc openapi and swagger

I have a problem with a springdoc-openapi and swagger. In api.yml file I defined some responses for endpoint, for example: responses: 200: desription: example response content: ...... 404: description: example response And…
0
votes
1 answer

localhost:8080/abc/swagger-ui/index.html showing 404 not found after migrating from swagger2 to openApi3

Migrated to openApi3 SpringBoot project. But I'm not able to get swagger ui page while /v3/api-docs/ url working. But swagger url showing 404 not found. I'm also able to access /v3/api-docs/swagger-config/. I'm using springdoc-openapi-ui dependency…
0
votes
0 answers

How to disable swagger-ui in custom environments at runtime

I have a custom annotation defined below which exists in a shared common library that all microservices in the project will use. On declaring this annotation OpenApiConfiguration.class is imported which fetches various information from the…
0
votes
0 answers

path based routing with springdoc openapi 3

We have path based routing set up for one of our applications as follows https://api.example.com/mailservice It is at this endpoint that api's are able to call the MailService application. However, i am unable to see the swagger-ui page load when i…
0
votes
0 answers

How to configure OAuth2.0 for OpenAPI in SprintBootApplication as the configuration we are using in Postman is working but not in Spring Microservice

How to configure OAuth2.0 for OpenAPI in SprintBootApplication as the configuration we are using in Postman is working but not in Spring Microservice Using Postman the settings for OAuth2.0 are GrantType: Client Credentials Access Token Url:…
0
votes
0 answers

Default value with @ParameterObject with Spring

We have an endpoint with a lot of boolean on it, with default values. I wanted to encapsulate those into an object thanks to the @ParameterObject annotation. However, I haven't found a way to set default values for it. My idea was to have something…
Ludovic Mouline
  • 163
  • 1
  • 6
0
votes
0 answers

springdoc-openapi-ui set servers using environment variables

I have a static openapi.yaml file which looks something like this: Existing Yaml: openapi: 3.0.0 info: title: API description: >- Awesome API contact: name: bh4r4th email: nenethopu@gmail.com license: name: Apache 2.0 …
bh4r4th
  • 3,760
  • 1
  • 21
  • 25
0
votes
0 answers

Springdoc-openapi generation ignoring @Schema for @ManyToOne relationships

We have a Spring Boot service with a class that has ManyToOne relationships to other models. These show as links in responses, but to set them in a POST, PUT, or PATCH you send in a URI for that field. @ManyToOne(fetch =…
0
votes
0 answers

springfox to springdoc-openapi migration - swagger url not working

I have spring (not spring boot) application with springfox3. Application swagger url is working fine. I have to migrate from springfox to springdoc-openapi. I have implemented all migration steps mentioned in below…
Sachin
  • 29
  • 2
0
votes
0 answers

Restricting Values Assignable to Discriminating Property

Swagger/OpenAPI definition: { "openapi" : "3.0.1", "info" : { "title" : "OpenAPI definition", "version" : "v0" }, "servers" : [ { "url" : "http://sandbox.test.com:8063/api/recs", "description" : "Generated server url" } ], …
0
votes
2 answers

Error while generating swagger json from Spring boot

I have been trying to generate the swagger json from spring boot. But while trying with below code I am getting I/O error. Here is my code. package com.tf.redis; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import…
0
votes
0 answers

Whitelabel Error Page when accessing the Swagger openapi docs on a Spring Boot application

I have followed the first two steps of this Baeldung guide But when i want to acces the docs on: http://localhost:8080/v3/api-docs/ I get a "Whitelabel Error Page" I have added the following in my pom.xml:
0
votes
0 answers

springdoc-openapi-ui '1.6.11' dependency conflict

I have the conflict and it looks like internal conflict for the springdoc dependencies, how can I solve it: org.slf4j:slf4j-api:1.7.36 \--- org.webjars:webjars-locator-core:0.50 \--- org.springdoc:springdoc-openapi-ui:1.6.11 \---…