File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 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.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
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+
828## [ 2.4.0] - 2024-03-12
929
1030### 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 2727import java .util .List ;
2828import java .util .Set ;
2929
30+ import org .springdoc .core .conditions .SpecPropertiesCondition ;
3031import org .springdoc .core .customizers .SpecPropertiesCustomizer ;
3132import org .springdoc .core .models .GroupedOpenApi ;
3233import org .springdoc .core .properties .SpringDocConfigProperties ;
3637import org .springframework .boot .autoconfigure .condition .ConditionalOnBean ;
3738import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
3839import org .springframework .context .annotation .Bean ;
40+ import org .springframework .context .annotation .Conditional ;
3941import org .springframework .context .annotation .Configuration ;
4042import org .springframework .context .annotation .Lazy ;
4143
4850@ Lazy (false )
4951@ Configuration (proxyBeanMethods = false )
5052@ ConditionalOnBean (SpringDocConfiguration .class )
53+ @ Conditional (SpecPropertiesCondition .class )
5154public class SpringDocSpecPropertiesConfiguration {
5255
5356 /**
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ springdoc:
4242 example : Example value for 'name' property in ApiGroupName
4343
4444 paths :
45- /persons :
45+ /persons2 :
4646 get :
4747 summary : Summary of operationId 'persons' in ApiGroupName
4848 description : Description of operationId 'persons' in ApiGroupName
Original file line number Diff line number Diff line change 5959 "tags" : [
6060 " hello-controller"
6161 ],
62+ "summary" : " Summary of operationId 'persons' in ApiGroupName" ,
63+ "description" : " Description of operationId 'persons' in ApiGroupName" ,
6264 "operationId" : " persons2" ,
6365 "responses" : {
6466 "200" : {
You can’t perform that action at this time.
0 commit comments