Skip to content

feat(plugin): add apiClassPrefix / apiClassSuffix options#85

Open
halotukozak wants to merge 1 commit into
feat/42-generate-kdocfrom
feat/43-api-class-prefix-suffix
Open

feat(plugin): add apiClassPrefix / apiClassSuffix options#85
halotukozak wants to merge 1 commit into
feat/42-generate-kdocfrom
feat/43-api-class-prefix-suffix

Conversation

@halotukozak

Copy link
Copy Markdown
Member

Stacked on #84 (feat/42-generate-kdoc). Base is feat/42-generate-kdoc, not master, so this diff shows only the #43 changes. Merge after #84.

What

Adds apiClassPrefix (default "") and apiClassSuffix (default "Api") to JustworksSpecConfiguration. Generated client class names become <prefix><Tag><suffix> — e.g. tag pets with prefix My, suffix ClientMyPetsClient. Previously "Api" was hardcoded in ClientGenerator.

Refactor

CodeGenerator.generate now takes a single OutputOptions argument (made public) instead of loose generateKdoc/prefix/suffix flags. The plugin task builds OutputOptions from its inputs. Keeps the core entrypoint stable as more options are added.

Tests

  • Core ClientGeneratorTest: default Api, custom suffix, custom prefix, both combined.
  • Plugin functional: apiClassPrefix = "My" + apiClassSuffix = "Client" produces MyPetsClient.kt with class MyPetsClient.

Docs

README config table rows + a customization example.

Closes #43

🤖 Generated with Claude Code

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>
@halotukozak halotukozak added this to the 1.0.0 milestone Jun 9, 2026
@halotukozak halotukozak self-assigned this Jun 9, 2026
@halotukozak halotukozak added the enhancement New feature or request label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant