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
1 answer

Springdoc OpenAPI displays class relationships under schemas and examples

I am using springdoc-openapi for REST API documentation. I have two classes which has One to One relationship between them. After I create the API, When I use the API. It returns exactly the way it stored in the database, but the example values or…
0
votes
2 answers

How to generate OpenAPI specification in WebFlux project as part of maven build without starting service

We are using SpringDoc in our WebFlux project to annotate our APIs and serve OpenAPI documentation from a UI. However, now we need the OpenAPI file generated as part of the maven build. SpringDoc has a plugin to fetch the file from a running…
0
votes
1 answer

SpringDoc OpenAPI swagger MergeAnnotations error

I am trying to configure OpenAPI with swagger to my existing non-spring boot application. Spring v.5.1.8.RELEASE SpringDoc v.1.4.6 Spring-boot v.2.3.2.RELEASE Open doc and swagger with spring mv My application is not spring boot enable that’s why I…
d-man
  • 57,473
  • 85
  • 212
  • 296
0
votes
1 answer

How to integrate Swagger with SpringDoc YAML?

I'm using Swagger to document my project.And I want generate the YAML doc from springdoc. But when I generate this YAML documentation the YAML dont have my Swagger doc coments. For example. I have one endpoint in my project: @ApiOperation(value =…
lucas.iter
  • 47
  • 3
0
votes
1 answer

SpringDoc app-doc.yaml don't show the swagger doc

I have a API with swagger. Endpoint example: @ApiOperation(value = "Returns a list of Pix transactions.",httpMethod = "POST",response = DResponse.class) @PostMapping("/transactions") public ResponseEntity getTransactions(@RequestBody…
0
votes
1 answer

how to expose an openapi.yaml specification into rest spring boot

i have already swagger-ui installed externally, i just wanted to connect that swagger-ui (open source) instance to localhost:8000/doc/api (.yaml) from openapi.yaml . any thoughts? PS : i tried to use @Bean public OpenAPI customOpenAPI() { …
0
votes
2 answers

Disable setting up Audit fields in create/update requests in Spring Data REST

I'm using combination of various Spring components - Boot (2.3), Data, Data REST, Springdoc. In my model objects I use auditing - I annotate some fields with @CreatedBy, @CreatedDate etc. I would like to disable possibility to set value of those…
kkonrad
  • 1,262
  • 13
  • 32
0
votes
1 answer

Swagger (OpenAPI) : how to specify example String dynamically generated from a custom Object?

Context Say you have: public class Dto { private String name; private String List customs; // getters and setters... } and public class Custom { private String something; private String else; // getters and…
payne
  • 4,691
  • 8
  • 37
  • 85
0
votes
1 answer

OpenAPI 3.0 Java Annotations of Nested Class

I am trying to get the components to appear nested together when using OpenAPI 3.0 Java annotations. However, every object that is referenced inside another object are being created as $ref instead of being built out as that field node. How can I…
DashingSuprHero
  • 177
  • 1
  • 2
  • 11
0
votes
1 answer

How can I display error code description in sample code section?

I have an error code description displayed in the main section: But I'd like also to display those code description in the example section here: I saw some API docs that can generate those descriptions in the example section: How can I do such a…
Hamza Belmellouki
  • 2,516
  • 1
  • 18
  • 39
0
votes
1 answer

spring microservices swagger-ui no select a definition drop down

Last time I upgraded to org.springdoc:springdoc-openapi-webflux-ui:1.4.3 and now I don't see Select a definition. Before I was using 1.2.31 version and then it looks like on the screen above. Is there option to bring back that dropdown?
Arek Szast
  • 163
  • 4
  • 16
0
votes
1 answer

Different examples based on inheritance with Open API 3

I want to make different examples in Swagger for parent attributes. Is there any simple way to achieve this one? class Link { @Schema(description = "Next link", example = "http://") private String next; @Schema(description = "Previous…
Thánh Ma
  • 133
  • 1
  • 8
0
votes
1 answer

Springdoc allow authenticated access to rest controllers with Spring Security

I have Spring Security in my Project and it requires documentation through springdoc version 1.4.3. My requirement is to be able to get response from swagger-ui.html after authentication. Currently I can see the swagger-ui.html page but upon…
l3r4nd
  • 1
  • 1
0
votes
2 answers

Swagger 2 or 3 for Spring Data Rest

I have a spring boot application using spring data rest. I have a problem in providing a well read API documentation using swagger. I tried spring fox and springdoc, but each has its problems Spring fox: I can not change the tag name of a…
Rasha Elsayed
  • 660
  • 1
  • 7
  • 22
0
votes
1 answer

Unable to hit controller even after authentication in springdoc

I am using springdoc version 1.4.3 and springdoc-security version 1.4.3 on my project with spring boot and spring security with the below configuration for my springdoc I am able to access swagger-ui.html but when I authorize(enter the token through…
Pseudo
  • 56
  • 1
  • 2
  • 12