private List<String> getAssociationsFields(ResourceMetadata
			resourceMetadata, PersistentEntity<?, ?> entity) {
		List<String> associationsFields = new ArrayList<>();
		entity.doWithAssociations((SimpleAssociationHandler) association -> {
			PersistentProperty<?> property = association.getInverse();
			ResourceMapping mapping = resourceMetadata.getMappingFor(property);
			if (mapping.isExported()) {
				String filedName = mapping.getRel().value();
				associationsFields.add(filedName);
			}
		});
		return associationsFields;
	}
Gets associations fields.

@param resourceMetadata the resource metadata
@param entity           the entity
@return the associations fields
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/SpringDocDataRestUtils.java