Skip to content

Commit 3fdca98

Browse files
committed
refs #3853 - fix composed schemas ref with fqn TypeNameResolver
1 parent 67e3a3f commit 3fdca98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/ModelResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ private boolean resolveSubtypes(Schema model, BeanDescription bean, ModelConvert
14281428
} else {
14291429
composedSchema = (ComposedSchema) subtypeModel;
14301430
}
1431-
Schema refSchema = new Schema().$ref(model.getName());
1431+
Schema refSchema = new Schema().$ref(Components.COMPONENTS_SCHEMAS_REF + model.getName());
14321432
// allOf could have already being added during type resolving when @Schema(allOf..) is declared
14331433
if (composedSchema.getAllOf() == null || !composedSchema.getAllOf().contains(refSchema)) {
14341434
composedSchema.addAllOfItem(refSchema);

0 commit comments

Comments
 (0)