private List<String> getIgnoredFields(ResourceMetadata
			resourceMetadata, PersistentEntity<?, ?> entity) {
		List<String> ignoredFields = new ArrayList<>();
		if (entity != null && entity.getIdProperty() != null) {
			String idField = Objects.requireNonNull(entity.getIdProperty()).getName();
			ignoredFields.add(idField);
			entity.doWithAssociations((SimpleAssociationHandler) association -> {
				PersistentProperty<?> property = association.getInverse();
				ResourceMapping mapping = resourceMetadata.getMappingFor(property);
				if (mapping.isExported()) {
					String filedName = mapping.getRel().value();
					ignoredFields.add(filedName);
				}
			});
		}
		return ignoredFields;
	}
Gets ignored fields.

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