From 65593c7b6e856444509beafbf2ab6084172d95f7 Mon Sep 17 00:00:00 2001 From: Ali Asghar <75574550+aliasghar98@users.noreply.github.com> Date: Fri, 15 May 2026 14:52:44 +0500 Subject: [PATCH] feat: add support for generation of v4 sdks (#281) What was added? - Added new flags codegen-version and stability to apimatic sdk generate command to allow for specifying the version and stability of the Code Generator when generating SDKs. - Added the capability to generate new V4 C# SDK. --- .npmrc | 1 + README.md | 33 +- package.json | 2 +- pnpm-lock.yaml | 769 ++++++++++-------- pnpm-workspace.yaml | 4 + src/actions/sdk/generate.ts | 78 +- src/actions/sdk/publish.ts | 4 +- src/actions/sdk/quickstart.ts | 12 +- src/commands/sdk/generate.ts | 27 +- src/infrastructure/services/api-service.ts | 37 +- src/infrastructure/services/portal-service.ts | 92 ++- src/prompts/sdk/generate.ts | 8 + src/types/sdk/generate.ts | 10 + 13 files changed, 708 insertions(+), 369 deletions(-) diff --git a/.npmrc b/.npmrc index 6b1c02e7..48804a98 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ +registry=https://registry.npmjs.org/ @apimatic:registry=https://registry.npmjs.org/ diff --git a/README.md b/README.md index da5d0270..5de87b28 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ $ npm install -g @apimatic/cli $ apimatic COMMAND running command... $ apimatic (--version) -@apimatic/cli/1.1.0-beta.11 win32-x64 node-v23.4.0 +@apimatic/cli/1.1.0-beta.16 win32-x64 node-v23.4.0 $ apimatic --help [COMMAND] USAGE $ apimatic COMMAND @@ -434,21 +434,26 @@ Generate an SDK for your API ``` USAGE $ apimatic sdk generate -l csharp|java|php|python|ruby|typescript|go [-d ] [--skip-changes] - [--api-version ] [--zip] [--track-changes] [-i ] [-f] [-k ] + [--api-version ] [--zip] [--track-changes] [--codegen-version v3|v4] [--stability stable|beta] [-i ] + [-f] [-k ] FLAGS - -d, --destination= [default: /sdk/ | /sdk//] path where the SDK - will be generated - -f, --force overwrite changes without asking for user consent. - -i, --input= [default: ./] path to the parent directory containing the 'src' directory, which includes - API specifications and configuration files. - -k, --auth-key= override current authentication state with an authentication key. - -l, --language=