Skip to content

Commit 1ea110b

Browse files
committed
Upgrade spring-boot to 3.2.4
swagger-core to 2.2.21 swagger-ui to 5.12.2 Fixes #2538
1 parent 2db978a commit 1ea110b

File tree

3 files changed

+113
-8
lines changed
  • springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/header
  • springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0

3 files changed

+113
-8
lines changed

Diff for: pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>3.2.3</version>
14+
<version>3.2.4</version>
1515
</parent>
1616

1717
<licenses>
@@ -60,8 +60,8 @@
6060
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
6161
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
6262
<nexus-staging-maven-plugin>1.6.8</nexus-staging-maven-plugin>
63-
<swagger-api.version>2.2.20</swagger-api.version>
64-
<swagger-ui.version>5.11.8</swagger-ui.version>
63+
<swagger-api.version>2.2.21</swagger-api.version>
64+
<swagger-ui.version>5.12.2</swagger-ui.version>
6565
<gmavenplus-plugin.version>1.13.1</gmavenplus-plugin.version>
6666
<jaxb-impl.version>2.1</jaxb-impl.version>
6767
<javax.jws-api.version>1.1</javax.jws-api.version>

Diff for: springdoc-openapi-starter-common/src/main/java/org/springdoc/core/fn/builders/header/Builder.java

+99-5
Original file line numberDiff line numberDiff line change
@@ -26,51 +26,76 @@
2626

2727
import java.lang.annotation.Annotation;
2828

29+
import io.swagger.v3.oas.annotations.enums.Explode;
2930
import io.swagger.v3.oas.annotations.headers.Header;
31+
import io.swagger.v3.oas.annotations.media.ArraySchema;
32+
import io.swagger.v3.oas.annotations.media.ExampleObject;
3033
import io.swagger.v3.oas.annotations.media.Schema;
3134

3235
/**
3336
* The type Header builder.
37+
*
3438
* @author bnasslahsen
3539
*/
3640
public class Builder {
3741

3842
/**
3943
* Required: The name of the header. The name is only used as the key to store this header in a map.
40-
*
4144
*/
4245
private String name;
4346

4447
/**
4548
* Additional description data to provide on the purpose of the header
46-
*
4749
*/
4850
private String description = "";
4951

5052
/**
5153
* The schema defining the type used for the header. Ignored if the properties content or array are specified.
52-
*
5354
*/
5455
private Schema schema = org.springdoc.core.fn.builders.schema.Builder.schemaBuilder().build();
5556

5657
/**
5758
* Determines whether this header is mandatory. The property may be included and its default value is false.
58-
*
5959
*/
6060
private boolean required;
6161

6262
/**
6363
* Specifies that a header is deprecated and should be transitioned out of usage.
64-
*
6564
*/
6665
private boolean deprecated;
6766

6867
/**
6968
* A reference to a header defined in components headers.
69+
*
7070
* @since swagger -core 2.0.3
7171
*/
7272
private String ref = "";
7373

74+
/**
75+
* The Explode.
76+
*/
77+
private Explode explode = Explode.DEFAULT;
78+
79+
/**
80+
* The Hidden.
81+
*/
82+
private boolean hidden;
83+
84+
/**
85+
* The Example.
86+
*/
87+
private String example = "";
88+
89+
/**
90+
* The Examples.
91+
*/
92+
private ExampleObject[] examples = {};
93+
94+
/**
95+
* Array array schema.
96+
*/
97+
private ArraySchema array = org.springdoc.core.fn.builders.arrayschema.Builder.arraySchemaBuilder().build();
98+
7499
/**
75100
* Instantiates a new Header builder.
76101
*/
@@ -152,6 +177,50 @@ public Builder ref(String ref) {
152177
return this;
153178
}
154179

180+
/**
181+
* Explode builder.
182+
*
183+
* @param val the val
184+
* @return the builder
185+
*/
186+
public Builder explode(Explode val) {
187+
explode = val;
188+
return this;
189+
}
190+
191+
/**
192+
* Hidden builder.
193+
*
194+
* @param val the val
195+
* @return the builder
196+
*/
197+
public Builder hidden(boolean val) {
198+
hidden = val;
199+
return this;
200+
}
201+
202+
/**
203+
* Example builder.
204+
*
205+
* @param val the val
206+
* @return the builder
207+
*/
208+
public Builder example(String val) {
209+
example = val;
210+
return this;
211+
}
212+
213+
/**
214+
* Examples builder.
215+
*
216+
* @param val the val
217+
* @return the builder
218+
*/
219+
public Builder examples(ExampleObject[] val) {
220+
examples = val;
221+
return this;
222+
}
223+
155224
/**
156225
* Build header.
157226
*
@@ -194,6 +263,31 @@ public boolean deprecated() {
194263
public String ref() {
195264
return ref;
196265
}
266+
267+
@Override
268+
public Explode explode() {
269+
return explode;
270+
}
271+
272+
@Override
273+
public boolean hidden() {
274+
return hidden;
275+
}
276+
277+
@Override
278+
public String example() {
279+
return example;
280+
}
281+
282+
@Override
283+
public ExampleObject[] examples() {
284+
return examples;
285+
}
286+
287+
@Override
288+
public ArraySchema array() {
289+
return array;
290+
}
197291
};
198292
}
199293
}

Diff for: springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.1.0/app2.json

+11
Original file line numberDiff line numberDiff line change
@@ -1127,6 +1127,17 @@
11271127
"photoUrls"
11281128
]
11291129
},
1130+
"Tag": {
1131+
"properties": {
1132+
"id": {
1133+
"type": "integer",
1134+
"format": "int64"
1135+
},
1136+
"name": {
1137+
"type": "string"
1138+
}
1139+
}
1140+
},
11301141
"Order": {
11311142
"properties": {
11321143
"complete": {

0 commit comments

Comments
 (0)