Skip to content

Fix #339: support useTimeType and common spec fields in Gradle AsyncAPI plugin (6.7.3) - #412

Merged
jemacineiras merged 2 commits into
sngular:mainfrom
joseegman:fix/339-gradle-async-useTimeType
Aug 16, 2026
Merged

Fix #339: support useTimeType and common spec fields in Gradle AsyncAPI plugin (6.7.3)#412
jemacineiras merged 2 commits into
sngular:mainfrom
joseegman:fix/339-gradle-async-useTimeType

Conversation

@joseegman

@joseegman joseegman commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #339

Problem

The Gradle AsyncAPI plugin failed with Could not set unknown property 'useTimeType' for object of type com.sngular.api.generator.plugin.model.OperationParameter when configuring useTimeType (or dateFormat, dateTimeFormat, useLombokModelAnnotation, modelNamePrefix) inside consumer / supplier / streamBridge.

OperationParameter.groovy only exposed ids, apiPackage, modelPackage, modelNameSuffix, classNamePostfix, and AsyncApiTask.toOperationParameterObject only mapped those — even though the engine's OperationParameterObject (which extends CommonSpecFile) supports all these fields, the docs document them, and the OpenAPI Gradle plugin already maps them (OpenApiTask.toFileSpec).

Fix

  • scs-multiapi-gradle-plugin/.../model/OperationParameter.groovy: added modelNamePrefix, dateFormat, dateTimeFormat, useTimeType (TypeConstants.TimeType) and useLombokModelAnnotation, mirroring CommonSpecFile.
  • scs-multiapi-gradle-plugin/.../AsyncApiTask.groovy: toOperationParameterObject now maps the new fields onto OperationParameterObject.
  • ScsMultiApiTest.java: added 4 tests — useTimeType mapping (ZONED), default (LOCAL), and mapping of the remaining common spec fields.
  • .codacy.yml: added OperationParameter.groovy to exclude_paths, consistent with the other Gradle DSL model classes (*SpecFile.groovy, *Task.groovy) that are already excluded because CodeNarc's default rules (e.g. 4-space Indentation, missing Javadoc) flag this project's 2-space Groovy convention as noise.

Validation

  • scs-multiapi-gradle-plugin: gradlew test green — 7 tests, 0 failures (was 3).
  • multiapi-engine: full suite green — 133 tests, 0 failures.
  • Reproduced the Codacy findings locally with CodeNarc 3.3.0 (all violations in OperationParameter.groovy are the known Indentation/Javadoc-style noise; the file is now excluded like its siblings).
  • Version bumped to 6.7.3 in all three modules (engine, Maven plugin, Gradle plugin).

@codacy-production

codacy-production Bot commented Aug 16, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@jemacineiras jemacineiras added the release Adding this tag to a PR will cause a release on merge label Aug 16, 2026
@jemacineiras jemacineiras self-assigned this Aug 16, 2026
@jemacineiras
jemacineiras self-requested a review August 16, 2026 21:16
jemacineiras
jemacineiras previously approved these changes Aug 16, 2026
@jemacineiras
jemacineiras merged commit 86e82bc into sngular:main Aug 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Adding this tag to a PR will cause a release on merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useTimeType could not be set in gradle configuration

2 participants