[MAVEN PLUGIN; GRADLE-PLUGIN] - Add KDoc/Javadoc to the Gradle plugin and integrate Dokka so IDEs show helpful tooltips; fix missing parameter wiring; improve merged-spec handling to match the Maven plugin#24067
Conversation
- Add Dokka to gradle plugin build to include KDocs in javadoc JAR - Fix missing extension→task wiring for enumNameMappings, operationIdNameMappings, and mergedFileName - Add missing parameters absent from Gradle but present in Maven: strictSpec, minimalUpdate,generateRecursiveDependentModels, mergedFileInfoName/Description/Version - Fix bug: auth was not passed to MergedSpecBuilder in Gradle - Add KDocs to all undocumented extension/task properties including defaults, and Javadoc to verbose/cleanupOutput in Maven plugin
There was a problem hiding this comment.
2 issues found across 10 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
2 issues found across 11 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
3 issues found across 11 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt">
<violation number="1" location="modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt:405">
P2: KDoc contradicts property semantics: `logToStderr` is documented as writing to STDOUT, but should be STDERR.</violation>
</file>
<file name="modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt">
<violation number="1" location="modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt:937">
P2: Merged-spec metadata fingerprint uses ambiguous `|` delimiter concatenation that can cause cache key collisions when user-provided values contain `|`.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
|
||
| /** | ||
| * To write all log messages (not just errors) to STDOUT | ||
| * To write all log messages (not just errors) to STDOUT. Defaults to `false`. |
There was a problem hiding this comment.
P2: KDoc contradicts property semantics: logToStderr is documented as writing to STDOUT, but should be STDERR.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt, line 405:
<comment>KDoc contradicts property semantics: `logToStderr` is documented as writing to STDOUT, but should be STDERR.</comment>
<file context>
@@ -360,11 +397,12 @@ open class OpenApiGeneratorGenerateExtension(private val project: Project) {
/**
- * To write all log messages (not just errors) to STDOUT
+ * To write all log messages (not just errors) to STDOUT. Defaults to `false`.
*/
val logToStderr = project.objects.property<Boolean>()
</file context>
| * To write all log messages (not just errors) to STDOUT. Defaults to `false`. | |
| + * To write all log messages (not just errors) to STDERR. Defaults to `false`. |
| get() { | ||
| if (!inputSpecRootDirectory.isPresent) return null | ||
| if (inputSpecRootDirectorySkipMerge.getOrElse(false)) return null | ||
| return "${mergedFileInfoName.orNull}|${mergedFileInfoDescription.orNull}|${mergedFileInfoVersion.orNull}" |
There was a problem hiding this comment.
P2: Merged-spec metadata fingerprint uses ambiguous | delimiter concatenation that can cause cache key collisions when user-provided values contain |.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt, line 937:
<comment>Merged-spec metadata fingerprint uses ambiguous `|` delimiter concatenation that can cause cache key collisions when user-provided values contain `|`.</comment>
<file context>
@@ -852,9 +873,80 @@ abstract class GenerateTask : DefaultTask() {
+ get() {
+ if (!inputSpecRootDirectory.isPresent) return null
+ if (inputSpecRootDirectorySkipMerge.getOrElse(false)) return null
+ return "${mergedFileInfoName.orNull}|${mergedFileInfoDescription.orNull}|${mergedFileInfoVersion.orNull}"
+ }
+
</file context>
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
Summary by cubic
Adds KDoc/Javadoc to the Gradle plugin with Dokka-powered
javadocJarfor IDE tooltips, fixes missing parameter wiring, and aligns merged-spec handling with the Maven plugin, including accurate up-to-date checks.New Features
org.jetbrains.dokka-javadoc(2.2.0);javadocJarnow builds from Dokka output and is published.strictSpec,minimalUpdate,generateRecursiveDependentModels(no plugin defaults; config-file values win unless set), plusmergedFileInfoName,mergedFileInfoDescription,mergedFileInfoVersion(with defaults).verboseandcleanupOutput.Bug Fixes
enumNameMappings,operationIdNameMappings, andmergedFileNamefrom theopenApiGenerateextension to the task.authand merged-specinfofields into the merged-spec builder; added a conditional input fingerprint to stabilize up-to-date checks when merging is enabled.generateRecursiveDependentModelsis honored via the global setting; addedParameterWiringRegressionTest(with an enum spec) to prevent regressions.Written for commit c46500e. Summary will update on new commits.