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
SpringDocHateoasConfiguration breaks when there is no LinkRelationProvider bean #3364
SpringDocHateoasConfiguration assumes a LinkRelationProvider bean can be injected, but doesn't verify that such a bean actually exists.
To Reproduce
Steps to reproduce the behavior:
What version of spring-boot you are using?
Spring Boot 4.1.1.
What modules and versions of springdoc-openapi are you using?
springdoc-openapi-starter-webmvc-api 3.1.1.
What is the actual and the expected result using OpenAPI Description (yml or json)?
Not applicable.
Provide with a sample code (HelloController) or Test that reproduces the problem
org.springdoc.core.configuration.SpringDocHateoasConfiguration#collectionModelContentConverter(HateoasHalProvider, LinkRelationProvider) requires a LinkRelationProvider bean. This auto-configuration class verifies that the LinkRelationProvider class is present using @ConditionalOnClass (on multiple levels even, which seems redundant), but it never verifies that a bean of this type is present (using @ConditionalOnBean), so the auto-configuration fails when there is no LinkRelationProvider bean:
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'modelConverterRegistrar' defined in class path resource [org/springdoc/core/configuration/SpringDocConfiguration.class]: Unsatisfied dependency expressed through method 'modelConverterRegistrar' parameter 0: Error creating bean with name 'collectionModelContentConverter' defined in class path resource [org/springdoc/core/configuration/SpringDocHateoasConfiguration.class]: Unsatisfied dependency expressed through method 'collectionModelContentConverter' parameter 1: No qualifying bean of type 'org.springframework.hateoas.server.LinkRelationProvider' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Expected behavior
A clear and concise description of what you expected to happen.
I expect SpringDocHateoasConfiguration to not fail when the LinkRelationProvider class is present, but there is no bean of this type.
What is the expected result using OpenAPI Description (yml or json)?
Activity
anupamchaubey commentedon Sep 18, 2026
I like to work on it.
Skip the collection model converter without a LinkRelationProvider bean
fix: make CollectionModelContentConverter conditional on LinkRelation…
Resolve the LinkRelationProvider lazily for the collection model conv…
Restore the changelog entries lost in the unreleased fixed section