Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
bnasslahsen committed Jan 12, 2025
1 parent 8648879 commit 1f33ed4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.8.3] - 2025-01-12

### Added
- #2851 - Refine condition, for ignoring types when using PolymorphicModelConverter

## [2.8.2] - 2025-01-12

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ public Schema<?> resolve(
Iterator<ModelConverter> chain
) {
JavaType javaType = springDocObjectMapper.jsonMapper().constructType(type.getType());
if (javaType != null) {
if (RepresentationModel.class.isAssignableFrom(javaType.getRawClass())) {
if (javaType != null && RepresentationModel.class.isAssignableFrom(javaType.getRawClass())) {
Schema<?> schema = chain.next().resolve(type, context, chain);
String schemaName = schema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length());
Schema original = context.getDefinedModels().get(schemaName);
Expand All @@ -84,7 +83,6 @@ public Schema<?> resolve(
arraySchema.set$ref(AnnotationsUtils.COMPONENTS_REF + "Links");
}
return schema;
}
}
return chain.hasNext() ? chain.next().resolve(type, context, chain) : null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ private void updateRequestBodySchemaProperties(String key, Schema referencedSche
if (entry.getValue().getItems()!=null)
referencedSchema.addProperty(propId, new ArraySchema().items(new StringSchema()));
else
referencedSchema.addProperty(propId, new StringSchema()); {
}
referencedSchema.addProperty(propId, new StringSchema());
}
}
}
Expand Down

0 comments on commit 1f33ed4

Please sign in to comment.