Skip to content

Commit

Permalink
Contributors Proposal Implementation (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmtylerdavis authored Jan 29, 2021
1 parent 2d13830 commit 8b68004
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/main/resources/schema/ans/0.10.7/content.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@

"content_aliases": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_content_aliases.json"
},

"contributors": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_contributors.json"
}

},
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/schema/ans/0.10.7/gallery.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@

"websites": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_websites.json"
},

"contributors": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_contributors.json"
}

},
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/schema/ans/0.10.7/image.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@
"licensable": {
"description": "True if the image can legally be licensed to others.",
"type": "boolean"
},
"contributors": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_contributors.json"
}
},
"required": [ "type", "version" ]
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/schema/ans/0.10.7/story.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@

"websites": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_websites.json"
},

"contributors": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_contributors.json"
}

},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_contributors.json",
"title": "Contributors",
"description": "Trait that holds information on who created and contributed to a given document in Arc.",
"type": "object",
"additionalProperties": false,
"properties": {
"created_by": {
"description": "The Creator of the Document.",
"type":"object",
"properties": {
"user_id": {
"type": "string",
"description": "The unique ID of the Arc user who created the Document"
},
"display_name": {
"type": "string",
"description": "The display name of the Arc user who created the Document"
}
}
}
}
}
3 changes: 3 additions & 0 deletions src/main/resources/schema/ans/0.10.7/video.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@
},
"websites": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_websites.json"
},
"contributors": {
"$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.7/traits/trait_contributors.json"
}

},
Expand Down
9 changes: 6 additions & 3 deletions tests/fixtures/schema/0.10.6/story-fixture-good.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@
"content_elements": [
{
"type": "image",
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg"
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg",
"version": "0.10.6"
},
{
"type": "text",
Expand Down Expand Up @@ -422,12 +423,14 @@
{
"type": "image",
"url": "http://foo.com/foo.jpg",
"caption": "Foo"
"caption": "Foo",
"version": "0.10.6"
},
{
"type": "image",
"url": "http://bar.com/bar.jpg",
"caption": "Bar"
"caption": "Bar",
"version": "0.10.6"
}
]
},
Expand Down
6 changes: 6 additions & 0 deletions tests/fixtures/schema/0.10.7/image-fixture-good.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
}
]
},
"contributors": {
"created_by" : {
"user_id": "[email protected]",
"display_name": "Tyler Davis"
}
},
"location": "Washington, D.C.",
"geo": {
"latitude": 38.9047,
Expand Down
15 changes: 12 additions & 3 deletions tests/fixtures/schema/0.10.7/story-fixture-good.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
}
]
},
"contributors": {
"created_by" : {
"user_id": "[email protected]",
"display_name": "Tyler Davis"
}
},
"language": "en",
"location": "Washington, D.C.",
"geo": {
Expand Down Expand Up @@ -331,7 +337,8 @@
"content_elements": [
{
"type": "image",
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg"
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg",
"version": "0.10.7"
},
{
"type": "text",
Expand Down Expand Up @@ -422,12 +429,14 @@
{
"type": "image",
"url": "http://foo.com/foo.jpg",
"caption": "Foo"
"caption": "Foo",
"version": "0.10.7"
},
{
"type": "image",
"url": "http://bar.com/bar.jpg",
"caption": "Bar"
"caption": "Bar",
"version": "0.10.7"
}
]
},
Expand Down

0 comments on commit 8b68004

Please sign in to comment.