Skip to content

Commit 3593af0

Browse files
committed
Changes report #1829.
1 parent 47b724f commit 3593af0

File tree

10 files changed

+253
-213
lines changed

10 files changed

+253
-213
lines changed

springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration/SpringDocHints.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
* @author bnasslahsen
5252
*/
5353
@Lazy(false)
54-
@ConditionalOnExpression("${springdoc.api-docs.enabled:true} and ${springdoc.enable-native-support:true}")
54+
@ConditionalOnExpression("${springdoc.api-docs.enabled:true} and ${springdoc.enable-native-support:false}")
5555
@ConditionalOnWebApplication
5656
@Configuration(proxyBeanMethods = false)
5757
@ConditionalOnBean(SpringDocConfiguration.class)

springdoc-openapi-starter-common/src/main/java/org/springdoc/core/properties/SpringDocConfigProperties.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public class SpringDocConfigProperties {
214214
/**
215215
* The Enable native support.
216216
*/
217-
private boolean enableNativeSupport = true;
217+
private boolean enableNativeSupport = false;
218218

219219
/**
220220
* The Enable hateoas.
@@ -229,7 +229,7 @@ public class SpringDocConfigProperties {
229229
/**
230230
* convert query param to form data when consumes is multipart/form-data
231231
*/
232-
private boolean defaultSupportFormData=true;
232+
private boolean defaultSupportFormData;
233233

234234
/**
235235
* The Sort converter.

springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app189/SpringDocApp189Test.java

+2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
import test.org.springdoc.api.v30.AbstractSpringDocV30Test;
2626

2727
import org.springframework.boot.autoconfigure.SpringBootApplication;
28+
import org.springframework.test.context.TestPropertySource;
2829

30+
@TestPropertySource(properties = "springdoc.default-support-form-data=true")
2931
public class SpringDocApp189Test extends AbstractSpringDocV30Test {
3032

3133
@SpringBootApplication

springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app105-3.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,15 @@
331331
"type": "integer",
332332
"format": "int64"
333333
}
334+
},
335+
{
336+
"name": "additionalMetadata",
337+
"in": "query",
338+
"description": "Additional data to pass to server",
339+
"required": false,
340+
"schema": {
341+
"type": "string"
342+
}
334343
}
335344
],
336345
"requestBody": {
@@ -346,9 +355,6 @@
346355
"type": "string",
347356
"description": "file detail",
348357
"format": "binary"
349-
},
350-
"additionalMetadata": {
351-
"description": "Additional data to pass to server"
352358
}
353359
}
354360
}

springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app2.json

+13-7
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,15 @@
655655
"type": "integer",
656656
"format": "int64"
657657
}
658+
},
659+
{
660+
"name": "additionalMetadata",
661+
"in": "query",
662+
"description": "Additional data to pass to server",
663+
"required": false,
664+
"schema": {
665+
"type": "string"
666+
}
658667
}
659668
],
660669
"requestBody": {
@@ -670,9 +679,6 @@
670679
"type": "string",
671680
"description": "file detail",
672681
"format": "binary"
673-
},
674-
"additionalMetadata": {
675-
"description": "Additional data to pass to server"
676682
}
677683
}
678684
}
@@ -835,8 +841,8 @@
835841
}
836842
}
837843
},
838-
"200": {
839-
"description": "successful operation",
844+
"404": {
845+
"description": "Order not found",
840846
"content": {
841847
"application/xml": {
842848
"schema": {
@@ -850,8 +856,8 @@
850856
}
851857
}
852858
},
853-
"404": {
854-
"description": "Order not found",
859+
"200": {
860+
"description": "successful operation",
855861
"content": {
856862
"application/xml": {
857863
"schema": {

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

+13-7
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,15 @@
631631
"type": "integer",
632632
"format": "int64"
633633
}
634+
},
635+
{
636+
"name": "additionalMetadata",
637+
"in": "query",
638+
"description": "Additional data to pass to server",
639+
"required": false,
640+
"schema": {
641+
"type": "string"
642+
}
634643
}
635644
],
636645
"requestBody": {
@@ -643,9 +652,6 @@
643652
"type": "string",
644653
"format": "binary",
645654
"description": "file detail"
646-
},
647-
"additionalMetadata": {
648-
"description": "Additional data to pass to server"
649655
}
650656
},
651657
"required": [
@@ -803,8 +809,8 @@
803809
}
804810
}
805811
},
806-
"404": {
807-
"description": "Order not found",
812+
"200": {
813+
"description": "successful operation",
808814
"content": {
809815
"application/xml": {
810816
"schema": {
@@ -818,8 +824,8 @@
818824
}
819825
}
820826
},
821-
"200": {
822-
"description": "successful operation",
827+
"404": {
828+
"description": "Order not found",
823829
"content": {
824830
"application/xml": {
825831
"schema": {

springdoc-openapi-tests/springdoc-openapi-actuator-webmvc-tests/src/test/resources/results/app68-3.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,15 @@
331331
"type": "integer",
332332
"format": "int64"
333333
}
334+
},
335+
{
336+
"name": "additionalMetadata",
337+
"in": "query",
338+
"description": "Additional data to pass to server",
339+
"required": false,
340+
"schema": {
341+
"type": "string"
342+
}
334343
}
335344
],
336345
"requestBody": {
@@ -346,9 +355,6 @@
346355
"type": "string",
347356
"description": "file detail",
348357
"format": "binary"
349-
},
350-
"additionalMetadata": {
351-
"description": "Additional data to pass to server"
352358
}
353359
}
354360
}

0 commit comments

Comments
 (0)