fix: Replace build-time OpenAPI generated models - #100
Merged
Conversation
Signed-off-by: James Hateley <jhateley@godaddy.com>
bchen-godaddy
left a comment
Collaborator
There was a problem hiding this comment.
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>
bchen-godaddy
approved these changes
Jul 30, 2026
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.
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 packagecom.godaddy.ans.sdk.model. The build no longer generates code. This change removes theorg.openapi.generatorplugin 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, theopenApiGenerateconfig, the generated source set, and the checkstyle-disable block. Added JUnit and AssertJ test dependencies. - Added the model classes undercom.godaddy.ans.sdk.model(agent, catalog, identity, CSR, renewal, and event models).Testing
AI assistance
Assisted-by: Claude Code (claude-fable-5)
Checklist
git commit -s) certifying the DCO