You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "brandboat (via GitHub)" <gi...@apache.org> on 2025/10/16 04:09:20 UTC

[PR] KAFKA-19792: Gradle build fails after Swagger patch version update [kafka]

brandboat opened a new pull request, #20711:
URL: https://github.com/apache/kafka/pull/20711

   Since version **2.2.27**, the Swagger Gradle Plugin introduced lazy configuration using Gradle's `Property<T>` API (see https://github.com/swagger-api/swagger-core/commit/583c21b11a9628aa87f030fb2b5b722d6bfedbb8)
   
   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 PR set
   
   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-19792: Gradle build fails after Swagger patch version update [kafka]

Posted by "brandboat (via GitHub)" <gi...@apache.org>.
brandboat commented on PR #20711:
URL: https://github.com/apache/kafka/pull/20711#issuecomment-3409110826

   Test step to verify this pr make no changes to the genConnectOpenAPIDocs output.
   ```
   # checkout to trunk
   rm -rf ./docs/generated/
   ./gradlew clean releaseTarGz
   cp ./docs/generated/connect_rest.yaml /tmp/connect_rest.yaml.before
   
   # checkout to this pr branch
   rm -rf ./docs/generated/
   ./gradlew clean releaseTarGz
   cp ./docs/generated/connect_rest.yaml /tmp/connect_rest.yaml.after
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-19792: Gradle build fails after Swagger patch version update [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #20711:
URL: https://github.com/apache/kafka/pull/20711


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-19792: Gradle build fails after Swagger patch version update [kafka]

Posted by "brandboat (via GitHub)" <gi...@apache.org>.
brandboat commented on PR #20711:
URL: https://github.com/apache/kafka/pull/20711#issuecomment-3415642669

   gentle ping @chia7712, @dejan2609, would you mind take a look when you are available? Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] KAFKA-19792: Gradle build fails after Swagger patch version update [kafka]

Posted by "dejan2609 (via GitHub)" <gi...@apache.org>.
dejan2609 commented on PR #20711:
URL: https://github.com/apache/kafka/pull/20711#issuecomment-3416123287

   @brandboat one non-binding LGTM :white_check_mark: from my side !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org