KAFKA-19792: Gradle build fails after Swagger patch version update#20711
Merged
chia7712 merged 2 commits intoapache:trunkfrom Oct 18, 2025
Merged
KAFKA-19792: Gradle build fails after Swagger patch version update#20711chia7712 merged 2 commits intoapache:trunkfrom
chia7712 merged 2 commits intoapache:trunkfrom
Conversation
Member
Author
|
Test step to verify this pr make no changes to the genConnectOpenAPIDocs output. |
Member
Author
|
gentle ping @chia7712, @dejan2609, would you mind take a look when you are available? Thank you! |
Contributor
|
@brandboat one non-binding LGTM ✅ from my side ! |
chia7712
approved these changes
Oct 18, 2025
JimmyWang6
pushed a commit
to JimmyWang6/jimmy-KAFKA-14048
that referenced
this pull request
Oct 19, 2025
…ache#20711) Since version **2.2.27**, the Swagger Gradle Plugin introduced lazy configuration using Gradle's `Property<T>` API (see swagger-api/swagger-core@583c21b) With lazy configuration, properties are not evaluated until task execution. However, access a property must have a value set. Attempting to query a property without a value throws: ``` Cannot query the value of property 'xyz' because it has no value available ``` And in `genConnectOpenAPIDocs`, we manually create a `ResolveTask` instance which is responsible for setting default values for these properties. This patch explicitly sets these required properties to match their default values from the Swagger Gradle Plugin conventions defined in [SwaggerPlugin.java](https://github.com/swagger-api/swagger-core/blob/v2.2.39/modules/swagger-gradle-plugin/src/main/java/io/swagger/v3/plugins/gradle/SwaggerPlugin.java#L25-L38) - set alwaysResolveAppPath to false: default is false - set skipResolveAppPath to false: default is false - set readAllResources to true: default is true - set encoding to UTF-8: default is UTF-8 This ensures the manually created `ResolveTask` has all required property values, preventing the "Cannot query the value of property" error. Reviewers: Dejan Stojadinović <dejan2609@users.noreply.github.com>, Chia-Ping Tsai <chia7712@gmail.com>
eduwercamacaro
pushed a commit
to littlehorse-enterprises/kafka
that referenced
this pull request
Nov 12, 2025
…ache#20711) Since version **2.2.27**, the Swagger Gradle Plugin introduced lazy configuration using Gradle's `Property<T>` API (see swagger-api/swagger-core@583c21b) With lazy configuration, properties are not evaluated until task execution. However, access a property must have a value set. Attempting to query a property without a value throws: ``` Cannot query the value of property 'xyz' because it has no value available ``` And in `genConnectOpenAPIDocs`, we manually create a `ResolveTask` instance which is responsible for setting default values for these properties. This patch explicitly sets these required properties to match their default values from the Swagger Gradle Plugin conventions defined in [SwaggerPlugin.java](https://github.com/swagger-api/swagger-core/blob/v2.2.39/modules/swagger-gradle-plugin/src/main/java/io/swagger/v3/plugins/gradle/SwaggerPlugin.java#L25-L38) - set alwaysResolveAppPath to false: default is false - set skipResolveAppPath to false: default is false - set readAllResources to true: default is true - set encoding to UTF-8: default is UTF-8 This ensures the manually created `ResolveTask` has all required property values, preventing the "Cannot query the value of property" error. Reviewers: Dejan Stojadinović <dejan2609@users.noreply.github.com>, Chia-Ping Tsai <chia7712@gmail.com>
TaiJuWu
pushed a commit
to TaiJuWu/kafka
that referenced
this pull request
Dec 3, 2025
…ache#20711) Since version **2.2.27**, the Swagger Gradle Plugin introduced lazy configuration using Gradle's `Property<T>` API (see swagger-api/swagger-core@583c21b) With lazy configuration, properties are not evaluated until task execution. However, access a property must have a value set. Attempting to query a property without a value throws: ``` Cannot query the value of property 'xyz' because it has no value available ``` And in `genConnectOpenAPIDocs`, we manually create a `ResolveTask` instance which is responsible for setting default values for these properties. This patch explicitly sets these required properties to match their default values from the Swagger Gradle Plugin conventions defined in [SwaggerPlugin.java](https://github.com/swagger-api/swagger-core/blob/v2.2.39/modules/swagger-gradle-plugin/src/main/java/io/swagger/v3/plugins/gradle/SwaggerPlugin.java#L25-L38) - set alwaysResolveAppPath to false: default is false - set skipResolveAppPath to false: default is false - set readAllResources to true: default is true - set encoding to UTF-8: default is UTF-8 This ensures the manually created `ResolveTask` has all required property values, preventing the "Cannot query the value of property" error. Reviewers: Dejan Stojadinović <dejan2609@users.noreply.github.com>, Chia-Ping Tsai <chia7712@gmail.com>
shashankhs11
pushed a commit
to shashankhs11/kafka
that referenced
this pull request
Dec 15, 2025
…ache#20711) Since version **2.2.27**, the Swagger Gradle Plugin introduced lazy configuration using Gradle's `Property<T>` API (see swagger-api/swagger-core@583c21b) With lazy configuration, properties are not evaluated until task execution. However, access a property must have a value set. Attempting to query a property without a value throws: ``` Cannot query the value of property 'xyz' because it has no value available ``` And in `genConnectOpenAPIDocs`, we manually create a `ResolveTask` instance which is responsible for setting default values for these properties. This patch explicitly sets these required properties to match their default values from the Swagger Gradle Plugin conventions defined in [SwaggerPlugin.java](https://github.com/swagger-api/swagger-core/blob/v2.2.39/modules/swagger-gradle-plugin/src/main/java/io/swagger/v3/plugins/gradle/SwaggerPlugin.java#L25-L38) - set alwaysResolveAppPath to false: default is false - set skipResolveAppPath to false: default is false - set readAllResources to true: default is true - set encoding to UTF-8: default is UTF-8 This ensures the manually created `ResolveTask` has all required property values, preventing the "Cannot query the value of property" error. Reviewers: Dejan Stojadinović <dejan2609@users.noreply.github.com>, Chia-Ping Tsai <chia7712@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since version 2.2.27, the Swagger Gradle Plugin introduced lazy
configuration using Gradle's
Property<T>API (seeswagger-api/swagger-core@583c21b)
With lazy configuration, properties are not evaluated until task
execution. However, access a property must have a value set. Attempting
to query a property without a value throws:
And in
genConnectOpenAPIDocs, we manually create aResolveTaskinstance which is responsible for setting default values for these
properties.
This patch explicitly sets these required properties to match their
default values from the Swagger Gradle Plugin conventions defined in
SwaggerPlugin.java
This ensures the manually created
ResolveTaskhas all requiredproperty values, preventing the "Cannot query the value of property"
error.
Reviewers: Dejan Stojadinović dejan2609@users.noreply.github.com,
Chia-Ping Tsai chia7712@gmail.com