Skip to content

fix: Replace build-time OpenAPI generated models - #100

Merged
jhateley-godaddy merged 2 commits into
mainfrom
fix/convert-generated-models-to-source
Jul 30, 2026
Merged

fix: Replace build-time OpenAPI generated models#100
jhateley-godaddy merged 2 commits into
mainfrom
fix/convert-generated-models-to-source

Conversation

@jhateley-godaddy

@jhateley-godaddy jhateley-godaddy commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Related issue

Fixes #99

Summary

Replace build-time OpenAPI model generation with committed model classes.

The API model classes move from generated code to committed source. The old code came from package com.godaddy.ans.sdk.model.generated, which the OpenAPI generator produced at build time. The new code lives in package com.godaddy.ans.sdk.model. The build no longer generates code. This change removes the org.openapi.generator plugin and its wiring. The api-spec.yaml file stays in the repository as a reference. It is no longer a generator input.

  • ans-sdk-api/build.gradle.kts: removed the OpenAPI generator plugin, the openApiGenerate config, the generated source set, and the checkstyle-disable block. Added JUnit and AssertJ test dependencies. - Added the model classes under com.godaddy.ans.sdk.model (agent, catalog, identity, CSR, renewal, and event models).
  • Updated the imports in agent-client, discovery, registration, and the Spring Boot example to the new package.

Testing

  • Added a unit test for each model class. E2E tests ran against working implementation.

AI assistance

Assisted-by: Claude Code (claude-fable-5)

Checklist

  • The PR title follows Conventional Commits — release notes are generated from it
  • Tests cover the change
  • The linked issue above uses a closing keyword
  • Every commit is signed off (git commit -s) certifying the DCO

Signed-off-by: James Hateley <jhateley@godaddy.com>

@bchen-godaddy bchen-godaddy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new model classes are move from the com.godaddy.ans.sdk.model.generated package (produced by org.openapi.generator at compile time) to com.godaddy.ans.sdk.model (committed source).

  • They are faithful ports of their previously generated version. Only one functional delta — the removal of toUrlQueryString() from all 55 files is intentional and correct (the method depended on ApiClient, which is now out of scope).

  • The generator plugin and all its Gradle wiring are removed. Coverage is thorough for model POJOs.

  • All four consuming modules (agent-client, discovery, registration, spring-boot example) are updated to use the new package. Unit tests are added for every model class.

Only a minor finding below.

Signed-off-by: James Hateley <jhateley@godaddy.com>
@jhateley-godaddy
jhateley-godaddy merged commit c82194a into main Jul 30, 2026
3 checks passed
@jhateley-godaddy
jhateley-godaddy deleted the fix/convert-generated-models-to-source branch July 30, 2026 03:32
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

Successfully merging this pull request may close these issues.

fix: Replace build-time OpenAPI model generation with committed model classes.

2 participants