Repository navigation
feat(core): add-client generator - #98
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
michaelbe812
force-pushed
the
feat/add-client-generator
branch
from
October 5, 2026 13:10
6348b87 to
6d93381
Compare
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.
Stacked on #97 — merge after (rebase).
Part of #84
Relates to #5
What
add-clientgenerator in core. Options:name,directory,scope?,spec(local path or URL),adapter(openapi-tools|hey-api),generatorOptions?,split(defaulttrue),importPrefix?(default: npm scope of rootpackage.json),addToGitignore,skipFormat.--adapterinstead of--generator, becausenx greserves--generator. The definition field staysgenerator.<directory>/<name>.openapi.json|yaml, written verbatim after formatting and added to.prettierignoresoupdate-spec --checkdoesn't report false drift. The URL is stored forupdate-spec.openapi-client.json, registers@nx-plugin-openapi/core/plugininnx.jsonif missing, and adds tsconfigpathsfor the split aliases (fails on a conflicting alias). It also writes aREADME.mdper split lib (a project without tracked files breaks Nx task hashing) and gitignores the generated dirs. Noproject.json.init: no longer hard-wires{projectRoot}/swagger.json/openapitools.jsoninputs. It only addscache: trueand keeps existing user config.update-spec:fetchSpecis exported for reuse. The ignore-entry utils no longer add blank lines.getting-started/quick-start.Verification
nx run-many -t lint test build -p corepasses (14 add-client + 2 init tests withcreateTreeWithEmptyWorkspace).nx g @nx-plugin-openapi/core:add-client petstore --directory=scratch/petstore --scope=shared --spec=https://petstore3.swagger.io/api/v3/openapi.json --adapter=hey-api. Thenupdate-spec --checkis up to date,nx show projectslists the 4 projects, andnx build petstore-apiruns generate + split. Restoring the deletedsrcfrom cache works, and a consumer importing@demo/petstore-api/@demo/petstore-typestypechecks.🤖 Generated with Claude Code