Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 17d812c

Browse files
committed
Point the .roomodes schema identity at the actual JSON document
The generated schema currently advertises a GitHub blob page as its $id, which returns HTML rather than the schema document itself. This updates the source-of-truth generator and checked-in schema to use a JSON-serving raw URL, and adds a regression assertion for the canonical metadata value. Constraint: Must keep the checked-in schema aligned with the generator output Rejected: Leave the blob URL in place | Schema consumers dereferencing $id receive HTML Confidence: high Scope-risk: narrow Reversibility: clean Directive: If the schema is moved in the future, keep $id pointing at a JSON-serving canonical URL Tested: pnpm --dir packages/types exec vitest run src/__tests__/roomodes-schema.spec.ts src/__tests__/roomodes-schema-sync.spec.ts Not-tested: External IDE/schema consumer end-to-end dereference behavior
1 parent cb83656 commit 17d812c

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

packages/types/src/__tests__/roomodes-schema.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ describe("roomodes JSON schema", () => {
2828
expect(validate).toBeDefined()
2929
})
3030

31+
it("should advertise a JSON-serving canonical $id", () => {
32+
expect(schema["$id"]).toBe("https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/schemas/roomodes.json")
33+
})
34+
3135
it("should accept a minimal valid .roomodes config", () => {
3236
const config = {
3337
customModes: [

packages/types/src/roomodes-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function generateRoomodesJsonSchema(): Record<string, unknown> {
5050
target: "jsonSchema7",
5151
}) as Record<string, unknown>
5252

53-
jsonSchema["$id"] = "https://github.com/RooCodeInc/Roo-Code/blob/main/schemas/roomodes.json"
53+
jsonSchema["$id"] = "https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/schemas/roomodes.json"
5454
jsonSchema["title"] = "Roo Code Custom Modes"
5555
jsonSchema["description"] = "Schema for .roomodes configuration files used by Roo Code to define custom modes."
5656

schemas/roomodes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"required": ["customModes"],
9191
"additionalProperties": false,
9292
"$schema": "http://json-schema.org/draft-07/schema#",
93-
"$id": "https://github.com/RooCodeInc/Roo-Code/blob/main/schemas/roomodes.json",
93+
"$id": "https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/schemas/roomodes.json",
9494
"title": "Roo Code Custom Modes",
9595
"description": "Schema for .roomodes configuration files used by Roo Code to define custom modes."
9696
}

0 commit comments

Comments
 (0)