Skip to content

Method renamed in 3.5.0 breaks springdoc-openapi libs #45648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
silviuburceadev opened this issue May 23, 2025 · 2 comments
Closed

Method renamed in 3.5.0 breaks springdoc-openapi libs #45648

silviuburceadev opened this issue May 23, 2025 · 2 comments
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@silviuburceadev
Copy link

silviuburceadev commented May 23, 2025

After upgrading to SB 3.5.0, and using org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.8 (latest), a method rename is causing method not found at start-up:

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springdoc.core.providers.HateoasHalProvider.isHalEnabled(HateoasHalProvider.java:81)

The following method did not exist:

    'boolean org.springframework.boot.autoconfigure.hateoas.HateoasProperties.getUseHalAsDefaultJsonMediaType()'

The calling method's class, org.springdoc.core.providers.HateoasHalProvider, was loaded from the following location:

    jar:file:/Users/silviu.burcea/.m2/repository/org/springdoc/springdoc-openapi-starter-common/2.8.8/springdoc-openapi-starter-common-2.8.8.jar!/org/springdoc/core/providers/HateoasHalProvider.class

The called method's class, org.springframework.boot.autoconfigure.hateoas.HateoasProperties, is available from the following locations:

    jar:file:/Users/silviu.burcea/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.5.0/spring-boot-autoconfigure-3.5.0.jar!/org/springframework/boot/autoconfigure/hateoas/HateoasProperties.class

The called method's class hierarchy was loaded from the following locations:

    org.springframework.boot.autoconfigure.hateoas.HateoasProperties: file:/Users/silviu.burcea/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.5.0/spring-boot-autoconfigure-3.5.0.jar

This must either be reverted or at least mentioned in 3.5.0 release notes. I have reported it to springdoc team, for their awareness: springdoc/springdoc-openapi#3005

I'm happy to contribute once it's clear which project needs to change.

Offending commit, for context: 964abef

@wilkinsona
Copy link
Member

Thanks for the report.

This wasn't mentioned in the release notes as we don't consider the getters and setters of @ConfigurationProperties to be public API. This is mentioned in the reference documentation:

The properties that map to @ConfigurationProperties classes available in Spring Boot, which are configured through properties files, YAML files, environment variables, and other mechanisms, are public API but the accessors (getters/setters) of the class itself are not meant to be used directly.

We'll discuss this to see if we want to make an exception in this case.

@wilkinsona wilkinsona added the for: team-meeting An issue we'd like to discuss as a team to make progress label May 23, 2025
@philwebb
Copy link
Member

I'm not keen to change these back again, I think the change generally improves our code. I think springdoc-openapi-starter-webmvc should be able to adapt to our change and use reflection if they need to support older versions.

@philwebb philwebb closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2025
@philwebb philwebb added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged for: team-meeting An issue we'd like to discuss as a team to make progress labels May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

4 participants