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
4 changes: 4 additions & 0 deletions packages/types/src/__tests__/roomodes-schema.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ describe("roomodes JSON schema", () => {
expect(validate).toBeDefined()
})

it("should advertise a JSON-serving canonical $id", () => {
expect(schema["$id"]).toBe("https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/schemas/roomodes.json")
})

it("should accept a minimal valid .roomodes config", () => {
const config = {
customModes: [
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/roomodes-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function generateRoomodesJsonSchema(): Record<string, unknown> {
target: "jsonSchema7",
}) as Record<string, unknown>

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

Expand Down
2 changes: 1 addition & 1 deletion schemas/roomodes.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"required": ["customModes"],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/RooCodeInc/Roo-Code/blob/main/schemas/roomodes.json",
"$id": "https://raw.githubusercontent.com/RooCodeInc/Roo-Code/main/schemas/roomodes.json",
"title": "Roo Code Custom Modes",
"description": "Schema for .roomodes configuration files used by Roo Code to define custom modes."
}
Loading