Questions tagged [springdoc]

The springdoc-openapi Java library helps automating the generation of API documentation using Spring Boot projects. springdoc-openapi works by examining an application at runtime to infer API semantics based on Spring configurations, class structure and various annotations.

The springdoc library automatically generates documentation in JSON/YAML and HTML formatted pages. The generated documentation can be complemented using swagger-annotations.

Useful links:

471 questions
0
votes
2 answers

@Value not providing values from application properties Spring Boot

I'm using Springdoc 1.4 with Spring-Boot 2.3 and in the OperationCustomizer class, I need to read value from the application properties file. But everytime the field is always initialized to null. The specifications are as…
Debargha Roy
  • 2,320
  • 1
  • 15
  • 34
0
votes
1 answer

How do I document a Rest parameter providing another type (MyClass vs. String)?

In Springfox I once used the following syntax to render a String parameter with a full model (original Github issue): @PatchMapping(path="/{objId}") @ApiImplicitParams(@ApiImplicitParam(name="update", dataType="MyClass")) public…
watery
  • 5,026
  • 9
  • 52
  • 92
0
votes
1 answer

Springdoc Swagger 3 - Failed to load API definition after adding API Group

I have a Spring boot application that works perfectly fine with Springdoc until I add the following code to group the endpoints into a default group. @Bean public GroupedOpenApi hideApis() { return…
Debargha Roy
  • 2,320
  • 1
  • 15
  • 34
0
votes
1 answer

SpringDoc WebMvc vs. WebFlux

I am using SpringDoc Open Api 3 for my rest API. Right now I'm using the WebMvc version. Is there any advantage to switching to the WebFlux version? Wouldn't using WebClient (or some other async client) on the client side be the same thing except…
SledgeHammer
  • 7,338
  • 6
  • 41
  • 86
0
votes
1 answer

SpringDoc (spring boot) utf-8 json header response for documentation

I'm using springdoc (springdoc-openapi-ui) for rest documentation for a kotlin spring boot application (Gradle build) and I want to know if there's a way to setup the response header content type encoding to utf-8. The defautlt returned content type…
0
votes
1 answer

Springdoc with multi-module gradle

I'm trying to use Springdoc on a multi-module gradle project, and I'm not able to make it work. Has someone already done something similar ? My Gradle project structure looks like this: My…
0
votes
1 answer

How do I set up OAuth2.0 Request Headers

I wanted to put a value, like postman, on the SpringDoc Swagger page, and apply it to all requests postman swagger-ui And swagger is not expected to pop up an input popup for user names and passwords. Thanks for all the answers.
hero-zh
  • 45
  • 7
0
votes
1 answer

Where can I find API reference documentation for springdoc?

The springdoc-openapi java library is a decent library for integrating Open API 3 with Spring project (alternative for springfox). I was searching for a reference documentation (like this for springfox); I found nothing but the official…
Tharindu Sathischandra
  • 1,654
  • 1
  • 15
  • 37
0
votes
1 answer

Springdoc-openapi. ClassNotFoundException: org.springframework.data.rest.webmvc.support.DefaultedPageable

After migration of Spring Boot to version 3.1 and springdoc-openapi libraries to 1.4.1: springdoc-openapi-ui springdoc-openapi-security springdoc-openapi-data-rest I faced issue ClassNotFoundException:…
0
votes
1 answer

How to model a common response class in individual service projects in Springdoc Open API

I'm trying to use Spring doc api, to generate the open api document for my service project. I have a common class Response class defined in another library and we don't have access to add/modify this class. for e.g. public class RestResponse…
mattkv
  • 1
0
votes
1 answer

OpenAPI. Invalid request example with Generic

I get invalide request example and schema if user Generic, but i get valid response type. How can I get a correct view? @RestController public abstract class BaseController { @PostMapping @Operation(summary =…
Mike
  • 115
  • 3
0
votes
2 answers

How to build and return an OpenApi 3.0 Document programmatically in a Spring GET endpoint?

i have a requirement where i need to have a GET endpoint in my microservice that returns an io.swagger.v3.oas.models.OpenAPI document, and i am wondering how to compose that object. The object in raw form looks like this: { "openapi":…
heug
  • 982
  • 2
  • 11
  • 23
0
votes
1 answer

Unable to access spring-docs-open-ui swagger documentation

I am a spring newbie trying to configure swagger documentation for my spring boot application. I configured my application based on the documentation provided here I am able to access the documentation page locally from this…
codejunkie
  • 908
  • 2
  • 21
  • 34
0
votes
2 answers

Open API 3 - How to read Spring Boot Pagination Properties?

I am using Spring Boot + Spring Rest Pagination + Open API 3. @Operation(summary = "Find Contacts by name", description = "Name search by %name% format", tags = { "contact" }) @ApiResponses(value = { @ApiResponse(responseCode = "200",…
PAA
  • 1
  • 46
  • 174
  • 282
0
votes
1 answer

Keep same URL but contract changes in Spring Boot REST Open API 3?

I am using Spring Boot and REST and Open API 3 implementation. In this example, v1 Group has List implementation - all data will get in List, in v2 Group has pagination implementation - all data will come in the form of pages. For the consumer, we…
PAA
  • 1
  • 46
  • 174
  • 282
1 2 3
31
32