Skip to content

Commit 1f33ed4

Browse files
committedJan 12, 2025·
code review
1 parent 8648879 commit 1f33ed4

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed
 

Diff for: ‎CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.8.3] - 2025-01-12
9+
10+
### Added
11+
- #2851 - Refine condition, for ignoring types when using PolymorphicModelConverter
12+
813
## [2.8.2] - 2025-01-12
914

1015
### Added

Diff for: ‎springdoc-openapi-starter-common/src/main/java/org/springdoc/core/converters/HateoasLinksConverter.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ public Schema<?> resolve(
6969
Iterator<ModelConverter> chain
7070
) {
7171
JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType());
72-
if (javaType != null) {
73-
if (RepresentationModel.class.isAssignableFrom(javaType.getRawClass())) {
72+
if (javaType != null && RepresentationModel.class.isAssignableFrom(javaType.getRawClass())) {
7473
Schema<?> schema = chain.next().resolve(type, context, chain);
7574
String schemaName = schema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length());
7675
Schema original = context.getDefinedModels().get(schemaName);
@@ -84,7 +83,6 @@ public Schema<?> resolve(
8483
arraySchema.set$ref(AnnotationsUtils.COMPONENTS_REF + "Links");
8584
}
8685
return schema;
87-
}
8886
}
8987
return chain.hasNext() ? chain.next().resolve(type, context, chain) : null;
9088
}

Diff for: ‎springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocDataRestUtils.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ private void updateRequestBodySchemaProperties(String key, Schema referencedSche
249249
if (entry.getValue().getItems()!=null)
250250
referencedSchema.addProperty(propId, new ArraySchema().items(new StringSchema()));
251251
else
252-
referencedSchema.addProperty(propId, new StringSchema()); {
253-
}
252+
referencedSchema.addProperty(propId, new StringSchema());
254253
}
255254
}
256255
}

0 commit comments

Comments
 (0)
Please sign in to comment.