Skip to content
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

Copy paste bug in Gradle plugin introduced in 2.2.29 #4858

Closed
erdi opened this issue Mar 11, 2025 · 2 comments
Closed

Copy paste bug in Gradle plugin introduced in 2.2.29 #4858

erdi opened this issue Mar 11, 2025 · 2 comments

Comments

@erdi
Copy link

erdi commented Mar 11, 2025

In 2.2.29, as part of #4853 a new config property was introduced, groupsValidationStrategy. It looks like #4853 introduced a change in behaviour of how validation constrains are being resolved because the description of that PR states:

Previous behavior (resolving validation constraints regardless of groups) can be accomplished by passing new configuration property groupsValidationStrategy=always

I attempted to apply this by setting the new property on ResolveTask in the Gradle plugin, called groupsValidationStrategy. Sadly, due to a bug on line 557 the value of that property is not passed on to SwaggerLoader unless defaultResponseCode is also set. I assume this is a copy paste error and the line should read

            if (groupsValidationStrategy.isPresent() && StringUtils.isNotBlank(groupsValidationStrategy.get())) {

rather than

            if (defaultResponseCode.isPresent() && StringUtils.isNotBlank(groupsValidationStrategy.get())) {
sdrycroft added a commit to sdrycroft/swagger-core that referenced this issue Mar 24, 2025
Checks the correct property as described in swagger-api#4858
@sdrycroft
Copy link

sdrycroft commented Mar 24, 2025

PR opened: #4866, @frantuma, could you take a look, please.

@frantuma
Copy link
Member

frantuma commented Apr 7, 2025

Thanks for reporting and investigating this, fixed in #4870

@frantuma frantuma closed this as completed Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants