Skip to content

Commit

Permalink
fix(Review, Comment): Move comments to CreativeWork
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Nov 13, 2020
1 parent 0779830 commit b9bad70
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 24 deletions.
15 changes: 5 additions & 10 deletions schema/Comment.schema.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
title: Comment
'@id': schema:Comment
extends: CreativeWork
role: primary
role: secondary
status: stable
category: metadata
description: A comment on an item, e.g on a Article, or SoftwareSourceCode.
$comment: |
Use the `about` property to define the item that a comment is on.
The `content` property should be used for the structured content of the
Comment, in preference to the schema.org `text` property which is is expected to
have the plain text content.
comment, in preference to the schema.org `text` property (which is expected to
be plain text). Replies to a comment can be added to its `comments` property
or have their `parentItem` set to the parent comment.
properties:
parentItem:
'@id': schema:parentItem
description: The parent Comment of this Comment.
description: The parent comment of this comment.
$ref: Comment
replies:
'@id': stencila:replies
description: Comments made in reply to this comment. The inverse of parentItem.
type: array
items:
$ref: Comment
6 changes: 6 additions & 0 deletions schema/CreativeWork.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ properties:
anyOf:
- $ref: Person
- $ref: Organization
comments:
'@id': schema:comment
description: Comments about this creative work.
type: array
items:
$ref: Comment
content:
# We have added "content" because the existing schema.org property "text" implies
# only unstructured text content.
Expand Down
18 changes: 4 additions & 14 deletions schema/Review.schema.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
title: Review
'@id': schema:Review
extends: CreativeWork
role: primary
role: secondary
status: stable
category: metadata
description: A review of an item, e.g of an Article, or SoftwareSourceCode.
$comment: |
Use the `content` property for the structured content of the review in
preference to the schema.org `text` or `reviewBody` properties which
have plain text as the expected type of this property.
preference to the schema.org `text` or `reviewBody` properties (which
have plain text as the expected type).
properties:
itemReviewed:
'@id': schema:itemReviewed
Expand All @@ -17,14 +17,4 @@ properties:
reviewAspect:
'@id': schema:reviewAspect
description: The part or facet of the item that is being reviewed.
anyOf:
- type: integer
- type: string
comments:
'@id': stencila:comments
description: Comments, usually on specific parts of the item reviewed, that form part of the review.
$comment: |
This is a custom property which allows us to associate Comments with a review.
type: array
items:
$ref: Comment
type: string

0 comments on commit b9bad70

Please sign in to comment.