private void updateResponseSchemaEmbedded(Components components, EntityInfo entityInfo, Entry<String, Schema> entry, boolean openapi31) {
		String entityClassName = linkRelationProvider.getCollectionResourceRelFor(entityInfo.getDomainType()).value();
		Schema itemsSchema = null;
		if (openapi31) {
			JsonSchema jsonSchema = (JsonSchema) entry.getValue().getProperties().get(entityClassName);
			if (jsonSchema != null)
				itemsSchema = jsonSchema.getItems();
		}
		else {
			ArraySchema arraySchema = (ArraySchema) entry.getValue().getProperties().get(entityClassName);
			if (arraySchema != null)
				itemsSchema = arraySchema.getItems();
		}
		if (itemsSchema != null) {
			Set<String> entitiesNames = entityInoMap.keySet();
			if (itemsSchema.get$ref() != null && !itemsSchema.get$ref().endsWith(RESPONSE)) {
				String key = itemsSchema.get$ref().substring(Components.COMPONENTS_SCHEMAS_REF.length());
				if (entitiesNames.contains(key)) {
					String newKey = itemsSchema.get$ref() + RESPONSE;
					createNewResponseSchema(key, components, openapi31);
					itemsSchema.set$ref(newKey);
					updateResponseSchema(key, components.getSchemas().get(key + RESPONSE), components, openapi31);
				}
			}
			else if (isComposedSchema(itemsSchema)) {
				updateComposedSchema(itemsSchema.getAllOf(), itemsSchema.getOneOf(), RESPONSE, components, openapi31);
			}
		}
	}
Update response schema embedded.

@param components the components
@param entityInfo the entity info
@param entry      the entry
@param openapi31  the openapi 31
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocDataRestUtils.java