feat(plugin): add apiClassPrefix / apiClassSuffix options#85
Open
halotukozak wants to merge 1 commit into
Open
feat(plugin): add apiClassPrefix / apiClassSuffix options#85halotukozak wants to merge 1 commit into
halotukozak wants to merge 1 commit into
Conversation
Adds apiClassPrefix (default "") and apiClassSuffix (default "Api") to JustworksSpecConfiguration so generated client class names can be customized (e.g. tag `pets` -> MyPetsClient). CodeGenerator.generate now takes a single OutputOptions argument (made public) instead of loose flags; the plugin builds it from task inputs. The previously hardcoded "Api" suffix in ClientGenerator is replaced by options.apiClassPrefix/apiClassSuffix. Closes #43 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Adds
apiClassPrefix(default"") andapiClassSuffix(default"Api") toJustworksSpecConfiguration. Generated client class names become<prefix><Tag><suffix>— e.g. tagpetswith prefixMy, suffixClient→MyPetsClient. Previously"Api"was hardcoded inClientGenerator.Refactor
CodeGenerator.generatenow takes a singleOutputOptionsargument (madepublic) instead of loosegenerateKdoc/prefix/suffix flags. The plugin task buildsOutputOptionsfrom its inputs. Keeps the core entrypoint stable as more options are added.Tests
ClientGeneratorTest: defaultApi, custom suffix, custom prefix, both combined.apiClassPrefix = "My"+apiClassSuffix = "Client"producesMyPetsClient.ktwithclass MyPetsClient.Docs
README config table rows + a customization example.
Closes #43
🤖 Generated with Claude Code