Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 9 additions & 20 deletions .cursor/skills/asset-registry-endpoints/SKILL.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -216,7 +215,7 @@ info, and endpoint availability):
$CLI asset-registry get --assetType <ASSET_TYPE> -p <profile>
```

## 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
Expand Down Expand Up @@ -245,15 +244,6 @@ examples — a 404 means the endpoint is not available.
$CLI asset-registry examples --assetType <ASSET_TYPE> -p <profile>
```

### 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 <ASSET_TYPE> -p <profile>
```

### Validate

Two top-level modes:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -348,7 +338,6 @@ $CLI config import -d <export_dir> --validate --overwrite -p <profile>
| `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 <dir> --validate --overwrite` | Validate and import packages |
5 changes: 2 additions & 3 deletions docs/user-guide/agentic-development-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -106,7 +105,7 @@ content-cli config export --keysByVersion <packageKey>_<version> --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.

Expand Down
18 changes: 2 additions & 16 deletions docs/user-guide/asset-registry-commands.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -43,7 +43,6 @@ Base Path: /blueprint/api
Endpoints:
schema: /validation/schema/board_v2
validate: /validate
methodology: /methodology/board_v2
examples: /examples/board_v2
```

Expand Down Expand Up @@ -147,16 +146,3 @@ Options:

- `--assetType <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 <assetType>` (required) – The asset type identifier
- `--json` – Write the methodology to a JSON file in the working directory
8 changes: 0 additions & 8 deletions src/commands/asset-registry/asset-registry-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ export class AssetRegistryApi {
});
}

public async getMethodology(assetType: string): Promise<any> {
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<any> {
return this.httpClient()
.post(`/pacman/api/core/asset-registry/validate/${encodeURIComponent(assetType)}`, body)
Expand Down
1 change: 0 additions & 1 deletion src/commands/asset-registry/asset-registry.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export interface AssetService {
export interface AssetEndpoints {
schema: string;
validate: string;
methodology?: string;
examples?: string;
}

Expand Down
8 changes: 0 additions & 8 deletions src/commands/asset-registry/asset-registry.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ export class AssetRegistryService {
this.outputResponse(data, jsonResponse);
}

public async getMethodology(assetType: string, jsonResponse: boolean): Promise<void> {
const data = await this.api.getMethodology(assetType);
this.outputResponse(data, jsonResponse);
}

public async validate(opts: ValidateOptions): Promise<void> {
const payload = this.buildValidatePayload(opts);
const data = await this.api.validate(opts.assetType, payload);
Expand Down Expand Up @@ -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}`);
}
Expand Down
10 changes: 0 additions & 10 deletions src/commands/asset-registry/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ class Module extends IModule {
.option("-f, --file <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 <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<void> {
Expand Down Expand Up @@ -75,10 +69,6 @@ class Module extends IModule {
private async getExamples(context: Context, command: Command, options: OptionValues): Promise<void> {
await new AssetRegistryService(context).getExamples(options.assetType, !!options.json);
}

private async getMethodology(context: Context, command: Command, options: OptionValues): Promise<void> {
await new AssetRegistryService(context).getMethodology(options.assetType, !!options.json);
}
}

export = Module;
3 changes: 0 additions & 3 deletions tests/commands/asset-registry/asset-registry-get.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [] },
Expand Down Expand Up @@ -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"),
])
);
Expand All @@ -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");
});
});
2 changes: 0 additions & 2 deletions tests/commands/asset-registry/asset-registry-list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [] },
Expand All @@ -34,7 +33,6 @@ describe("Asset registry list", () => {
endpoints: {
schema: "/schema",
validate: "/validate",
methodology: "/methodology",
examples: "/examples",
},
contributions: { pigEntityTypes: [], dataPipelineEntityTypes: [], actionTypes: [] },
Expand Down

This file was deleted.

7 changes: 0 additions & 7 deletions tests/commands/asset-registry/asset-registry-module.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof AssetRegistryService>)
Expand Down Expand Up @@ -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);
Expand Down
Loading