Skip to content

Commit 0803dbc

Browse files
committed
Spring Data REST fails when setting version to openapi_3_1. Fixes #2516
1 parent 65e9a3c commit 0803dbc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ else if (EMBEDDED.equals(propId)) {
281281
*/
282282
private void updateResponseSchemaEmbedded(Components components, EntityInfo entityInfo, Entry<String, Schema> entry, boolean openapi31) {
283283
String entityClassName = linkRelationProvider.getCollectionResourceRelFor(entityInfo.getDomainType()).value();
284-
ArraySchema arraySchema = (ArraySchema) ((ObjectSchema) entry.getValue()).getProperties().get(entityClassName);
284+
ArraySchema arraySchema = (ArraySchema) entry.getValue().getProperties().get(entityClassName);
285285
if (arraySchema != null) {
286286
Schema itemsSchema = arraySchema.getItems();
287287
Set<String> entitiesNames = entityInoMap.keySet();

0 commit comments

Comments
 (0)