You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an entity has Generic references, such as class Privilege implements ElasticSearchEntity<String, AuditInfo>, in springdoc's SpringRepositoryRestResourceProvider's
entity = this.persistentEntities.getRequiredPersistentEntity(domainType);
It throws exception:
org.springframework.data.mapping.MappingException: Cannot get or create PersistentEntity for type com.apple.ist.idms.ramp.es.audit.IndexerInfo; PersistentEntities knows about 2 MappingContext instances and therefore cannot identify a single responsible one; Please configure the initialEntitySet through an entity scan using the base package in your configuration to pre initialize contexts
at org.springframework.data.mapping.context.PersistentEntities.lambda$getRequiredPersistentEntity$0(PersistentEntities.java:120)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.springframework.data.mapping.context.PersistentEntities.getRequiredPersistentEntity(PersistentEntities.java:119)
at org.springdoc.core.utils.SpringDocDataRestUtils.customise(SpringDocDataRestUtils.java:126)
at org.springdoc.core.providers.SpringRepositoryRestResourceProvider.customize(SpringRepositoryRestResourceProvider.java:314)
The issue is caused by AuditInfo which is defined as a Generic for Privilege, in persistentEntities, AuditInfo has type TypeDiscoverer, the regular class has type ClassTypeInformation.
Because of this exception, the swagger api doc is not getting loaded when I try to access /v3/api-docs endpoint.
If you are reporting a bug, please help to speed up problem diagnosis by providing as
much information as possible:
A clear and concise description of what the bug is: the title of an issue is not enough
To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using? 3.2.1
What modules and versions of springdoc-openapi are you using? 2.4.1
What is the actual and the expected result using OpenAPI Description (yml or json)?
Provide with a sample code (HelloController) or Test that reproduces the problem
Expected behavior
A clear and concise description of what you expected to happen.
What is the expected result using OpenAPI Description (yml or json)?
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
When an entity has Generic references, such as class Privilege implements ElasticSearchEntity<String, AuditInfo>, in springdoc's SpringRepositoryRestResourceProvider's
entity = this.persistentEntities.getRequiredPersistentEntity(domainType);
It throws exception:
org.springframework.data.mapping.MappingException: Cannot get or create PersistentEntity for type com.apple.ist.idms.ramp.es.audit.IndexerInfo; PersistentEntities knows about 2 MappingContext instances and therefore cannot identify a single responsible one; Please configure the initialEntitySet through an entity scan using the base package in your configuration to pre initialize contexts
at org.springframework.data.mapping.context.PersistentEntities.lambda$getRequiredPersistentEntity$0(PersistentEntities.java:120)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.springframework.data.mapping.context.PersistentEntities.getRequiredPersistentEntity(PersistentEntities.java:119)
at org.springdoc.core.utils.SpringDocDataRestUtils.customise(SpringDocDataRestUtils.java:126)
at org.springdoc.core.providers.SpringRepositoryRestResourceProvider.customize(SpringRepositoryRestResourceProvider.java:314)
The issue is caused by AuditInfo which is defined as a Generic for Privilege, in persistentEntities, AuditInfo has type TypeDiscoverer, the regular class has type ClassTypeInformation.
Because of this exception, the swagger api doc is not getting loaded when I try to access /v3/api-docs endpoint.
much information as possible:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: