Skip to content

Commit dda7ba0

Browse files
Upgrade swagger-core from version 2.2.48 to 2.2.49
1 parent 993ec4b commit dda7ba0

5 files changed

Lines changed: 5 additions & 24 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<central-publishing-maven-plugin.version>0.7.0
5555
</central-publishing-maven-plugin.version>
5656
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
57-
<swagger-api.version>2.2.48</swagger-api.version>
57+
<swagger-api.version>2.2.49</swagger-api.version>
5858
<swagger-ui.version>5.32.2</swagger-ui.version>
5959
<gmavenplus-plugin.version>1.13.1</gmavenplus-plugin.version>
6060
<jjwt.version>0.9.1</jjwt.version>

springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,6 @@ protected OpenAPI getOpenApi(String serverBaseUrl, Locale locale) {
385385
}
386386
getPaths(mappingsMap, finalLocale, openAPI);
387387

388-
if (OpenApiVersion.OPENAPI_3_1 == springDocConfigProperties.getApiDocs().getVersion())
389-
handleComponentSchemaTypes(openAPI);
390-
391388
if (springDocConfigProperties.isTrimKotlinIndent())
392389
this.trimIndent(openAPI);
393390

@@ -458,20 +455,6 @@ private void trimIndent(OpenAPI openAPI) {
458455
trimPaths(openAPI);
459456
}
460457

461-
/**
462-
* Fix component schemas for OAS 3.1 post-processing.
463-
*
464-
* @param openAPI the open api
465-
*/
466-
private static void handleComponentSchemaTypes(OpenAPI openAPI) {
467-
if (openAPI.getComponents() == null || openAPI.getComponents().getSchemas() == null) {
468-
return;
469-
}
470-
for (Schema<?> schema : openAPI.getComponents().getSchemas().values()) {
471-
SpringDocUtils.fixNullOnlyAdditionalProperties(schema);
472-
}
473-
}
474-
475458
/**
476459
* Trim the indent for descriptions in the 'components' of open api.
477460
*

springdoc-openapi-starter-common/src/main/java/org/springdoc/core/providers/ObjectMapperProvider.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import io.swagger.v3.core.util.Yaml;
3636
import io.swagger.v3.core.util.Yaml31;
3737
import io.swagger.v3.oas.models.OpenAPI;
38-
import io.swagger.v3.core.util.PrimitiveType;
3938
import io.swagger.v3.oas.models.media.Schema;
4039
import org.springdoc.core.mixins.SortedOpenAPIMixin;
4140
import org.springdoc.core.mixins.SortedOpenAPIMixin31;
@@ -81,14 +80,10 @@ public ObjectMapperProvider(SpringDocConfigProperties springDocConfigProperties)
8180
if (springDocConfigProperties.isExplicitObjectSchema()) {
8281
System.setProperty(Schema.EXPLICIT_OBJECT_SCHEMA_PROPERTY, "true");
8382
}
84-
else {
85-
PrimitiveType.explicitObjectType = false;
86-
}
8783
}
8884
else {
8985
jsonMapper = Json.mapper();
9086
yamlMapper = Yaml.mapper();
91-
PrimitiveType.explicitObjectType = null;
9287
}
9388
}
9489

springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ else if (schema.getItems() != null && schema.getItems().getType() != null
187187
/**
188188
* Fix additionalProperties incorrectly set to {"type": "null"} when @Nullable
189189
* propagates from a Map field to its Object value type (resolved as "any type" = {}).
190+
* <p>
191+
* Tracked under <a href="https://github.com/swagger-api/swagger-core/issues/5115">swagger-core#5115</a>.
190192
*
191193
* @param schema the schema to fix
192194
*/

springdoc-openapi-tests/springdoc-openapi-javadoc-tests/src/test/resources/results/3.1.0/app18.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"schema": {
6969
"type": "integer",
7070
"format": "int32",
71-
"exclusiveMinimum": 0
71+
"exclusiveMinimum": 0,
72+
"minimum": 0
7273
}
7374
}
7475
],

0 commit comments

Comments
 (0)