-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cat-voices): f14-Comments Schema for Catalyst Proposals (#1731)
* feat: added comments template * fix: missing brace * fix: comment restructued, removed in comment meta --------- Co-authored-by: Oleksandr Prokhorenko <[email protected]> Co-authored-by: Steven Johnson <[email protected]>
- Loading branch information
1 parent
c4ab078
commit d10ea59
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
docs/src/architecture/08_concepts/document_templates/F14-Comments/example.comment.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"metadata": { | ||
"id": "550e8400-e29b-41d4-a716-446655440000", | ||
"proposal_id": "67e55044-10b1-426f-9247-bb680e5fe0c8", | ||
"parent_id": "123e4567-e89b-12d3-a456-426614174000" | ||
}, | ||
"comment": { | ||
"content": "This is an example comment on a proposal.\nIt can contain multiple lines of plain text content.\nThe content must be between 1 and 5000 characters in length." | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...concepts/document_templates/F14-Comments/f47ac10b-58cc-4372-a567-0e02b2c3d479.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://cardano.org/schemas/catalyst/comments", | ||
"title": "Proposal Comments Schema", | ||
"description": "Schema for comments on Catalyst proposals", | ||
"definitions": { | ||
"multiLineTextEntry": { | ||
"$comment": "UI - Multiline text entry without any markup or rich text capability.", | ||
"type": "string", | ||
"pattern": "^[\\S\\s]+$", | ||
"x-note": "Enter multiple lines of plain text. You can use line breaks but no special formatting." | ||
} | ||
}, | ||
"type": "object", | ||
"required": ["comment"], | ||
"properties": { | ||
"comment": { | ||
"type": "object", | ||
"required": ["content"], | ||
"description": "The comments on the proposal", | ||
"properties": { | ||
"content": { | ||
"$ref": "#/definitions/multiLineTextEntry", | ||
"description": "The comment text content", | ||
"minLength": 1, | ||
"maxLength": 5000 | ||
} | ||
} | ||
|
||
} | ||
} | ||
} |