diff --git a/.cursor/skills/asset-registry-endpoints/SKILL.md b/.cursor/skills/asset-registry-endpoints/SKILL.md index 27e4f18..0c253d6 100644 --- a/.cursor/skills/asset-registry-endpoints/SKILL.md +++ b/.cursor/skills/asset-registry-endpoints/SKILL.md @@ -1,18 +1,17 @@ --- name: asset-registry-endpoints description: >- - Discover asset types, fetch schemas, examples, and methodology via - content-cli asset-registry commands. Also covers exporting/importing/creating - packages via config commands. Use when the user asks for a schema, wants to - validate an asset, needs methodology/best-practices, wants example - configurations for an asset type, or needs to export/import/list/create - packages. + Discover asset types, fetch schemas, and examples via content-cli + asset-registry commands. Also covers exporting/importing/creating packages + via config commands. Use when the user asks for a schema, wants to validate + an asset, wants example configurations for an asset type, or needs to + export/import/list/create packages. --- # Asset Registry Endpoint Caller Use `content-cli asset-registry` commands to discover asset types and fetch -schemas, examples, and methodology for any registered asset type. +schemas and examples for any registered asset type. ## Prerequisites @@ -216,7 +215,7 @@ info, and endpoint availability): $CLI asset-registry get --assetType -p ``` -## Step 2 — Fetch schema, examples, or methodology +## Step 2 — Fetch schema or examples Use these commands to get asset authoring resources directly. Each proxies through the platform to the owning asset service — no manual path construction @@ -245,15 +244,6 @@ examples — a 404 means the endpoint is not available. $CLI asset-registry examples --assetType -p ``` -### Methodology (GET) - -Returns best-practices and methodology guidance. Not all asset types provide -methodology — a 404 means the endpoint is not available. - -```bash -$CLI asset-registry methodology --assetType -p -``` - ### Validate Two top-level modes: @@ -300,8 +290,8 @@ or stop to fix it manually. ## Troubleshooting -**404 on examples / methodology** — Not all asset services have deployed these -endpoints. The schema endpoint is required for all registered types; the others +**404 on examples** — Not all asset services have deployed the examples +endpoint. The schema endpoint is required for all registered types; examples are optional. **500 on proxy endpoints** — The platform proxies requests to the owning asset @@ -348,7 +338,6 @@ $CLI config import -d --validate --overwrite -p | `asset-registry validate --assetType X --packageKey P --configuration '{}'` | Validate a raw configuration before import | | `asset-registry validate --assetType X -f request.json` | Validate using a full ValidateRequest file (multi-node, etc.) | | `asset-registry examples --assetType X` | Get example configurations (if available) | -| `asset-registry methodology --assetType X` | Get methodology / best-practices (if available) | | `config list` | List packages | | `config export --packageKeys X --unzip` | Export packages | | `config import -d --validate --overwrite` | Validate and import packages | diff --git a/docs/user-guide/agentic-development-guide.md b/docs/user-guide/agentic-development-guide.md index 6ba5b71..ad98c5f 100644 --- a/docs/user-guide/agentic-development-guide.md +++ b/docs/user-guide/agentic-development-guide.md @@ -36,11 +36,10 @@ content-cli asset-registry schema --assetType BOARD_V2 --json The schema describes the valid structure of the asset's `configuration` field. This is the only part of the asset governed by the schema — everything else is platform metadata. -You can also fetch examples and methodology when available: +You can also fetch examples when available: ```bash content-cli asset-registry examples --assetType BOARD_V2 --json -content-cli asset-registry methodology --assetType BOARD_V2 --json ``` ### 3. Export the target package @@ -106,7 +105,7 @@ content-cli config export --keysByVersion _ --unzip ## Troubleshooting -**404 on examples / methodology** — Not all asset services have deployed these endpoints. The schema endpoint is required for all registered types; the others are optional. +**404 on examples** — Not all asset services have deployed the examples endpoint. The schema endpoint is required for all registered types; examples are optional. **500 on proxy endpoints** — The platform proxies requests to the owning asset service. A 500 typically means the downstream service is unavailable or returned an unexpected response. diff --git a/docs/user-guide/asset-registry-commands.md b/docs/user-guide/asset-registry-commands.md index 8f3e56e..5b19fff 100644 --- a/docs/user-guide/asset-registry-commands.md +++ b/docs/user-guide/asset-registry-commands.md @@ -1,7 +1,7 @@ # Asset Registry Commands -The **asset-registry** command group allows you to discover registered asset types, fetch their schemas, examples, and methodology from the Asset Registry. -This is useful for understanding which asset types are available on the platform, their configuration structure, and best practices for authoring assets. +The **asset-registry** command group allows you to discover registered asset types, fetch their schemas, and examples from the Asset Registry. +This is useful for understanding which asset types are available on the platform, their configuration structure, and example configurations to author assets against. ## List Asset Types @@ -43,7 +43,6 @@ Base Path: /blueprint/api Endpoints: schema: /validation/schema/board_v2 validate: /validate - methodology: /methodology/board_v2 examples: /examples/board_v2 ``` @@ -147,16 +146,3 @@ Options: - `--assetType ` (required) – The asset type identifier - `--json` – Write the examples to a JSON file in the working directory - -## Get Methodology - -Fetch methodology and best-practices guidance for an asset type. Not all asset types provide methodology. - -``` -content-cli asset-registry methodology --assetType BOARD_V2 -``` - -Options: - -- `--assetType ` (required) – The asset type identifier -- `--json` – Write the methodology to a JSON file in the working directory diff --git a/src/commands/asset-registry/asset-registry-api.ts b/src/commands/asset-registry/asset-registry-api.ts index 3fb9fe7..856fe36 100644 --- a/src/commands/asset-registry/asset-registry-api.ts +++ b/src/commands/asset-registry/asset-registry-api.ts @@ -42,14 +42,6 @@ export class AssetRegistryApi { }); } - public async getMethodology(assetType: string): Promise { - return this.httpClient() - .get(`/pacman/api/core/asset-registry/methodologies/${encodeURIComponent(assetType)}`) - .catch((e) => { - throw new FatalError(`Problem getting methodology for asset type '${assetType}': ${e}`); - }); - } - public async validate(assetType: string, body: any): Promise { return this.httpClient() .post(`/pacman/api/core/asset-registry/validate/${encodeURIComponent(assetType)}`, body) diff --git a/src/commands/asset-registry/asset-registry.interfaces.ts b/src/commands/asset-registry/asset-registry.interfaces.ts index 23acc4b..3474b08 100644 --- a/src/commands/asset-registry/asset-registry.interfaces.ts +++ b/src/commands/asset-registry/asset-registry.interfaces.ts @@ -24,7 +24,6 @@ export interface AssetService { export interface AssetEndpoints { schema: string; validate: string; - methodology?: string; examples?: string; } diff --git a/src/commands/asset-registry/asset-registry.service.ts b/src/commands/asset-registry/asset-registry.service.ts index becc5ae..bc7a3e6 100644 --- a/src/commands/asset-registry/asset-registry.service.ts +++ b/src/commands/asset-registry/asset-registry.service.ts @@ -54,11 +54,6 @@ export class AssetRegistryService { this.outputResponse(data, jsonResponse); } - public async getMethodology(assetType: string, jsonResponse: boolean): Promise { - const data = await this.api.getMethodology(assetType); - this.outputResponse(data, jsonResponse); - } - public async validate(opts: ValidateOptions): Promise { const payload = this.buildValidatePayload(opts); const data = await this.api.validate(opts.assetType, payload); @@ -148,9 +143,6 @@ export class AssetRegistryService { logger.info(`Endpoints:`); logger.info(` schema: ${descriptor.endpoints.schema}`); logger.info(` validate: ${descriptor.endpoints.validate}`); - if (descriptor.endpoints.methodology) { - logger.info(` methodology: ${descriptor.endpoints.methodology}`); - } if (descriptor.endpoints.examples) { logger.info(` examples: ${descriptor.endpoints.examples}`); } diff --git a/src/commands/asset-registry/module.ts b/src/commands/asset-registry/module.ts index 9e2f5ec..2ebcd03 100644 --- a/src/commands/asset-registry/module.ts +++ b/src/commands/asset-registry/module.ts @@ -41,12 +41,6 @@ class Module extends IModule { .option("-f, --file ", "Path to a JSON file containing a full ValidateRequest body. Mutually exclusive with the build-from-options flags.") .option("--json", "Return the response as a JSON file") .action(this.validate); - - assetRegistryCommand.command("methodology") - .description("Get the methodology / best-practices guide for an asset type") - .requiredOption("--assetType ", "The asset type identifier (e.g., BOARD_V2)") - .option("--json", "Return the response as a JSON file") - .action(this.getMethodology); } private async listTypes(context: Context, command: Command, options: OptionValues): Promise { @@ -75,10 +69,6 @@ class Module extends IModule { private async getExamples(context: Context, command: Command, options: OptionValues): Promise { await new AssetRegistryService(context).getExamples(options.assetType, !!options.json); } - - private async getMethodology(context: Context, command: Command, options: OptionValues): Promise { - await new AssetRegistryService(context).getMethodology(options.assetType, !!options.json); - } } export = Module; diff --git a/tests/commands/asset-registry/asset-registry-get.spec.ts b/tests/commands/asset-registry/asset-registry-get.spec.ts index 9b758db..c1366b1 100644 --- a/tests/commands/asset-registry/asset-registry-get.spec.ts +++ b/tests/commands/asset-registry/asset-registry-get.spec.ts @@ -17,7 +17,6 @@ describe("Asset registry get", () => { endpoints: { schema: "/schema/board_v2", validate: "/validate/board_v2", - methodology: "/methodology/board_v2", examples: "/examples/board_v2", }, contributions: { pigEntityTypes: [], dataPipelineEntityTypes: [], actionTypes: [] }, @@ -67,7 +66,6 @@ describe("Asset registry get", () => { const messages = loggingTestTransport.logMessages.map((m) => m.message); expect(messages).toEqual( expect.arrayContaining([ - expect.stringContaining("/methodology/board_v2"), expect.stringContaining("/examples/board_v2"), ]) ); @@ -86,7 +84,6 @@ describe("Asset registry get", () => { await new AssetRegistryService(testContext).getType("BOARD_V2", false); const messages = loggingTestTransport.logMessages.map((m) => m.message).join("\n"); - expect(messages).not.toContain("methodology"); expect(messages).not.toContain("examples"); }); }); diff --git a/tests/commands/asset-registry/asset-registry-list.spec.ts b/tests/commands/asset-registry/asset-registry-list.spec.ts index a3ab652..4a84aa2 100644 --- a/tests/commands/asset-registry/asset-registry-list.spec.ts +++ b/tests/commands/asset-registry/asset-registry-list.spec.ts @@ -19,7 +19,6 @@ describe("Asset registry list", () => { endpoints: { schema: "/schema/board_v2", validate: "/validate/board_v2", - methodology: "/methodology/board_v2", examples: "/examples/board_v2", }, contributions: { pigEntityTypes: [], dataPipelineEntityTypes: [], actionTypes: [] }, @@ -34,7 +33,6 @@ describe("Asset registry list", () => { endpoints: { schema: "/schema", validate: "/validate", - methodology: "/methodology", examples: "/examples", }, contributions: { pigEntityTypes: [], dataPipelineEntityTypes: [], actionTypes: [] }, diff --git a/tests/commands/asset-registry/asset-registry-methodology.spec.ts b/tests/commands/asset-registry/asset-registry-methodology.spec.ts deleted file mode 100644 index 0effbb9..0000000 --- a/tests/commands/asset-registry/asset-registry-methodology.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { mockAxiosGet } from "../../utls/http-requests-mock"; -import { AssetRegistryService } from "../../../src/commands/asset-registry/asset-registry.service"; -import { testContext } from "../../utls/test-context"; -import { loggingTestTransport, mockWriteFileSync } from "../../jest.setup"; -import { FileService } from "../../../src/core/utils/file-service"; -import * as path from "path"; - -describe("Asset registry methodology", () => { - const methodologyResponse = { - title: "View Best Practices", - sections: [ - { heading: "Layout", content: "Use a responsive grid layout." }, - { heading: "KPIs", content: "Place KPIs at the top." }, - ], - }; - - it("Should get methodology and print it", async () => { - mockAxiosGet("https://myTeam.celonis.cloud/pacman/api/core/asset-registry/methodologies/BOARD_V2", methodologyResponse); - - await new AssetRegistryService(testContext).getMethodology("BOARD_V2", false); - - expect(loggingTestTransport.logMessages.length).toBe(1); - const output = loggingTestTransport.logMessages[0].message; - expect(output).toContain("View Best Practices"); - expect(output).toContain("Layout"); - }); - - it("Should get methodology and save as JSON file", async () => { - mockAxiosGet("https://myTeam.celonis.cloud/pacman/api/core/asset-registry/methodologies/BOARD_V2", methodologyResponse); - - await new AssetRegistryService(testContext).getMethodology("BOARD_V2", true); - - const expectedFileName = loggingTestTransport.logMessages[0].message.split(FileService.fileDownloadedMessage)[1]; - expect(mockWriteFileSync).toHaveBeenCalledWith( - path.resolve(process.cwd(), expectedFileName), - expect.any(String), - { encoding: "utf-8", mode: 0o600 } - ); - - const written = JSON.parse(mockWriteFileSync.mock.calls[0][1]); - expect(written.title).toBe("View Best Practices"); - expect(written.sections.length).toBe(2); - }); -}); diff --git a/tests/commands/asset-registry/asset-registry-module.spec.ts b/tests/commands/asset-registry/asset-registry-module.spec.ts index 9ebd9ea..d9cb378 100644 --- a/tests/commands/asset-registry/asset-registry-module.spec.ts +++ b/tests/commands/asset-registry/asset-registry-module.spec.ts @@ -21,7 +21,6 @@ describe("Asset Registry Module", () => { getSchema: jest.fn().mockResolvedValue(undefined), validate: jest.fn().mockResolvedValue(undefined), getExamples: jest.fn().mockResolvedValue(undefined), - getMethodology: jest.fn().mockResolvedValue(undefined), } as any; (AssetRegistryService as jest.MockedClass) @@ -93,12 +92,6 @@ describe("Asset Registry Module", () => { expect(mockService.getExamples).toHaveBeenCalledWith("BOARD_V2", false); }); - it("should call getMethodology with correct parameters", async () => { - const options: OptionValues = { assetType: "SEMANTIC_MODEL" }; - await (module as any).getMethodology(testContext, mockCommand, options); - expect(mockService.getMethodology).toHaveBeenCalledWith("SEMANTIC_MODEL", false); - }); - it("should call listTypes", async () => { const options: OptionValues = { json: true }; await (module as any).listTypes(testContext, mockCommand, options);