diff --git a/.ai/plans/apimatic-config.md b/.ai/plans/apimatic-config.md index 7b98c9772..78a55a86c 100644 --- a/.ai/plans/apimatic-config.md +++ b/.ai/plans/apimatic-config.md @@ -151,6 +151,8 @@ Rejected: bundled SDK. `codegenVersion` stays, inside `publishing`, because the mismatch check in `PluginConfig.assertNoCodegenVersionMismatch` depends on it. + *(Superseded: the service decides the generator, so the field and its check + both left in the v3 retirement. An older file keeps it; nothing reads it.)* `packageConfiguration` and `source.repositoryType` from the design sketch are not modelled in this release. A hand-written file carrying `packageConfiguration` keeps it, because unknown fields in these blocks are preserved. A hand-written diff --git a/.ai/plans/portal-config.md b/.ai/plans/portal-config.md index fba85d396..7b3ef0081 100644 --- a/.ai/plans/portal-config.md +++ b/.ai/plans/portal-config.md @@ -550,8 +550,9 @@ Following `.ai/instructions.md` and the skills in `.ai/skills/`. `"typescript": {}` section 12 recommends validates. Inside `publishing`, `source`, `package` (per language, as `plugin-config.ts` types them) and `codegenVersion` (`v3`, `v4`) are typed and none is required, matching the - plugin path's leniency: `assertNoCodegenVersionMismatch` already reads a - missing `codegenVersion` as no mismatch. `languages` is optional in the schema: the "at least one" + plugin path's leniency: the mismatch check then read a missing + `codegenVersion` as no mismatch. *(Superseded: `codegenVersion` and its + check have both since left; the field is no longer typed in the schema.)* `languages` is optional in the schema: the "at least one" rule is the portal command's, and a file `sdk publish` alone created is valid. The `$schema` URL is `https://cdn.jsdelivr.net/npm/@apimatic/cli@2/apimatic.schema.json`. @@ -745,8 +746,8 @@ verified to build 22 pages with this branch's CLI. entry (`"typescript": {}`) is enough, since the portal checks only the key. Today a `{}` entry is inert for the plugin commands: `hasPublishedSdks` needs `publishing.source` or `publishing.package`, so `plugin generate` still - reports no published SDKs, and `assertNoCodegenVersionMismatch` skips an - entry with no `publishing` record. + reports no published SDKs. *(The mismatch check that also skipped such an + entry has since been removed with `codegenVersion`.)* - **The hand-written entry is not inert for long.** Since #350 an entry with no `publishing` block means "this language is wanted, nothing is published yet", which is the state the coming bundling change turns into an SDK diff --git a/.ai/skills/action.md b/.ai/skills/action.md index 81bb9774b..b6f04793e 100644 --- a/.ai/skills/action.md +++ b/.ai/skills/action.md @@ -93,7 +93,7 @@ Use when creating a new Action class. Choose the variant that matches the action ### What to determine 1. **Topic** — action group folder (e.g., `api`, `sdk`, `portal`). Can be nested: `sdk/publish`, `publishing/profile` -2. **Action name** — file name, lowercase hyphenated (e.g., `validate`, `generate`, `save-changes`) +2. **Action name** — file name, lowercase hyphenated (e.g., `validate`, `generate`, `record-sdk`) 3. **Class name** — PascalCase with `Action` suffix (e.g., `ValidateAction`, `PortalNewTocAction`) 4. **Variant** — one of: - `standard` — full constructor with configDir, commandMetadata, authKey; services, withDirPath, prompts diff --git a/.ai/skills/event.md b/.ai/skills/event.md index 556467236..587d23f8f 100644 --- a/.ai/skills/event.md +++ b/.ai/skills/event.md @@ -7,7 +7,7 @@ Domain events live at `src/types/events/` and represent something that **already ### Naming - **Class name must be past tense** — the event describes something that occurred: `QuickstartCompleted`, `SdkChangesSaved`, `SdkConflictsResolved`. Never present tense (`SdkSaveChanges`) or imperative (`SaveChanges`). -- **File name** — lowercase hyphenated, matching the class name: `quickstart-completed.ts`, `sdk-changes-saved.ts`. +- **File name** — lowercase hyphenated, matching the class name: `quickstart-completed.ts`, `sdk-publish-validation-failed.ts`. - **Class name suffix** — always `Event`: `QuickstartCompletedEvent`, `SdkChangesSavedEvent`. ### Structure @@ -102,9 +102,7 @@ export class {PascalName}Event extends DomainEvent { |---|---| | Self-contained success event (no payload) | `src/types/events/quickstart-completed.ts` | | Self-contained initiation event (no payload) | `src/types/events/quickstart-initiated.ts` | -| Success event with payload (`language`) | `src/types/events/sdk-changes-saved.ts` | -| Success event with payload (`language`) | `src/types/events/sdk-conflicts-resolved.ts` | | Failure event (dynamic message + flags) | `src/types/events/sdk-publish-validation-failed.ts` | | DomainEvent base class | `src/types/events/domain-event.ts` | | Firing from Command (success + failure) | `src/commands/quickstart.ts` | -| Firing from Command (failure only) | `src/commands/sdk/save-changes.ts` | +| Firing from Command (failure only) | `src/commands/sdk/publish.ts` | diff --git a/.ai/skills/prompt.md b/.ai/skills/prompt.md index b3aad2f76..214c7b754 100644 --- a/.ai/skills/prompt.md +++ b/.ai/skills/prompt.md @@ -81,7 +81,7 @@ Use when creating a new Prompts class. Choose the variant that matches the comma ### What to determine 1. **Topic** — folder path matching the action (e.g., `auth`, `api`, `sdk`, `portal`, `sdk/publish`) -2. **Name** — file name, lowercase hyphenated (e.g., `login`, `generate`, `save-changes`) +2. **Name** — file name, lowercase hyphenated (e.g., `login`, `generate`, `record-sdk`) 3. **Class name** — PascalCase with `Prompts` suffix (e.g., `LoginPrompts`, `SdkGeneratePrompts`) 4. **Variant** — one of: - `simple` — log methods and optional spinner; no interactive prompts diff --git a/README.md b/README.md index c60da9843..ef85e4b9e 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,6 @@ USAGE * [`apimatic quickstart`](#apimatic-quickstart) * [`apimatic sdk generate`](#apimatic-sdk-generate) * [`apimatic sdk publish`](#apimatic-sdk-publish) -* [`apimatic sdk save-changes`](#apimatic-sdk-save-changes) ## `apimatic api transform` @@ -426,9 +425,8 @@ 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] [--codegen-version v3|v4] [--stability stable|beta] [-i ] - [-f] [-k ] + $ apimatic sdk generate -l csharp|java|php|python|ruby|typescript|go [-d ] [--api-version ] + [--zip] [--codegen-version v4] [--stability stable|beta] [-i ] [-f] [-k ] FLAGS -d, --destination= [default: /sdk/ | /sdk//] path where @@ -440,22 +438,20 @@ FLAGS -l, --language=