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
{{ message }}
Repository navigation
NPE in SpringDocDataRestUtils.updateResponseSchemaEmbedded with Spring Data REST (still reproducible, including 3.0.2) #3337
I’m still hitting a NullPointerException while generating /v3/api-docs for a Spring Boot 4 app using Spring Data REST repositories, even though another issue (#3328) indicates this should not occur with 3.0.2.
The issue occurs when documenting Spring Data REST repositories exposed via @RepositoryRestResource (HAL responses with embedded/links).
Spring boot: 4.1.1
Spring doc: Tested on 3.1.0 and 3.0.2 and both gives same error
Spring data rest enabled (@RepositoryRestResource in multiple repositories)
Request to /v3/api-docs returns HTTP 500.
Stack trace points to org.springdoc.core.utils.SpringDocDataRestUtils.updateResponseSchemaEmbedded(...)
Exception:
java.lang.NullPointerException: Cannot invoke "java.util.Map.get(Object)" because the return value of "io.swagger.v3.oas.models.media.Schema.getProperties()" is null
at org.springdoc.core.utils.SpringDocDataRestUtils.updateResponseSchemaEmbedded(SpringDocDataRestUtils.java:297)
Also observed same error at line 302 when forcing OpenAPI 3.0 mode
Disabling springdoc Data REST integration avoids the crash:
springdoc.data-rest.enabled: false
This is a workaround, but it removes Data REST docs.
Can you confirm whether this is:
a different unhandled null-schema case in SpringDocDataRestUtils for Data REST/HAL embedded schemas?
Looks to be tied to this, i.e., also most likely that some beans have been lost in the auto-configuration changes, similar to the other issue shared. Could you confirm that 3.0.1 was the last working version for you?
There is version compatibility mismatch between spring boot 4.1.1 and springdoc 3.0.1, application fails to compile with 3.0.1
Exact root cause in log
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.hateoas.autoconfigure.HateoasProperties
So when I downgrade to springdoc 3.0.1, springdoc tries to wire SpringDocDataRestConfiguration -> halProvider against a class that doesn’t exist in spring boot 4.1.1, causing context startup/test failure.
Ok so you are basically suffering from the original issue that I shared (and hence also from the issue that remain after the first fix).
I can start investigating it and seeing what bean configuration that is best suited for handling all different scenarios once the maintainer has merged #3329.
Activity
Mattias-Sehlstedt commentedon Sep 3, 2026
Looks to be tied to this, i.e., also most likely that some beans have been lost in the auto-configuration changes, similar to the other issue shared. Could you confirm that 3.0.1 was the last working version for you?
sasikumar-ms7 commentedon Sep 3, 2026
There is version compatibility mismatch between spring boot 4.1.1 and springdoc 3.0.1, application fails to compile with 3.0.1
Exact root cause in log
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.hateoas.autoconfigure.HateoasProperties
So when I downgrade to springdoc 3.0.1, springdoc tries to wire SpringDocDataRestConfiguration -> halProvider against a class that doesn’t exist in spring boot 4.1.1, causing context startup/test failure.
Mattias-Sehlstedt commentedon Sep 3, 2026
Ok so you are basically suffering from the original issue that I shared (and hence also from the issue that remain after the first fix).
I can start investigating it and seeing what bean configuration that is best suited for handling all different scenarios once the maintainer has merged #3329.
sasikumar-ms7 commentedon Sep 3, 2026
Thanks for the prompt response and support. Is there any ETA for the fix?
fix: register the HAL beans when HateoasProperties is absent