File tree 5 files changed +67
-1
lines changed
springdoc-openapi-starter-common/src/main/java/org/springdoc/core
springdoc-openapi-starter-webmvc-api/src/test/resources
5 files changed +67
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## [ 2.5.0] - 2024-04-01
9
+
10
+ ### Added
11
+
12
+ - #2318 - Add Info to GroupedOpenAPI properties
13
+ - #2554 - Remove duplicate words from comments
14
+ - #2418 - Improve support for externalizing strings in generated openapi
15
+ - #2535 - Add 'springdoc.trim-kotlin-indent' property to handle Kotlin multiline string indentation
16
+ ### Changed
17
+
18
+ - Upgrade spring-boot to 3.2.4
19
+ - Upgrade swagger-core to 2.2.21
20
+ - Upgrade swagger-ui to 5.13.0
21
+
22
+ ### Fixed
23
+ - #2525 - Inherited Methods Not Included in Swagger Documentation with @RouterOperation in Spring Boot WebFlux Application
24
+ - #2526 - SpringDoc bean naming conflict error with GraphQL Spring boot starter
25
+ - #2540 - Fix typo in SpringRepositoryRestResourceProvider.java
26
+ - #2549 - Fix README.md
27
+
8
28
## [ 2.4.0] - 2024-03-12
9
29
10
30
### Added
Original file line number Diff line number Diff line change
1
+ package org .springdoc .core .conditions ;
2
+
3
+ /**
4
+ * @author bnasslahsen
5
+ */
6
+
7
+ import java .util .Set ;
8
+
9
+ import org .springdoc .core .properties .SpringDocConfigProperties ;
10
+ import org .springdoc .core .properties .SpringDocConfigProperties .GroupConfig ;
11
+
12
+ import org .springframework .boot .context .properties .bind .BindResult ;
13
+ import org .springframework .boot .context .properties .bind .Binder ;
14
+ import org .springframework .context .annotation .Condition ;
15
+ import org .springframework .context .annotation .ConditionContext ;
16
+ import org .springframework .core .type .AnnotatedTypeMetadata ;
17
+
18
+ import static org .springdoc .core .utils .Constants .SPRINGDOC_PREFIX ;
19
+
20
+ /**
21
+ * The type Spec properties condition.
22
+ *
23
+ * @author bnasslahsen
24
+ */
25
+ public class SpecPropertiesCondition implements Condition {
26
+
27
+ @ Override
28
+ public boolean matches (ConditionContext context , AnnotatedTypeMetadata metadata ) {
29
+ final BindResult <SpringDocConfigProperties > result = Binder .get (context .getEnvironment ())
30
+ .bind (SPRINGDOC_PREFIX , SpringDocConfigProperties .class );
31
+ if (result .isBound ()) {
32
+ SpringDocConfigProperties springDocConfigProperties = result .get ();
33
+ if (springDocConfigProperties .getOpenApi () != null )
34
+ return true ;
35
+ Set <GroupConfig > groupConfigs = springDocConfigProperties .getGroupConfigs ();
36
+ return groupConfigs .stream ().anyMatch (config -> config .getOpenApi () != null );
37
+ }
38
+ return false ;
39
+ }
40
+
41
+ }
Original file line number Diff line number Diff line change 27
27
import java .util .List ;
28
28
import java .util .Set ;
29
29
30
+ import org .springdoc .core .conditions .SpecPropertiesCondition ;
30
31
import org .springdoc .core .customizers .SpecPropertiesCustomizer ;
31
32
import org .springdoc .core .models .GroupedOpenApi ;
32
33
import org .springdoc .core .properties .SpringDocConfigProperties ;
36
37
import org .springframework .boot .autoconfigure .condition .ConditionalOnBean ;
37
38
import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
38
39
import org .springframework .context .annotation .Bean ;
40
+ import org .springframework .context .annotation .Conditional ;
39
41
import org .springframework .context .annotation .Configuration ;
40
42
import org .springframework .context .annotation .Lazy ;
41
43
48
50
@ Lazy (false )
49
51
@ Configuration (proxyBeanMethods = false )
50
52
@ ConditionalOnBean (SpringDocConfiguration .class )
53
+ @ Conditional (SpecPropertiesCondition .class )
51
54
public class SpringDocSpecPropertiesConfiguration {
52
55
53
56
/**
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ springdoc:
42
42
example : Example value for 'name' property in ApiGroupName
43
43
44
44
paths :
45
- /persons :
45
+ /persons2 :
46
46
get :
47
47
summary : Summary of operationId 'persons' in ApiGroupName
48
48
description : Description of operationId 'persons' in ApiGroupName
Original file line number Diff line number Diff line change 59
59
"tags" : [
60
60
" hello-controller"
61
61
],
62
+ "summary" : " Summary of operationId 'persons' in ApiGroupName" ,
63
+ "description" : " Description of operationId 'persons' in ApiGroupName" ,
62
64
"operationId" : " persons2" ,
63
65
"responses" : {
64
66
"200" : {
You can’t perform that action at this time.
0 commit comments