From 3f0993ff16eac3971c6490ad5cba927169c0b8fe Mon Sep 17 00:00:00 2001 From: Chris Selvaraj Date: Wed, 3 Apr 2024 14:09:16 -0400 Subject: [PATCH] Add 0.10.11 dev version PPA-789: ANS schema deploy https://arcpublishing.atlassian.net/browse/PPA-789 --- README.md | 4 +- lib/upvert/0.10.10.js | 20 + lib/versions.json | 6 + .../resources/schema/ans/0.10.11/audio.json | 184 ++++++ .../schema/ans/0.10.11/author_operation.json | 50 ++ .../schema/ans/0.10.11/clavis_operation.json | 82 +++ .../schema/ans/0.10.11/collection.json | 182 ++++++ .../resources/schema/ans/0.10.11/content.json | 147 +++++ .../schema/ans/0.10.11/content_operation.json | 88 +++ .../resources/schema/ans/0.10.11/gallery.json | 168 ++++++ .../schema/ans/0.10.11/gallery_operation.json | 62 ++ .../resources/schema/ans/0.10.11/image.json | 183 ++++++ .../schema/ans/0.10.11/image_operation.json | 65 ++ .../ans/0.10.11/planning_note_operation.json | 42 ++ .../ans/0.10.11/platform_pitch_operation.json | 42 ++ .../0.10.11/publication_pitch_operation.json | 42 ++ .../schema/ans/0.10.11/redirect.json | 33 ++ .../ans/0.10.11/restricted_content.json | 39 ++ .../resources/schema/ans/0.10.11/results.json | 136 +++++ .../schema/ans/0.10.11/site_operation.json | 50 ++ .../resources/schema/ans/0.10.11/story.json | 181 ++++++ .../0.10.11/story_elements/blockquote.json | 36 ++ .../ans/0.10.11/story_elements/code.json | 38 ++ .../0.10.11/story_elements/content_zone.json | 34 ++ .../0.10.11/story_elements/correction.json | 42 ++ .../0.10.11/story_elements/custom_embed.json | 79 +++ .../ans/0.10.11/story_elements/divider.json | 30 + .../0.10.11/story_elements/element_group.json | 33 ++ .../0.10.11/story_elements/endorsement.json | 34 ++ .../ans/0.10.11/story_elements/header.json | 39 ++ .../story_elements/interstitial_link.json | 74 +++ .../ans/0.10.11/story_elements/link_list.json | 54 ++ .../ans/0.10.11/story_elements/list.json | 42 ++ .../0.10.11/story_elements/list_element.json | 16 + .../story_elements/numeric_rating.json | 46 ++ .../ans/0.10.11/story_elements/quote.json | 35 ++ .../ans/0.10.11/story_elements/raw_html.json | 34 ++ .../ans/0.10.11/story_elements/table.json | 45 ++ .../ans/0.10.11/story_elements/text.json | 37 ++ .../schema/ans/0.10.11/story_operation.json | 75 +++ .../traits/trait_additional_properties.json | 8 + .../ans/0.10.11/traits/trait_address.json | 38 ++ .../ans/0.10.11/traits/trait_alignment.json | 8 + .../ans/0.10.11/traits/trait_alt_text.json | 7 + .../ans/0.10.11/traits/trait_app_name.json | 7 + .../schema/ans/0.10.11/traits/trait_auth.json | 11 + .../traits/trait_block_properties.json | 15 + .../0.10.11/traits/trait_canonical_url.json | 7 + .../traits/trait_canonical_website.json | 7 + .../ans/0.10.11/traits/trait_channel.json | 10 + .../ans/0.10.11/traits/trait_comments.json | 31 + .../0.10.11/traits/trait_content_aliases.json | 11 + .../traits/trait_content_elements.json | 10 + .../traits/trait_content_restrictions.json | 60 ++ .../0.10.11/traits/trait_contributors.json | 24 + .../ans/0.10.11/traits/trait_copyright.json | 7 + .../ans/0.10.11/traits/trait_corrections.json | 11 + .../0.10.11/traits/trait_created_date.json | 8 + .../ans/0.10.11/traits/trait_credits.json | 59 ++ .../schema/ans/0.10.11/traits/trait_date.json | 19 + .../ans/0.10.11/traits/trait_description.json | 8 + .../0.10.11/traits/trait_display_date.json | 8 + .../ans/0.10.11/traits/trait_distributor.json | 53 ++ .../0.10.11/traits/trait_dynamic_items.json | 23 + .../ans/0.10.11/traits/trait_editable.json | 7 + .../ans/0.10.11/traits/trait_editor_note.json | 7 + .../traits/trait_first_publish_date.json | 8 + .../ans/0.10.11/traits/trait_focal_point.json | 18 + .../traits/trait_gallery_properties.json | 12 + .../schema/ans/0.10.11/traits/trait_geo.json | 11 + .../ans/0.10.11/traits/trait_headlines.json | 8 + .../schema/ans/0.10.11/traits/trait_id.json | 7 + .../ans/0.10.11/traits/trait_image_type.json | 12 + .../ans/0.10.11/traits/trait_label.json | 58 ++ .../traits/trait_last_updated_date.json | 8 + .../ans/0.10.11/traits/trait_locale.json | 7 + .../ans/0.10.11/traits/trait_location.json | 7 + .../ans/0.10.11/traits/trait_owner.json | 21 + .../ans/0.10.11/traits/trait_pitches.json | 27 + .../ans/0.10.11/traits/trait_planning.json | 108 ++++ .../0.10.11/traits/trait_platform_pitch.json | 23 + .../traits/trait_platform_pitch_event.json | 31 + .../ans/0.10.11/traits/trait_priority.json | 8 + .../ans/0.10.11/traits/trait_promo_items.json | 43 ++ .../traits/trait_publication_pitch.json | 23 + .../traits/trait_publication_pitch_event.json | 40 ++ .../0.10.11/traits/trait_publish_date.json | 8 + .../ans/0.10.11/traits/trait_publishing.json | 162 +++++ .../0.10.11/traits/trait_related_content.json | 36 ++ .../traits/trait_rendering_guides.json | 25 + .../ans/0.10.11/traits/trait_revision.json | 40 ++ .../0.10.11/traits/trait_seo_filename.json | 7 + .../ans/0.10.11/traits/trait_short_url.json | 7 + .../schema/ans/0.10.11/traits/trait_slug.json | 7 + .../ans/0.10.11/traits/trait_social.json | 19 + .../ans/0.10.11/traits/trait_source.json | 34 ++ .../ans/0.10.11/traits/trait_status.json | 7 + .../0.10.11/traits/trait_subheadlines.json | 8 + .../ans/0.10.11/traits/trait_subtype.json | 7 + .../ans/0.10.11/traits/trait_syndication.json | 23 + .../ans/0.10.11/traits/trait_taxonomy.json | 223 +++++++ .../ans/0.10.11/traits/trait_tracking.json | 8 + .../0.10.11/traits/trait_vanity_credits.json | 59 ++ .../ans/0.10.11/traits/trait_variations.json | 28 + .../ans/0.10.11/traits/trait_version.json | 8 + .../traits/trait_voice_transcripts.json | 68 +++ .../ans/0.10.11/traits/trait_website.json | 7 + .../ans/0.10.11/traits/trait_website_url.json | 7 + .../ans/0.10.11/traits/trait_websites.json | 28 + .../ans/0.10.11/traits/trait_workflow.json | 22 + .../schema/ans/0.10.11/url_operation.json | 59 ++ .../ans/0.10.11/utils/audio_stream.json | 36 ++ .../schema/ans/0.10.11/utils/author.json | 212 +++++++ .../schema/ans/0.10.11/utils/auxiliary.json | 23 + .../schema/ans/0.10.11/utils/category.json | 27 + .../ans/0.10.11/utils/content_element.json | 32 + .../ans/0.10.11/utils/content_topic.json | 23 + .../ans/0.10.11/utils/custom_category.json | 27 + .../ans/0.10.11/utils/custom_entity.json | 31 + .../schema/ans/0.10.11/utils/dictionary.json | 15 + .../schema/ans/0.10.11/utils/entity.json | 31 + .../schema/ans/0.10.11/utils/keyword.json | 27 + .../ans/0.10.11/utils/named_entity.json | 27 + .../ans/0.10.11/utils/oembed_response.json | 46 ++ .../ans/0.10.11/utils/promo_reference.json | 52 ++ .../schema/ans/0.10.11/utils/reference.json | 73 +++ .../schema/ans/0.10.11/utils/section.json | 56 ++ .../schema/ans/0.10.11/utils/site.json | 43 ++ .../ans/0.10.11/utils/story-summary.json | 29 + .../schema/ans/0.10.11/utils/table_cell.json | 28 + .../schema/ans/0.10.11/utils/table_row.json | 31 + .../schema/ans/0.10.11/utils/tag.json | 34 ++ .../schema/ans/0.10.11/utils/topic.json | 27 + .../schema/ans/0.10.11/utils/variant.json | 53 ++ .../ans/0.10.11/utils/video_stream.json | 45 ++ .../ans/0.10.11/utils/video_subtitle.json | 34 ++ .../resources/schema/ans/0.10.11/video.json | 202 +++++++ .../schema/ans/0.10.11/video_operation.json | 50 ++ .../0.10.11/address-fixture-bad-po-box.json | 6 + .../schema/0.10.11/address-fixture-good.json | 8 + .../0.10.11/audio-fixture-bad-no-source.json | 4 + .../schema/0.10.11/audio-fixture-bad.json | 3 + .../0.10.11/audio-fixture-good-custom.json | 12 + .../0.10.11/audio-fixture-good-settings.json | 11 + .../0.10.11/audio-fixture-good-streams.json | 30 + .../schema/0.10.11/audio-fixture-good.json | 20 + .../schema/0.10.11/author-fixture-good.json | 80 +++ .../auxiliary-fixture-bad-missing-uid.json | 4 + .../auxiliary-fixture-good-optional-name.json | 4 + .../0.10.11/auxiliary-fixture-good.json | 5 + .../schema/0.10.11/bq-fixture-bad.json | 3 + .../schema/0.10.11/bq-fixture-good.json | 6 + .../schema/0.10.11/code-fixture-good.json | 7 + .../0.10.11/collection-fixture-good.json | 327 ++++++++++ .../schema/0.10.11/content-fixture-good.json | 29 + .../0.10.11/content-fixture-no-dates.json | 26 + .../0.10.11/content-operation-good.json | 31 + .../credit-fixture-bad-missing-name.json | 4 + .../schema/0.10.11/credit-fixture-good.json | 23 + .../0.10.11/custom_embed-fixture-bad-1.json | 22 + .../0.10.11/custom_embed-fixture-bad-2.json | 15 + .../0.10.11/custom_embed-fixture-good.json | 17 + .../schema/0.10.11/divider-fixture-bad.json | 4 + .../0.10.11/element-group-fixture-good.json | 13 + .../endorsement-fixture-bad-missing-prop.json | 4 + ...endorsement-fixture-bad-type-mismatch.json | 5 + .../0.10.11/endorsement-fixture-good.json | 5 + .../gallery-fixture-good-no-images.json | 19 + .../schema/0.10.11/gallery-fixture-good.json | 41 ++ .../0.10.11/gallery-operation-create.json | 79 +++ .../0.10.11/gallery-operation-delete.json | 10 + .../0.10.11/gallery-operation-update.json | 79 +++ .../0.10.11/geo-fixture-bad-not-a-number.json | 4 + .../schema/0.10.11/geo-fixture-good.json | 4 + .../geo-restriction-fixture-bad-length.json | 10 + .../geo-restrictions-fixture-bad-empty.json | 5 + ...geo-restrictions-fixture-bad-property.json | 8 + .../geo-restrictions-fixture-bad-type.json | 7 + .../geo-restrictions-fixture-good.json | 7 + .../schema/0.10.11/header-fixture-bad.json | 6 + .../schema/0.10.11/header-fixture-good.json | 6 + .../0.10.11/image-fixture-bad-alignment.json | 5 + .../image-fixture-bad-auth-format.json | 67 +++ ...ge-fixture-bad-focal-point-null-value.json | 57 ++ ...-fixture-bad-focal-point-out-of-range.json | 57 ++ ...ge-fixture-bad-focal-point-text-value.json | 57 ++ ...xture-bad-focal-point-wrong-prop-name.json | 57 ++ .../image-fixture-good-no-height-width.json | 6 + .../schema/0.10.11/image-fixture-good.json | 67 +++ .../0.10.11/image-operation-create.json | 42 ++ .../0.10.11/image-operation-delete.json | 10 + .../0.10.11/image-operation-update.json | 40 ++ .../interstitial-link-fixture-bad.json | 5 + .../interstitial-link-fixture-good-2.json | 18 + .../interstitial-link-fixture-good.json | 6 + .../keyword-fixture-bad-missing-score.json | 4 + ...keyword-fixture-bad-numeric-frequency.json | 5 + .../keyword-fixture-bad-score-type.json | 5 + .../0.10.11/keyword-fixture-bad-tag-type.json | 5 + .../schema/0.10.11/keyword-fixture-good.json | 6 + .../label-bad-arbitrary-properties.json | 6 + .../label-bad-field-name-with-dots.json | 5 + tests/fixtures/schema/0.10.11/label-good.json | 13 + .../schema/0.10.11/link-list-fixture-bad.json | 23 + .../link-list-fixture-good-all-text.json | 19 + .../0.10.11/link-list-fixture-good-text.json | 21 + .../0.10.11/link-list-fixture-good.json | 38 ++ .../schema/0.10.11/media-fixture-good.json | 13 + .../named-entity-fixture-bad-missing-id.json | 4 + ...med-entity-fixture-good-missing-score.json | 5 + .../0.10.11/named-entity-fixture-good.json | 6 + .../0.10.11/numeric-rating-fixture-bad.json | 7 + ...meric-rating-fixture-good-only-rating.json | 5 + .../0.10.11/numeric-rating-fixture-good.json | 8 + .../0.10.11/oembed-response-fixture-good.json | 28 + .../schema/0.10.11/operation-create.json | 35 ++ .../schema/0.10.11/operation-delete.json | 12 + .../0.10.11/operation-publish-edition.json | 37 ++ .../0.10.11/operation-unpublish-edition.json | 13 + .../schema/0.10.11/operation-update.json | 36 ++ .../0.10.11/quote-fixture-bad-citation.json | 8 + .../quote-fixture-bad-content-elements.json | 7 + .../schema/0.10.11/raw-html-fixture-bad.json | 3 + .../schema/0.10.11/raw-html-fixture-good.json | 6 + .../schema/0.10.11/redirect-fixture-bad.json | 6 + .../schema/0.10.11/redirect-fixture-good.json | 7 + .../reference-fixture-bad-addl-props.json | 11 + .../0.10.11/reference-fixture-bad-array.json | 8 + ...reference-fixture-bad-more-addl-props.json | 11 + .../0.10.11/reference-fixture-good.json | 15 + ...stricted-content-fixture-bad-referent.json | 10 + .../restricted-content-fixture-good.json | 16 + .../schema/0.10.11/social-fixture-good.json | 4 + .../0.10.11/source-bad-extra-properties.json | 5 + .../fixtures/schema/0.10.11/source-good.json | 9 + .../story-fixture-bad-corrections.json | 134 +++++ .../0.10.11/story-fixture-bad-dropcap.json | 25 + .../0.10.11/story-fixture-bad-embargo.json | 18 + .../story-fixture-bad-extra-properties.json | 206 +++++++ ...xture-bad-referenced-distributor-mode.json | 541 +++++++++++++++++ ...d-referenced-distributor-reference-id.json | 541 +++++++++++++++++ ...-fixture-bad-sections-addl-properties.json | 52 ++ .../story-fixture-bad-tag-strings.json | 55 ++ ...fixture-bad-taxonomy-additional-tasks.json | 105 ++++ .../0.10.11/story-fixture-bad-wrong-type.json | 175 ++++++ .../story-fixture-bad-wrong-version.json | 130 ++++ ...tory-fixture-good-distributor-handout.json | 546 +++++++++++++++++ .../story-fixture-good-distributor.json | 546 +++++++++++++++++ .../0.10.11/story-fixture-good-dropcap.json | 17 + .../0.10.11/story-fixture-good-embargo.json | 20 + .../story-fixture-good-multi-site.json | 89 +++ .../story-fixture-good-mystery-element.json | 125 ++++ ...y-fixture-good-referenced-distributor.json | 542 +++++++++++++++++ .../0.10.11/story-fixture-good-taxonomy.json | 111 ++++ .../schema/0.10.11/story-fixture-good.json | 558 ++++++++++++++++++ .../0.10.11/story-fixture-references.json | 238 ++++++++ .../0.10.11/story-fixture-tiny-house.json | 293 +++++++++ .../schema/0.10.11/table-fixture-bad.json | 66 +++ .../schema/0.10.11/table-fixture-good.json | 7 + .../0.10.11/tag-fixture-bad-no-text.json | 4 + .../0.10.11/tag-fixture-bad-subtype.json | 4 + .../schema/0.10.11/tag-fixture-bad-type.json | 5 + .../schema/0.10.11/tag-fixture-good.json | 6 + .../schema/0.10.11/taxonomy-fixture-good.json | 23 + .../schema/0.10.11/text-fixture-bad.json | 3 + ...xt-fixture-good-additional-properties.json | 5 + .../0.10.11/text-fixture-good-channels.json | 6 + .../schema/0.10.11/text-fixture-good.json | 5 + .../0.10.11/topic-fixture-bad-id-type.json | 6 + .../topic-fixture-bad-missing-uid.json | 5 + .../topic-fixture-good-missing-name.json | 5 + .../schema/0.10.11/topic-fixture-good.json | 6 + .../trait-copyrighted-fixture-good.json | 3 + ...t-credited-fixture-bad-missing-credit.json | 6 + .../0.10.11/trait-credited-fixture-good.json | 14 + .../trait-dated-fixture-bad-date-format.json | 4 + .../0.10.11/trait-dated-fixture-good.json | 4 + .../trait-id-fixture-bad-missing-id.json | 3 + .../schema/0.10.11/trait-id-fixture-good.json | 3 + .../0.10.11/trait-locale-fixture-good.json | 3 + .../0.10.11/trait-located-fixture-good.json | 15 + ...it-pitch-event-fixture-numeric-status.json | 3 + ...t-pitch-event-fixture-space-in-status.json | 3 + ...-pitch-event-fixture-uppercase-status.json | 3 + .../0.10.11/trait-pitches-fixture-good.json | 40 ++ .../0.10.11/trait-planning-fixture-good.json | 24 + .../trait-promo-item-raw-html-bad.json | 6 + .../trait-promo-item-raw-html-goog.json | 30 + ...ing-fixture-bad-mismatched-operations.json | 10 + ...-attached-redirect-has-multiple-items.json | 30 + ...bad-attached-redirect-is-not-redirect.json | 26 + .../trait-workflow-fixture-bad-code.json | 3 + .../0.10.11/trait-workflow-fixture-good.json | 4 + .../schema/0.10.11/ul-fixture-bad.json | 3 + .../0.10.11/ul-fixture-good-nested.json | 40 ++ .../schema/0.10.11/ul-fixture-good.json | 22 + .../url-operation-insert-redirect.json | 12 + ...deo-fixture-bad-empty-geo-restriction.json | 101 ++++ .../video-fixture-good-attached-redirect.json | 99 ++++ .../schema/0.10.11/video-fixture-good.json | 102 ++++ .../0.10.11/video-fixture-nationals.json | 167 ++++++ .../0.10.11/video-stream-fixture-good.json | 11 + .../0.10.11/video-subtitles-fixture-good.json | 16 + .../image-fixture-good-no-height-width.json | 6 + .../0.10.10/image-fixture-good.json | 47 ++ ...xture-bad-mixed-sub-document-versions.json | 249 ++++++++ .../story-fixture-good-mystery-element.json | 124 ++++ ...ory-fixture-good-old-labels-recursive.json | 26 + ...xture-good-old-style-label-and-source.json | 25 + .../story-fixture-good-references-2.json | 19 + .../story-fixture-good-references-3.json | 14 + .../0.10.10/story-fixture-good-slugs.json | 30 + .../0.10.10/story-fixture-good-tags.json | 42 ++ .../0.10.10/story-fixture-good.json | 354 +++++++++++ .../0.10.10/story-fixture-oembed.json | 37 ++ ...ixture-planning-status-code-is-string.json | 39 ++ .../0.10.10/story-fixture-planning.json | 39 ++ .../story-fixture-promo-items-empty.json | 5 + .../story-fixture-promo-items-no-basic.json | 11 + ...story-fixture-references-with-channel.json | 28 + .../0.10.10/story-fixture-references.json | 191 ++++++ .../0.10.10/story-fixture-taxonomy-bugs.json | 119 ++++ .../0.10.10/story-fixture-tiny-house.json | 177 ++++++ .../0.10.10/story-fixture-versions.json | 416 +++++++++++++ ...fixture-good-related-content-redirect.json | 16 + .../0.10.10/video-fixture-good.json | 96 +++ .../0.10.10/video-fixture-nationals.json | 184 ++++++ 327 files changed, 16111 insertions(+), 2 deletions(-) create mode 100644 lib/upvert/0.10.10.js create mode 100644 src/main/resources/schema/ans/0.10.11/audio.json create mode 100644 src/main/resources/schema/ans/0.10.11/author_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/clavis_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/collection.json create mode 100644 src/main/resources/schema/ans/0.10.11/content.json create mode 100644 src/main/resources/schema/ans/0.10.11/content_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/gallery.json create mode 100644 src/main/resources/schema/ans/0.10.11/gallery_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/image.json create mode 100644 src/main/resources/schema/ans/0.10.11/image_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/planning_note_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/platform_pitch_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/publication_pitch_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/redirect.json create mode 100644 src/main/resources/schema/ans/0.10.11/restricted_content.json create mode 100644 src/main/resources/schema/ans/0.10.11/results.json create mode 100644 src/main/resources/schema/ans/0.10.11/site_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/story.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/blockquote.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/code.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/content_zone.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/correction.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/custom_embed.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/divider.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/element_group.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/endorsement.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/header.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/interstitial_link.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/link_list.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/list.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/list_element.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/numeric_rating.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/quote.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/raw_html.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/table.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_elements/text.json create mode 100644 src/main/resources/schema/ans/0.10.11/story_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_address.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_alt_text.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_auth.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_block_properties.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_canonical_website.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_channel.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_comments.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_contributors.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_corrections.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_credits.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_date.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_description.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_dynamic_items.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_editable.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_focal_point.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_gallery_properties.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_geo.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_id.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_image_type.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_label.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_locale.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_location.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_owner.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_planning.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch_event.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_priority.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch_event.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_publishing.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_rendering_guides.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_revision.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_seo_filename.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_slug.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_social.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_source.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_status.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_variations.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_version.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_voice_transcripts.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_website.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_websites.json create mode 100644 src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json create mode 100644 src/main/resources/schema/ans/0.10.11/url_operation.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/audio_stream.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/author.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/auxiliary.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/category.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/content_element.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/content_topic.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/custom_category.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/custom_entity.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/dictionary.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/entity.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/keyword.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/named_entity.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/oembed_response.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/promo_reference.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/reference.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/section.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/site.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/story-summary.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/table_cell.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/table_row.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/tag.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/topic.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/variant.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/video_stream.json create mode 100644 src/main/resources/schema/ans/0.10.11/utils/video_subtitle.json create mode 100644 src/main/resources/schema/ans/0.10.11/video.json create mode 100644 src/main/resources/schema/ans/0.10.11/video_operation.json create mode 100644 tests/fixtures/schema/0.10.11/address-fixture-bad-po-box.json create mode 100644 tests/fixtures/schema/0.10.11/address-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/audio-fixture-bad-no-source.json create mode 100644 tests/fixtures/schema/0.10.11/audio-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/audio-fixture-good-custom.json create mode 100644 tests/fixtures/schema/0.10.11/audio-fixture-good-settings.json create mode 100644 tests/fixtures/schema/0.10.11/audio-fixture-good-streams.json create mode 100644 tests/fixtures/schema/0.10.11/audio-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/author-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/auxiliary-fixture-bad-missing-uid.json create mode 100644 tests/fixtures/schema/0.10.11/auxiliary-fixture-good-optional-name.json create mode 100644 tests/fixtures/schema/0.10.11/auxiliary-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/bq-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/bq-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/code-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/collection-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/content-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/content-fixture-no-dates.json create mode 100644 tests/fixtures/schema/0.10.11/content-operation-good.json create mode 100644 tests/fixtures/schema/0.10.11/credit-fixture-bad-missing-name.json create mode 100644 tests/fixtures/schema/0.10.11/credit-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/custom_embed-fixture-bad-1.json create mode 100644 tests/fixtures/schema/0.10.11/custom_embed-fixture-bad-2.json create mode 100644 tests/fixtures/schema/0.10.11/custom_embed-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/divider-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/element-group-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/endorsement-fixture-bad-missing-prop.json create mode 100644 tests/fixtures/schema/0.10.11/endorsement-fixture-bad-type-mismatch.json create mode 100644 tests/fixtures/schema/0.10.11/endorsement-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/gallery-fixture-good-no-images.json create mode 100644 tests/fixtures/schema/0.10.11/gallery-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/gallery-operation-create.json create mode 100644 tests/fixtures/schema/0.10.11/gallery-operation-delete.json create mode 100644 tests/fixtures/schema/0.10.11/gallery-operation-update.json create mode 100644 tests/fixtures/schema/0.10.11/geo-fixture-bad-not-a-number.json create mode 100644 tests/fixtures/schema/0.10.11/geo-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/geo-restriction-fixture-bad-length.json create mode 100644 tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-empty.json create mode 100644 tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-property.json create mode 100644 tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-type.json create mode 100644 tests/fixtures/schema/0.10.11/geo-restrictions-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/header-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/header-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/image-fixture-bad-alignment.json create mode 100644 tests/fixtures/schema/0.10.11/image-fixture-bad-auth-format.json create mode 100644 tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-null-value.json create mode 100644 tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-out-of-range.json create mode 100644 tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-text-value.json create mode 100644 tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-wrong-prop-name.json create mode 100644 tests/fixtures/schema/0.10.11/image-fixture-good-no-height-width.json create mode 100644 tests/fixtures/schema/0.10.11/image-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/image-operation-create.json create mode 100644 tests/fixtures/schema/0.10.11/image-operation-delete.json create mode 100644 tests/fixtures/schema/0.10.11/image-operation-update.json create mode 100644 tests/fixtures/schema/0.10.11/interstitial-link-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/interstitial-link-fixture-good-2.json create mode 100644 tests/fixtures/schema/0.10.11/interstitial-link-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/keyword-fixture-bad-missing-score.json create mode 100644 tests/fixtures/schema/0.10.11/keyword-fixture-bad-numeric-frequency.json create mode 100644 tests/fixtures/schema/0.10.11/keyword-fixture-bad-score-type.json create mode 100644 tests/fixtures/schema/0.10.11/keyword-fixture-bad-tag-type.json create mode 100644 tests/fixtures/schema/0.10.11/keyword-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/label-bad-arbitrary-properties.json create mode 100644 tests/fixtures/schema/0.10.11/label-bad-field-name-with-dots.json create mode 100644 tests/fixtures/schema/0.10.11/label-good.json create mode 100644 tests/fixtures/schema/0.10.11/link-list-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/link-list-fixture-good-all-text.json create mode 100644 tests/fixtures/schema/0.10.11/link-list-fixture-good-text.json create mode 100644 tests/fixtures/schema/0.10.11/link-list-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/media-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/named-entity-fixture-bad-missing-id.json create mode 100644 tests/fixtures/schema/0.10.11/named-entity-fixture-good-missing-score.json create mode 100644 tests/fixtures/schema/0.10.11/named-entity-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/numeric-rating-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/numeric-rating-fixture-good-only-rating.json create mode 100644 tests/fixtures/schema/0.10.11/numeric-rating-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/oembed-response-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/operation-create.json create mode 100644 tests/fixtures/schema/0.10.11/operation-delete.json create mode 100644 tests/fixtures/schema/0.10.11/operation-publish-edition.json create mode 100644 tests/fixtures/schema/0.10.11/operation-unpublish-edition.json create mode 100644 tests/fixtures/schema/0.10.11/operation-update.json create mode 100644 tests/fixtures/schema/0.10.11/quote-fixture-bad-citation.json create mode 100644 tests/fixtures/schema/0.10.11/quote-fixture-bad-content-elements.json create mode 100644 tests/fixtures/schema/0.10.11/raw-html-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/raw-html-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/redirect-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/redirect-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/reference-fixture-bad-addl-props.json create mode 100644 tests/fixtures/schema/0.10.11/reference-fixture-bad-array.json create mode 100644 tests/fixtures/schema/0.10.11/reference-fixture-bad-more-addl-props.json create mode 100644 tests/fixtures/schema/0.10.11/reference-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/restricted-content-fixture-bad-referent.json create mode 100644 tests/fixtures/schema/0.10.11/restricted-content-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/social-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/source-bad-extra-properties.json create mode 100644 tests/fixtures/schema/0.10.11/source-good.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-corrections.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-dropcap.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-embargo.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-extra-properties.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-referenced-distributor-mode.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-referenced-distributor-reference-id.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-sections-addl-properties.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-tag-strings.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-taxonomy-additional-tasks.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-wrong-type.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-bad-wrong-version.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-good-distributor-handout.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-good-distributor.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-good-dropcap.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-good-embargo.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-good-multi-site.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-good-mystery-element.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-good-referenced-distributor.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-good-taxonomy.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-references.json create mode 100644 tests/fixtures/schema/0.10.11/story-fixture-tiny-house.json create mode 100644 tests/fixtures/schema/0.10.11/table-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/table-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/tag-fixture-bad-no-text.json create mode 100644 tests/fixtures/schema/0.10.11/tag-fixture-bad-subtype.json create mode 100644 tests/fixtures/schema/0.10.11/tag-fixture-bad-type.json create mode 100644 tests/fixtures/schema/0.10.11/tag-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/taxonomy-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/text-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/text-fixture-good-additional-properties.json create mode 100644 tests/fixtures/schema/0.10.11/text-fixture-good-channels.json create mode 100644 tests/fixtures/schema/0.10.11/text-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/topic-fixture-bad-id-type.json create mode 100644 tests/fixtures/schema/0.10.11/topic-fixture-bad-missing-uid.json create mode 100644 tests/fixtures/schema/0.10.11/topic-fixture-good-missing-name.json create mode 100644 tests/fixtures/schema/0.10.11/topic-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/trait-copyrighted-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/trait-credited-fixture-bad-missing-credit.json create mode 100644 tests/fixtures/schema/0.10.11/trait-credited-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/trait-dated-fixture-bad-date-format.json create mode 100644 tests/fixtures/schema/0.10.11/trait-dated-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/trait-id-fixture-bad-missing-id.json create mode 100644 tests/fixtures/schema/0.10.11/trait-id-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/trait-locale-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/trait-located-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-numeric-status.json create mode 100644 tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-space-in-status.json create mode 100644 tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-uppercase-status.json create mode 100644 tests/fixtures/schema/0.10.11/trait-pitches-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/trait-planning-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/trait-promo-item-raw-html-bad.json create mode 100644 tests/fixtures/schema/0.10.11/trait-promo-item-raw-html-goog.json create mode 100644 tests/fixtures/schema/0.10.11/trait-publishing-fixture-bad-mismatched-operations.json create mode 100644 tests/fixtures/schema/0.10.11/trait-related-content-bad-attached-redirect-has-multiple-items.json create mode 100644 tests/fixtures/schema/0.10.11/trait-related-content-bad-attached-redirect-is-not-redirect.json create mode 100644 tests/fixtures/schema/0.10.11/trait-workflow-fixture-bad-code.json create mode 100644 tests/fixtures/schema/0.10.11/trait-workflow-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/ul-fixture-bad.json create mode 100644 tests/fixtures/schema/0.10.11/ul-fixture-good-nested.json create mode 100644 tests/fixtures/schema/0.10.11/ul-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/url-operation-insert-redirect.json create mode 100644 tests/fixtures/schema/0.10.11/video-fixture-bad-empty-geo-restriction.json create mode 100644 tests/fixtures/schema/0.10.11/video-fixture-good-attached-redirect.json create mode 100644 tests/fixtures/schema/0.10.11/video-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/video-fixture-nationals.json create mode 100644 tests/fixtures/schema/0.10.11/video-stream-fixture-good.json create mode 100644 tests/fixtures/schema/0.10.11/video-subtitles-fixture-good.json create mode 100644 tests/fixtures/transforms/0.10.10/image-fixture-good-no-height-width.json create mode 100644 tests/fixtures/transforms/0.10.10/image-fixture-good.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-bad-mixed-sub-document-versions.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-good-mystery-element.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-good-old-labels-recursive.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-good-old-style-label-and-source.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-good-references-2.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-good-references-3.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-good-slugs.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-good-tags.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-good.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-oembed.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-planning-status-code-is-string.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-planning.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-promo-items-empty.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-promo-items-no-basic.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-references-with-channel.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-references.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-taxonomy-bugs.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-tiny-house.json create mode 100644 tests/fixtures/transforms/0.10.10/story-fixture-versions.json create mode 100644 tests/fixtures/transforms/0.10.10/video-fixture-good-related-content-redirect.json create mode 100644 tests/fixtures/transforms/0.10.10/video-fixture-good.json create mode 100644 tests/fixtures/transforms/0.10.10/video-fixture-nationals.json diff --git a/README.md b/README.md index b75aaaaa..f50f6872 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,9 @@ For more information, please refer to GitHub documentation: - - -## The current production version of ANS is 0.10.9 +## The current production version of ANS is 0.10.10 -## The current development version of ANS is 0.10.10 +## The current development version of ANS is 0.10.11 ## Schema files diff --git a/lib/upvert/0.10.10.js b/lib/upvert/0.10.10.js new file mode 100644 index 00000000..5954d913 --- /dev/null +++ b/lib/upvert/0.10.10.js @@ -0,0 +1,20 @@ +'use strict'; + +var _ = require('lodash'); +var current_version = require('../version'); +var transform_utils = require('../transform_utils'); + +var version_incrementer = transform_utils.version_incrementer; +var top_level_types = transform_utils.top_level_types; +var accumulatorFor = transform_utils.accumulatorFor; + +var upvert = function(input) { + var output = version_incrementer("0.10.11")(input); + + // TODO: Add upvert logic here + // If change is non-breaking, you can leave this as-is. + + return output; +}; + +module.exports = upvert; diff --git a/lib/versions.json b/lib/versions.json index 2403f4d3..c35857c0 100644 --- a/lib/versions.json +++ b/lib/versions.json @@ -194,6 +194,12 @@ { "name": "0.10.10", "schema": true, + "upverter": true, + "downverter": false + }, + { + "name": "0.10.11", + "schema": true, "upverter": false, "downverter": false } diff --git a/src/main/resources/schema/ans/0.10.11/audio.json b/src/main/resources/schema/ans/0.10.11/audio.json new file mode 100644 index 00000000..1644ecc0 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/audio.json @@ -0,0 +1,184 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/audio.json", + "description": "Audio Content", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ "audio" ] + }, + + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "language": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json" + }, + "copyright": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "short_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json" + }, + "created_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + }, + "publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json" + }, + "first_publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json" + }, + "display_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json" + }, + "location": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_location.json" + }, + "geo": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json" + }, + "address": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_address.json" + }, + "editor_note": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json" + }, + "status": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_status.json" + }, + "headlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json" + }, + "subheadlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json" + }, + "description": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_description.json" + }, + "credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json" + }, + "vanity_credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json" + }, + "taxonomy": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json" + }, + "promo_items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json" + }, + "related_content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json" + }, + "owner": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json" + }, + "planning": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json" + }, + "workflow": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json" + }, + "pitches": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "syndication": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json" + }, + "source": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_source.json" + }, + "distributor": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json" + }, + "tracking": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json" + }, + "comments": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json" + }, + "label": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_label.json" + }, + "slug": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json" + }, + "content_restrictions": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "content_aliases": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json" + }, + + + "source_url": { + "description": "(Deprecated.) The audio source file. Use 'streams' instead.", + "type": "string" + }, + "mimetype": { + "description": "(Deprecated.) Mime type of audio source file. Use 'streams' instead.", + "type": "string" + }, + "autoplay": { + "description": "Whether to autoplay is enabled.", + "type": "boolean" + }, + "controls": { + "description": "Whether controls are enabled.", + "type": "boolean" + }, + "loop": { + "description": "Whether looping is enabled.", + "type": "boolean" + }, + "preload": { + "description": "Whether preload is enabled.", + "type": "boolean" + }, + + "streams": { + "description": "The different streams this audio can play in.", + "type": "array", + "minItems": 1, + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/audio_stream.json" + } + } + }, + "required": [ "type", "version" ], + "oneOf": [{ + "required": [ "streams" ] + }, { + "required": [ "source_url" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/author_operation.json b/src/main/resources/schema/ans/0.10.11/author_operation.json new file mode 100644 index 00000000..abba6c05 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/author_operation.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/author_operation.json", + "description": "An operation on a author", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "author-service" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "insert", "update", "delete" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The id of the item being operated" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + + "priority": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json" + }, + "app_name": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json" + }, + + "body": { + "description": "The object being inserted/updated/deleted", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/author.json" + } + }, + "required": [ "type", "operation", "id", "organization_id" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/clavis_operation.json b/src/main/resources/schema/ans/0.10.11/clavis_operation.json new file mode 100644 index 00000000..b39a34b5 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/clavis_operation.json @@ -0,0 +1,82 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/clavis_operation.json", + "description": "An operation to add Clavis information to a story.", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "clavis-operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "update" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The id of the item being operated" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "branch": { + "type": "string", + "description": "The name of the branch within Story API that this operation occurs on, if any" + }, + "published": { + "type": "boolean", + "description": "Identifies this item as published or not" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + + "priority": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json" + }, + "app_name": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json" + }, + + "keywords": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/keyword.json" + }, + "description": "A list of keywords." + }, + "named_entities": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/named_entity.json" + }, + "description": "A list of named entities." + }, + "topics": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/topic.json" + }, + "description": "A list of topics." + }, + "auxiliaries": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/auxiliary.json" + }, + "description": "A list of auxiliaries." + } + }, + "required": [ "type", "operation", "id", "organization_id", "branch", "published" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/collection.json b/src/main/resources/schema/ans/0.10.11/collection.json new file mode 100644 index 00000000..a0c48612 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/collection.json @@ -0,0 +1,182 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/collection.json", + "title": "A collection.", + "description": "Holds attributes of an ANS collection. In the Arc ecosystem, these are stored in the Collection API. ", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ "collection" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "language": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json" + }, + "copyright": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "canonical_website": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_website.json" + }, + "website": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website.json" + }, + "website_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json" + }, + "short_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json" + }, + "created_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + }, + "publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json" + }, + "first_publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json" + }, + "display_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json" + }, + "location": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_location.json" + }, + "geo": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json" + }, + "address": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_address.json" + }, + "editor_note": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json" + }, + "status": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_status.json" + }, + "headlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json" + }, + "subheadlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json" + }, + "description": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_description.json" + }, + "credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json" + }, + "vanity_credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json" + }, + "taxonomy": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json" + }, + "promo_items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json" + }, + "related_content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json" + }, + "owner": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json" + }, + "planning": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json" + }, + "workflow": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json" + }, + "pitches": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "syndication": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json" + }, + "source": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_source.json" + }, + "distributor": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json" + }, + "tracking": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json" + }, + "comments": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json" + }, + "label": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_label.json" + }, + "slug": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json" + }, + "content_restrictions": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "corrections": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_corrections.json" + }, + + "content_elements": { + "$allOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json" + }, + { + "items": { + "type": { + "enum": "promo_reference" + } + } + } + ] + }, + "publishing": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publishing.json" + }, + + + "websites": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_websites.json" + }, + + "content_aliases": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json" + }, + "dynamic_items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_dynamic_items.json" + } + }, + "required": [ "type", "version" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/content.json b/src/main/resources/schema/ans/0.10.11/content.json new file mode 100644 index 00000000..af2b1ce4 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/content.json @@ -0,0 +1,147 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/content.json", + "title": "A content object.", + "description": "Holds common attributes of ANS Content objects.", + "type": "object", + "additionalProperties": {}, + "properties": { + "type": { + "type": "string" + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "language": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json" + }, + "copyright": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "short_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json" + }, + "created_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + }, + "publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json" + }, + "first_publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json" + }, + "display_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json" + }, + "location": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_location.json" + }, + "geo": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json" + }, + "address": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_address.json" + }, + "editor_note": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json" + }, + "status": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_status.json" + }, + "headlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json" + }, + "subheadlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json" + }, + "description": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_description.json" + }, + "credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json" + }, + "vanity_credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json" + }, + "taxonomy": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json" + }, + "promo_items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json" + }, + "related_content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json" + }, + "owner": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json" + }, + "planning": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json" + }, + "workflow": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json" + }, + "pitches": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "syndication": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json" + }, + "source": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_source.json" + }, + "distributor": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json" + }, + "tracking": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json" + }, + "comments": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json" + }, + "label": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_label.json" + }, + "slug": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json" + }, + "content_restrictions": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "content_aliases": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json" + }, + + "contributors": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_contributors.json" + } + + }, + "required": [ "type", "version" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/content_operation.json b/src/main/resources/schema/ans/0.10.11/content_operation.json new file mode 100644 index 00000000..4dc694cb --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/content_operation.json @@ -0,0 +1,88 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/content_operation.json", + "description": "An operation on a denormalized story", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "content-operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "insert-story", "delete-story", "insert-gallery", "delete-gallery", "insert-video", "delete-video", "insert-redirect", "delete-redirect" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The id of the item being operated" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "branch": { + "type": "string", + "description": "The name of the branch within Story API that this operation occurs on, if any" + }, + "published": { + "type": "boolean", + "description": "Identifies this item as published or not" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + "body": { + "description": "The object being inserted/updated/deleted", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/content.json" + }, + "created": { + "type": "boolean", + "description": "Identifies this item as created or updated." + }, + "trigger": { + "title": "Operation Trigger", + "description": "Metadata about the primary source update that triggered this operation. These fields can be used by downstream consumers as an efficient way of determining the relevance of an operation.", + "type": "object", + "additionalProperties": false, + + "properties": { + "type": { + "title": "Trigger Type", + "description": "The type of update that was consumed in order to produce this update. If this operation is the result of a referent update, than this type may or may not match the type of document in the body. For example, suppose story A contains image B and story C. If B is updated, then an operation may be produced with source 'image' and a body of story A (with updated image metadata.) If C is updated, then an operation may be produced with source 'story' and the body of story A.", + "type": "string", + "enum": [ "story", "gallery", "image", "video", "url", "site", "author", "clavis", "variant" ] + }, + "id": { + "title": "Trigger ID", + "description": "The id of the document whose update was consumed in order to produce this update. If this operation is the result of a referent update, than this id will not match the id of the document in the body (except the case where a document references itself.)", + "type": "string" + }, + "referent_update": { + "title": "Referent Update", + "description": "If true, this update was triggered by an update to a referenced element in the document rather than the document itself.", + "type": "boolean" + }, + + "priority": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json" + }, + "app_name": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json" + } + + } + } + + }, + "required": [ "type", "operation", "id", "organization_id" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/gallery.json b/src/main/resources/schema/ans/0.10.11/gallery.json new file mode 100644 index 00000000..b7ce651d --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/gallery.json @@ -0,0 +1,168 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/gallery.json", + "title": "A gallery.", + "description": "Holds attributes of an ANS gallery. In the Arc ecosystem, these are stored in Anglerfish.", + "type": "object", + "additionalProperties": false, + + "properties": { + "type": { + "type": "string", + "enum": [ "gallery" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "language": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json" + }, + "copyright": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "canonical_website": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_website.json" + }, + "website": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website.json" + }, + "website_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json" + }, + "short_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json" + }, + "created_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + }, + "publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json" + }, + "first_publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json" + }, + "display_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json" + }, + "location": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_location.json" + }, + "geo": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json" + }, + "address": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_address.json" + }, + "editor_note": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json" + }, + "status": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_status.json" + }, + "headlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json" + }, + "subheadlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json" + }, + "description": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_description.json" + }, + "credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json" + }, + "vanity_credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json" + }, + "taxonomy": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json" + }, + "promo_items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json" + }, + "related_content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json" + }, + "owner": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json" + }, + "planning": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json" + }, + "workflow": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json" + }, + "pitches": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "syndication": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json" + }, + "source": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_source.json" + }, + "distributor": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json" + }, + "tracking": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json" + }, + "comments": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json" + }, + "label": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_label.json" + }, + "slug": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json" + }, + "content_restrictions": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + + "content_aliases": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json" + }, + + "content_elements": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json" + }, + + "websites": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_websites.json" + }, + + "contributors": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_contributors.json" + } + + }, + "required": [ "type", "version" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/gallery_operation.json b/src/main/resources/schema/ans/0.10.11/gallery_operation.json new file mode 100644 index 00000000..fef98608 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/gallery_operation.json @@ -0,0 +1,62 @@ + +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/gallery_operation.json", + "description": "An operation on a gallery", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "gallery-operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "insert", "update", "delete" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "submit_date": { + "description": "When this operation was submitted to Content API. Used for latency checking.", + "type":"string", + "format": "date-time" + }, + "_id": { + "type": "string", + "description": "The id of the gallery being operated on" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + "priority": { + "type": "string", + "title": "Priority", + "description": "The priority identifier of this operation. This is used by downstream consumers to make decisions about optimization. The value 'standard' indicates an operation generated from a UI or live update. The value 'ingestion' indicates an operation generated by a migration script or background import.", + "enum": [ "standard", "ingestion" ] + }, + + "priority": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json" + }, + "app_name": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json" + }, + + "body": { + "description": "The gallery being inserted/updated/deleted", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/gallery.json" + } + }, + "required": [ "type", "operation", "_id", "organization_id" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/image.json b/src/main/resources/schema/ans/0.10.11/image.json new file mode 100644 index 00000000..b6da47a4 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/image.json @@ -0,0 +1,183 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/image.json", + "title": "An image.", + "description": "Holds attributes of an ANS image component. In the Arc ecosystem, these are stored in Anglerfish.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ "image" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "language": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json" + }, + "copyright": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "short_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json" + }, + "created_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + }, + "publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json" + }, + "first_publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json" + }, + "display_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json" + }, + "location": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_location.json" + }, + "geo": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json" + }, + "address": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_address.json" + }, + "editor_note": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json" + }, + "status": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_status.json" + }, + "headlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json" + }, + "subheadlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json" + }, + "description": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_description.json" + }, + "credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json" + }, + "vanity_credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json" + }, + "taxonomy": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json" + }, + "promo_items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json" + }, + "related_content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json" + }, + "owner": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json" + }, + "planning": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json" + }, + "workflow": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json" + }, + "pitches": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "syndication": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json" + }, + "source": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_source.json" + }, + "distributor": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json" + }, + "tracking": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json" + }, + "comments": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json" + }, + "label": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_label.json" + }, + "slug": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json" + }, + "content_restrictions": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json" + }, + "image_type": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_image_type.json" + }, + "alt_text": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alt_text.json" + }, + "focal_point": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_focal_point.json" + }, + "auth": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_auth.json" + }, + "seo_filename": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_seo_filename.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + + "subtitle": { + "description": "Subtitle for the image.", + "type": "string" + }, + "caption": { + "description": "Caption for the image.", + "type": "string" + }, + "url": { + "description": "URL for the image.", + "type": "string" + }, + "width": { + "description": "Width for the image.", + "type": "integer" + }, + "height": { + "description": "Height for the image.", + "type": "integer" + }, + "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.11/traits/trait_contributors.json" + } + }, + "required": [ "type", "version" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/image_operation.json b/src/main/resources/schema/ans/0.10.11/image_operation.json new file mode 100644 index 00000000..a2851390 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/image_operation.json @@ -0,0 +1,65 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/image_operation.json", + "description": "An operation on an image", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "image-operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "insert", "update", "delete", "publish", "unpublish" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "display_date":{ + "description": "The RFC3339-formatted dated time of the most recent date the image was (re)displayed on a public site.", + "type": "string", + "format": "date-time" + }, + "publish_date":{ + "description": "When the image was published.", + "type": "string", + "format": "date-time" + }, + "submit_date": { + "description": "When this operation was submitted to Content API. Used for latency checking.", + "type":"string", + "format": "date-time" + }, + "_id": { + "type": "string", + "description": "The id of the image being operated on" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + "priority": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json" + }, + "app_name": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json" + }, + + + "body": { + "description": "The image being inserted/updated/deleted", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/image.json" + } + }, + "required": [ "type", "operation", "_id", "organization_id" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/planning_note_operation.json b/src/main/resources/schema/ans/0.10.11/planning_note_operation.json new file mode 100644 index 00000000..b1fd110a --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/planning_note_operation.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://github.com/washingtonpost/ans-schema/blob/master/src/main/resources/schema/ans/0.10.11/planning_note_operation.json", + "description": "An operation to update the planning note associated with a story.", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "planning-note-operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "update" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The id of the item being operated" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + "note": { + "type": "string", + "description": "The new or updated note" + } + }, + "required": [ "type", "operation", "id", "organization_id", "note" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/platform_pitch_operation.json b/src/main/resources/schema/ans/0.10.11/platform_pitch_operation.json new file mode 100644 index 00000000..b161da16 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/platform_pitch_operation.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://github.com/washingtonpost/ans-schema/blob/master/src/main/resources/schema/ans/0.10.11/platform_pitch_operation.json", + "description": "An operation to add or update a story's pitch to a WebSked platform.", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "platform-pitch-operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "create", "update" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The id of the item being operated" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + "body": { + "description": "The object being inserted/updated", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch.json" + } + }, + "required": [ "type", "operation", "id", "organization_id", "body" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/publication_pitch_operation.json b/src/main/resources/schema/ans/0.10.11/publication_pitch_operation.json new file mode 100644 index 00000000..c56c7f9a --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/publication_pitch_operation.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://github.com/washingtonpost/ans-schema/blob/master/src/main/resources/schema/ans/0.10.11/publication_pitch_operation.json", + "description": "An operation to add or update a story's pitch to a WebSked publication.", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "publication-pitch-operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "create", "update" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The id of the item being operated" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + "body": { + "description": "The object being inserted/updated", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch.json" + } + }, + "required": [ "type", "operation", "id", "organization_id", "body" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/redirect.json b/src/main/resources/schema/ans/0.10.11/redirect.json new file mode 100644 index 00000000..a4ef75eb --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/redirect.json @@ -0,0 +1,33 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/redirect.json", + "title": "A redirect object.", + "description": "A redirect to another story.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ "redirect" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "owner": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "redirect_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + } + }, + "required": [ "type", "version", "canonical_url", "redirect_url" ] +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/restricted_content.json b/src/main/resources/schema/ans/0.10.11/restricted_content.json new file mode 100644 index 00000000..8c45a672 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/restricted_content.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/restricted_content.json", + "title": "A restricted content object.", + "description": "Represents restricted ANS Content objects.", + "type": "object", + "additionalProperties": {}, + "properties": { + "type": { + "enum": [ "restricted" ] + }, + + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + + "restricted_content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + + "reasons": { + "type": "array", + "items": { + "type": "object", + "properties": { + "restriction_id": { + "description": "The ARC UUID of the distributor of this content. E.g., ABCDEFGHIJKLMNOPQRSTUVWXYZ.", + "type": "string" + }, + "message": { + "description": "The human-readable message describing the restriction.", + "type": "string" + } + } + } + } + }, + "required": [ "type", "reasons" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/results.json b/src/main/resources/schema/ans/0.10.11/results.json new file mode 100644 index 00000000..a0e7d536 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/results.json @@ -0,0 +1,136 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/summaries/results.json", + "description": "A set of summary items to be displayed together (e.g., landing pages, query results, etc.) In the Arc ecosystem, these pages are generated by the Content API.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ "results" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "language": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json" + }, + "copyright": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "short_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json" + }, + "created_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + }, + "publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json" + }, + "first_publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json" + }, + "display_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json" + }, + "location": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_location.json" + }, + "geo": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json" + }, + "address": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_address.json" + }, + "editor_note": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json" + }, + "status": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_status.json" + }, + "headlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json" + }, + "subheadlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json" + }, + "description": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_description.json" + }, + "credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json" + }, + "taxonomy": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json" + }, + "promo_items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json" + }, + "related_content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json" + }, + "owner": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json" + }, + "planning": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "syndication": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json" + }, + "source": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_source.json" + }, + "tracking": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json" + }, + "comments": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json" + }, + "label": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_label.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "content_elements": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json" + }, + + + + "count" : { + "description": "Total number of items in the source that this list pulls from", + "type": "integer" + }, + "next": { + "description": "A page number, story id, url, or other parameter used for retrieving subsequent items in the list" + }, + "previous": { + "description": "A page number, story id, url, or other parameter used for retrieving previous items in the list" + } + }, + "required": [ "type", "version" ] + +} diff --git a/src/main/resources/schema/ans/0.10.11/site_operation.json b/src/main/resources/schema/ans/0.10.11/site_operation.json new file mode 100644 index 00000000..0f7a8e5b --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/site_operation.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/site_operation.json", + "description": "An operation on a site", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "site-service" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "insert", "update", "delete" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The id of the item being operated" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + + "priority": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json" + }, + "app_name": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json" + }, + + "body": { + "description": "The object being inserted/updated/deleted", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/site.json" + } + }, + "required": [ "type", "operation", "id", "organization_id" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/story.json b/src/main/resources/schema/ans/0.10.11/story.json new file mode 100644 index 00000000..e69fa958 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story.json @@ -0,0 +1,181 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story.json", + "title": "A story.", + "description": "Holds attributes of an ANS story. In the Arc ecosystem, these are stored in the Story API. ", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ "story" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "language": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json" + }, + "copyright": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "canonical_website": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_website.json" + }, + "website": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website.json" + }, + "website_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json" + }, + "short_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json" + }, + "created_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + }, + "publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json" + }, + "first_publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json" + }, + "display_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json" + }, + "location": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_location.json" + }, + "geo": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json" + }, + "address": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_address.json" + }, + "editor_note": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json" + }, + "status": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_status.json" + }, + "headlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json" + }, + "subheadlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json" + }, + "description": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_description.json" + }, + "credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json" + }, + "vanity_credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json" + }, + "taxonomy": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json" + }, + "promo_items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json" + }, + "related_content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json" + }, + "owner": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json" + }, + "planning": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json" + }, + "workflow": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json" + }, + "pitches": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "syndication": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json" + }, + "source": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_source.json" + }, + "distributor": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json" + }, + "tracking": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json" + }, + "comments": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json" + }, + "label": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_label.json" + }, + "slug": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json" + }, + "content_restrictions": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json" + }, + "rendering_guides": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_rendering_guides.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "content_aliases": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json" + }, + + "corrections": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_corrections.json" + }, + "content_elements": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json" + }, + "publishing": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publishing.json" + }, + "variations": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_variations.json" + }, + "voice_transcripts": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_voice_transcripts.json" + }, + + "websites": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_websites.json" + }, + + "contributors": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_contributors.json" + } + + }, + "required": [ "type", "version" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/blockquote.json b/src/main/resources/schema/ans/0.10.11/story_elements/blockquote.json new file mode 100644 index 00000000..41d890da --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/blockquote.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/blockquote.json", + "title": "Blockquote", + "description": "(Deprecated.) Equivalent to an HTML blockquote element. Consider the new `quote` element instead.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "blockquote" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "content": { + "description": "A blockquote", + "type": "string" + } + }, + "required": [ "type", "content" ] +} + diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/code.json b/src/main/resources/schema/ans/0.10.11/story_elements/code.json new file mode 100644 index 00000000..d49a2daf --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/code.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/code.json", + "description": "A code sample", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "code" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "content": { + "description": "The code sample.", + "type": "string" + }, + "language": { + "description": "The programming or markup language of the code sample", + "type": "string" + } + }, + "required": ["type", "content", "language"] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/content_zone.json b/src/main/resources/schema/ans/0.10.11/story_elements/content_zone.json new file mode 100644 index 00000000..601e3c1e --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/content_zone.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "A content element that represents variant content elements", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/content_zone.json", + "properties": { + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "type": { + "enum": [ + "content_zone" + ], + "type": "string" + } + }, + "required": [ + "_id", + "type" + ], + "type": "object" +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/correction.json b/src/main/resources/schema/ans/0.10.11/story_elements/correction.json new file mode 100644 index 00000000..81751cbb --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/correction.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/correction.json", + "title": "Correction", + "additionalProperties": false, + "description": "Describes a change that has been made to the document for transparency, or describes inaccuracies or falsehoods that remain in the document.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ "correction" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + + "correction_type": { + "description": "Type of correction. E.g., clarification, retraction.", + "type": "string" + }, + "text": { + "description": "The text of the correction.", + "type": "string" + } + + }, + "required": [ "type", "text" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/custom_embed.json b/src/main/resources/schema/ans/0.10.11/story_elements/custom_embed.json new file mode 100644 index 00000000..eaf9ee9f --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/custom_embed.json @@ -0,0 +1,79 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/custom_embed.json", + "title": "Custom Embed", + "description": "A custom embed element. Can be used to reference content from external providers about which little is known.", + "type": "object", + "additionalProperties": false, + + "properties": { + "type": { + "type": "string", + "enum": [ "custom_embed" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "embed": { + "title": "Embed", + "description": "The embed data.", + "type": "object", + "additionalProperties": false, + + "properties": { + "id": { + "title": "Embed ID", + "description": "Foreign ID of embedded item.", + "type": "string", + "maxLength": 128, + "minLength": 1 + }, + + "url": { + "title": "Embed Provider URL", + "description": "Provider URL for this embed item. When concatenated with Embed ID, should produce a URL that returns json metadata about the embedded content.", + "type": "string", + "maxLength": 512, + "minLength": 1 + }, + + "config": { + "title": "Embed Configuration", + "description": "Arbitrary configuration data generated by a plugin. Users are responsible for maintaining schema.", + "type": "object", + + "additionalProperties": false, + "properties": { + "referent": { + "not": {} + }, + "type": { + "not": {} + }, + "version": { + "not": {} + } + }, + "patternProperties": { + "^([a-zA-Z0-9_])*$": {} + } + } + }, + "required": [ "id", "url" ] + } + }, + "required": [ "type", "embed" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/divider.json b/src/main/resources/schema/ans/0.10.11/story_elements/divider.json new file mode 100644 index 00000000..2ee80f45 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/divider.json @@ -0,0 +1,30 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/divider.json", + "description": "A divider between segments of an article.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "divider" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + + }, + "required": ["type"] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/element_group.json b/src/main/resources/schema/ans/0.10.11/story_elements/element_group.json new file mode 100644 index 00000000..397609f0 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/element_group.json @@ -0,0 +1,33 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/element_group.json", + "description": "A sub-sequence of related content elements", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ "element_group" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "content_elements": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json" + } + }, + "required": [ "type", "content_elements" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/endorsement.json b/src/main/resources/schema/ans/0.10.11/story_elements/endorsement.json new file mode 100644 index 00000000..a34da75d --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/endorsement.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/endorsement.json", + "description": "A string indicating the item's value.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "endorsement" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "endorsement": { + "description": "A string indicating the value.", + "type": "string" + } + }, + "required": ["endorsement"] +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/header.json b/src/main/resources/schema/ans/0.10.11/story_elements/header.json new file mode 100644 index 00000000..b869f558 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/header.json @@ -0,0 +1,39 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/header.json", + "description": "A Header", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ "header" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "content": { + "description": "The text of the heading.", + "type": "string" + }, + "level": { + "description": "Header level", + "type": "integer" + } + }, + "required": [ "type", "content" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/interstitial_link.json b/src/main/resources/schema/ans/0.10.11/story_elements/interstitial_link.json new file mode 100644 index 00000000..c6643228 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/interstitial_link.json @@ -0,0 +1,74 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/interstitial_link.json", + "description": "An interstitial link", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "interstitial_link" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "url": { + "title": "Link URL", + "description": "The interstitial link url. This is where the user should be taken if they follow this link.", + "type": "string" + }, + "content": { + "title": "Link Title", + "description": "The interstitial link title text. This text should be considered part of the link.", + "type": "string" + }, + "description": { + "title": "Link Description", + "description": "Additional text about the link. May or may not be considered part of the link, depending on implementation.", + + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/text.json" + }, + "image": { + "title": "Link Image", + "description": "An optional image. This should be considered part of the link.", + + "oneOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/image.json" + }, + { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + { + "properties": { + "referent": { + "properties": { + "type": { + "enum": [ "image" ] + } + } + } + } + } + ] + } + ] + } + }, + + "required": ["type", "url", "content"] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/link_list.json b/src/main/resources/schema/ans/0.10.11/story_elements/link_list.json new file mode 100644 index 00000000..4e408c30 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/link_list.json @@ -0,0 +1,54 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/link_list.json", + "title": "Link List", + "description": "A list of links to related or external content that may be embedded in a story as a unit. Can be used for curated re-circulation, or simple 'More Information' boxes. Each item in the list must be an interstitial link.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "link_list" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "title": { + "type": "string", + "title": "Title", + "description": "The title of the list. Plain-text with no formatting." + }, + "items": { + "title": "Links", + "description": "The links in this list.", + + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/interstitial_link.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/text.json" + } + ] + }, + "minItems": 1, + "maxItems": 10 + } + }, + "required": [ "type", "items" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/list.json b/src/main/resources/schema/ans/0.10.11/story_elements/list.json new file mode 100644 index 00000000..e5063134 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/list.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/list.json", + "title": "A list.", + "description": " list of text items or other lists", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "list" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "list_type": { + "type": "string", + "description": "The type of list to render as (ordered, unordered, etc)" + }, + "items": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/list_element.json" + }, + "description": "The items in this list." + } + }, + "required": [ "type" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/list_element.json b/src/main/resources/schema/ans/0.10.11/story_elements/list_element.json new file mode 100644 index 00000000..d9794370 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/list_element.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/list_element.json", + "title": "A valid list element.", + "description": "Lists the schemas we allow as 'list elements' in our collection schema.", + "type": "object", + "additionalProperties": {}, + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/list.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/text.json" + } + ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/numeric_rating.json b/src/main/resources/schema/ans/0.10.11/story_elements/numeric_rating.json new file mode 100644 index 00000000..531aecb1 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/numeric_rating.json @@ -0,0 +1,46 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/numeric_rating.json", + "description": "Indicates a numeric rating value", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "numeric_rating" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "numeric_rating": { + "description": "A number indicating the item's value.", + "type": "number" + }, + "min": { + "description": "The minimum possible value of rating", + "type": "number" + }, + "max": { + "description": "The maximum possible value of rating", + "type": "number" + }, + "units": { + "description": "A string describing the rating units", + "type": "string" + } + }, + "required": ["numeric_rating"] +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/quote.json b/src/main/resources/schema/ans/0.10.11/story_elements/quote.json new file mode 100644 index 00000000..b13f3233 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/quote.json @@ -0,0 +1,35 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/quote.json", + "description": "A blockquote content element, incompatible with the original blockquote: https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/blockquote.json", + "type": "object", + "additionalPropeties": false, + "properties": { + "type": { + "enum": [ "quote" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "content_elements": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json" + }, + "citation": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/text.json" + } + }, + "required": [ "content_elements" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/raw_html.json b/src/main/resources/schema/ans/0.10.11/story_elements/raw_html.json new file mode 100644 index 00000000..83ef60cf --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/raw_html.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/raw_html.json", + "description": "An html content element", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "raw_html" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "content": { + "description": "Any arbitrary chunk of HTML.", + "type": "string" + } + }, + "required": [ "type", "content" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/table.json b/src/main/resources/schema/ans/0.10.11/story_elements/table.json new file mode 100644 index 00000000..328eae56 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/table.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_element/table.json", + "description": "A data table content element", + "type": "object", + "additonalProperties": false, + "properties": { + "type": { + "enum": [ "table" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + + "header": { + "type": "array", + "description": "The header row of the table", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/text.json" + } + }, + "rows" : { + "type" : "array", + "description": "The data rows of the table", + "items": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/text.json" + } + } + } + }, + "required": [ "type", "rows" ] + +} diff --git a/src/main/resources/schema/ans/0.10.11/story_elements/text.json b/src/main/resources/schema/ans/0.10.11/story_elements/text.json new file mode 100644 index 00000000..99392b30 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_elements/text.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/text.json", + "description": "A textual content element", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ "text" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + "block_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_block_properties.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "content": { + "description": "The text of the paragraph.", + "type": "string" + } + }, + "required": [ "type", "content" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/story_operation.json b/src/main/resources/schema/ans/0.10.11/story_operation.json new file mode 100644 index 00000000..7401cda2 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/story_operation.json @@ -0,0 +1,75 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_operation.json", + "description": "An operation on a story", + "additionalProperties": false, + "type": "object", + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "story_operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "create", "update", "delete", "publish_edition", "unpublish_edition" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "display_date":{ + "description": "The date that is displayed with this story to readers.", + "type": "string", + "format": "date-time" + }, + "publish_date":{ + "description": "When the story was published.", + "type": "string", + "format": "date-time" + }, + "submit_date": { + "description": "When this operation was submitted to Content API. Used for latency checking.", + "type":"string", + "format": "date-time" + }, + "story_id": { + "type": "string", + "description": "The id of the story being operated" + }, + "revision_id": { + "type": "string", + "description": "The id of the specific revision that this operation occurs on, if any" + }, + "editions": { + "type": "array", + "description": "A list of identifiers of editions that are changed in this operation, if any", + "items": { + "type": "string" + } + }, + "branch": { + "type": "string", + "description": "The name of the branch within Story API that this operation occurs on, if any" + }, + "version": { + "type": "string", + "description": "The version of ANS this Story is written in" + }, + + "priority": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json" + }, + "app_name": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json" + }, + + "story": { + "description": "The story object being created/updated/deleted/published/unpublished", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story.json" + } + }, + "required": [ "type", "operation", "story_id" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json b/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json new file mode 100644 index 00000000..dc68135b --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json", + "title": "Has additional properties", + "description": "A grab-bag object for non-validatable data.", + "type": "object", + "additionalProperties": {} +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_address.json b/src/main/resources/schema/ans/0.10.11/traits/trait_address.json new file mode 100644 index 00000000..c624e4e7 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_address.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_address.json", + "title": "Address", + "description": "An Address following the convention of http://microformats.org/wiki/hcard", + "type": "object", + "additionalProperties": false, + "properties": { + "post_office_box": { + "type": "string" + }, + "extended_address": { + "type": "string" + }, + "street_address": { + "type": "string" + }, + "locality": { + "type": "string" + }, + "region": { + "type": "string" + }, + "postal_code": { + "type": "string" + }, + "country_name": { + "type": "string" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + }, + "dependencies": { + "post_office_box": ["street_address"], + "extended_address": ["street_address"] + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json b/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json new file mode 100644 index 00000000..9812983e --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json", + "title": "Alignment", + "type": "string", + "description": "A property used to determine horizontal positioning of a content element relative to the elements that immediately follow it in the element sequence.", + "enum": [ "left", "right", "center" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_alt_text.json b/src/main/resources/schema/ans/0.10.11/traits/trait_alt_text.json new file mode 100644 index 00000000..3c3bc063 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_alt_text.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alt_text.json", + "title": "Alt Text", + "description": "The direct ANS equivalent of the HTML 'alt' attribute. A description of the contents of an image for improved accessibility.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json b/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json new file mode 100644 index 00000000..3c9d5f5e --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json", + "title": "Application Name", + "description": "The name of the application that generated an operation. This is used by downstream consumers in conjunction with 'priority' to make decisions about optimization.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_auth.json b/src/main/resources/schema/ans/0.10.11/traits/trait_auth.json new file mode 100644 index 00000000..d5beda7e --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_auth.json @@ -0,0 +1,11 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_auth.json", + "title": "Auth", + "description": "Mapping of integers to tokens, where the integer represents the Signing Service's secret version, and token represents an object's public key for usage on the frontend.", + "type": "object", + "patternProperties": { + "^\\d+$": {"type": "string", "pattern": "^\\w{64}$"} + }, + "additionalProperties": false +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_block_properties.json b/src/main/resources/schema/ans/0.10.11/traits/trait_block_properties.json new file mode 100644 index 00000000..1e2e820b --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_block_properties.json @@ -0,0 +1,15 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_block_properties.json", + "title": "Block properties", + "description": "Block properties for style formatting content elements", + "type": "object", + "properties": { + "dropcap": { + "title": "Dropcap", + "description": "Style the first letter of the first word with a dropcap", + "type": "string", + "enum": ["letter"] + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json b/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json new file mode 100644 index 00000000..06b0f7dd --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json", + "title": "Canonical URL", + "description": "The relative URL to this document on the website specified by the `canonical_website` field. In the Arc ecosystem, this will be populated by the content api from the arc-canonical-url service if present based on the canonical_website. In conjunction with canonical_website, it can be used to determine the SEO canonical url or open graph url. In a multi-site context, this field may be different from the website_url field.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_website.json b/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_website.json new file mode 100644 index 00000000..58c15dae --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_website.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_website.json", + "title": "Canonical Website", + "description": "The _id of the website from which this document was originally authored. In conjunction with canonical_url, it can be used to determine the SEO canonical url or open graph url. In a multi-site context, this field may be different from the website field.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json b/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json new file mode 100644 index 00000000..47f141b8 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json", + "title": "Channel trait", + "description": "An optional list of output types for which this element should be visible", + "type": "array", + "items": { + "type": "string" + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json b/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json new file mode 100644 index 00000000..39a3913e --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json", + "title": "Comments", + "description": "Comment configuration data", + "type": "object", + "additionalProperties": {}, + "properties": { + "comments_period": { + "type": "integer", + "description": "How long (in days) after publish date until comments are closed." + }, + "allow_comments": { + "type": "boolean", + "description": "If false, commenting is disabled on this content." + }, + "display_comments": { + "type": "boolean", + "description": "If false, do not render comments on this content." + }, + "moderation_required": { + "type": "boolean", + "description": "If true, comments must be moderator-approved before being displayed." + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json b/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json new file mode 100644 index 00000000..90c9315c --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json @@ -0,0 +1,11 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json", + "title": "Aliases trait", + "description": "An list of alternate names that this content can be fetched by instead of id.", + "type": "array", + "items": { + "type": "string", + "pattern": "^([a-z])([a-z0-9-])*$" + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json b/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json new file mode 100644 index 00000000..4ff963f0 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json", + "title": "A collection of content.", + "description": "Holds attributes of an ANS collection - a common parent to story and gallery objects.", + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/content_element.json" + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json b/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json new file mode 100644 index 00000000..c20ed49b --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json @@ -0,0 +1,60 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json", + "title": "Content Restrictions", + "description": "Trait that applies contains the content restrictions of an ANS object.", + "type": "object", + "properties":{ + "content_code":{ + "type": "string", + "description": "The content restriction code/level/flag associated with the ANS object" + }, + "embargo": { + "description": "Embargo configuration to enforce publishing restrictions. Embargoed content must not go live.", + "type": "object", + "additionalProperties": false, + "properties": { + "active": { + "type": "boolean", + "description": "The boolean flag to indicate if the embargo is active or not. If this field is false, ignore the embargo." + }, + "end_time": { + "type": "string", + "format": "date-time", + "description": "An optional end time for the embargo to indicate when it ends. When it's not defined, it means the embargo keeps applying. The end time should be ignored if active flag is false." + }, + "description": { + "description": "An optional description for the embargo.", + "type": "string" + } + }, + "required": [ "active" ] + }, + "geo": { + "type": "object", + "description": "Geo-Restriction configuration that contains the restriction ids that this content should be associated with.", + "additionalProperties": false, + "properties": { + "restrictions": { + "type": "array", + "description": "An array containing the geo-restriction objects. Limited to a size of 1 for now.", + "minItems": 1, + "maxItems": 1, + "items": { + "type": "object", + "description": "An object specifying the _id of the restriction this content should be associated with.", + "additionalProperties": false, + "properties": { + "restriction_id": { + "type": "string", + "description": "The _id of the restriction that is stored in Global Settings." + } + }, + "required": ["restriction_id"] + } + } + }, + "required": ["restrictions"] + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_contributors.json b/src/main/resources/schema/ans/0.10.11/traits/trait_contributors.json new file mode 100644 index 00000000..0c1674bc --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_contributors.json @@ -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.11/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" + } + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json b/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json new file mode 100644 index 00000000..0ed6d0b5 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json", + "title": "Copyright information", + "description": "A copyright notice for the legal owner of this content. E.g., '© 1996-2018 The Washington Post.' Format may vary between organizations.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_corrections.json b/src/main/resources/schema/ans/0.10.11/traits/trait_corrections.json new file mode 100644 index 00000000..b2e49979 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_corrections.json @@ -0,0 +1,11 @@ + +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_corrections.json", + "title": "Corrections", + "description": "Trait that applies a list of corrections to a document.", + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/correction.json" + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json b/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json new file mode 100644 index 00000000..db8a8955 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json", + "title": "Created Date", + "description": "When the content was originally created (RFC3339-formatted). In the Arc ecosystem, this will be automatically generated for stories in the Story API.", + "type": "string", + "format": "date-time" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json b/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json new file mode 100644 index 00000000..61d4f82b --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json @@ -0,0 +1,59 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json", + "title": "Credit trait", + "type": "object", + "description": "A list of people and groups attributed to this content, keyed by type of contribution. In the Arc ecosystem, references in this list will be denormalized into author objects from the arc-author-service.", + "properties": { + "by": { + "title": "By", + "description": "The primary author(s) of this document. For a story, is is the writer or reporter. For an image, it is the photographer.", + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/author.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + } + ] + } + }, + + "photos_by": { + "title": "Photos by", + "description": "The photographer(s) of supplementary images included in this document, if it is a story. Note that if this document is an image, the photographer(s) should appear in the 'by' slot.", + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/author.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + } + ] + } + } + }, + + "patternProperties": { + "^[a-zA-Z0-9_]*": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/author.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + } + ] + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_date.json b/src/main/resources/schema/ans/0.10.11/traits/trait_date.json new file mode 100644 index 00000000..16cfc183 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_date.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_date.json", + "title": "Dated trait", + "description": "Trait that applies common publishing-related dates to a schema.", + "type": "object", + "properties": { + "created_date": { + "description": "When the content was originally created (RFC3339-formatted).", + "type": "string", + "format": "date-time" + }, + "last_updated_date": { + "description": "When the content was last updated (RFC3339-formatted).", + "type": "string", + "format": "date-time" + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_description.json b/src/main/resources/schema/ans/0.10.11/traits/trait_description.json new file mode 100644 index 00000000..ba886be5 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_description.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_description.json", + "title": "Description", + "description": "The descriptions, or blurbs, for the content.", + "type": "object", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/dictionary.json" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json b/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json new file mode 100644 index 00000000..cfcf34bf --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json", + "title": "Display_Date", + "description": "The RFC3339-formatted dated time of the most recent date the story was (re)displayed on a public site.", + "type": "string", + "format": "date-time" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json b/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json new file mode 100644 index 00000000..d9cc7d78 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json", + "title": "Distributor", + "description": "Information about a third party that provided this content from outside this document's hosted organization.", + "type": "object", + "oneOf": [{ + "properties": { + "name": { + "description": "The human-readable name of the distributor of this content. E.g., Reuters.", + "type": "string" + }, + + "category": { + "type": "string", + "enum": [ "staff", "wires", "freelance", "stock", "handout", "other" ], + "description": "The machine-readable category of how this content was produced. Use 'staff' if this content was produced by an employee of the organization who owns this document repository. (Multisite note: content produced within a single *organization*, but shared across multiple *websites* should still be considered 'staff.') Use ‘wires’ if this content was produced for another organization and shared with the one who owns this document repository. Use 'freelance' if this content was produced by an individual on behalf of the organization who owns this document repository. Use 'stock' if this content is stock media distributed directly from a stock media provider. Use 'handout' if this is content provided from a source for an article (usually promotional media distributed directly from a company). Use 'other' for all other cases." + }, + + "subcategory": { + "type": "string", + "description": "The machine-readable subcategory of how this content was produced. E.g., 'freelance - signed'. May vary between organizations." + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "mode": { + "type": "string", + "enum": ["custom"] + } + }, + + "additionalProperties": false + }, { + "properties": { + "reference_id": { + "description": "The ARC UUID of the distributor of this content. E.g., ABCDEFGHIJKLMNOPQRSTUVWXYZ.", + "type": "string" + }, + + "mode": { + "type": "string", + "enum": ["reference"] + } + }, + + "required": [ "reference_id", "mode" ], + + "additionalProperties": false + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_dynamic_items.json b/src/main/resources/schema/ans/0.10.11/traits/trait_dynamic_items.json new file mode 100644 index 00000000..3cee6b28 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_dynamic_items.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_dynamic_items.json", + "title": "Dynamic Items", + "description": "Dynamic items for Collection Query Backfill", + "type": "object", + "properties": { + "type": { + "title": "Type", + "description": "Section or Tag for query backfilling", + "type": "string", + "enum": ["sections", "tags"] + }, + "ids": { + "description": "A list of Section or Tag IDs that will be used to Backfill queries.", + "type": "array", + "maxItems": 100, + "items": { + "type": "string" + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_editable.json b/src/main/resources/schema/ans/0.10.11/traits/trait_editable.json new file mode 100644 index 00000000..2941f5ce --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_editable.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/traits/trait_editable.json", + "description": "Flag to indicate this content may edited in a story", + "type": "boolean", + "enum": [ true ] +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json b/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json new file mode 100644 index 00000000..19f665d5 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json", + "title": "Editor_Note", + "description": "Additional information to be displayed near the content from the editor.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json b/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json new file mode 100644 index 00000000..d033c889 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json", + "title": "First Publish Date", + "description": "When the story was first published.", + "type": "string", + "format": "date-time" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_focal_point.json b/src/main/resources/schema/ans/0.10.11/traits/trait_focal_point.json new file mode 100644 index 00000000..f2b08bcb --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_focal_point.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_focal_point.json", + "title": "Focal Point", + "description": "Coordinates representing the 'visual center' of an image. The X axis is horizontal line and the Y axis the vertical line, with 0,0 being the LEFT, TOP of the image.", + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "The coordinate point on the horizontal axis" + }, + "y": { + "type": "number", + "description": "The coordinate point on the vertical axis" + } + }, + "required": [ "x", "y" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_gallery_properties.json b/src/main/resources/schema/ans/0.10.11/traits/trait_gallery_properties.json new file mode 100644 index 00000000..fd348803 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_gallery_properties.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_gallery_properties.json", + "title": "Has gallery properties", + "description": "An object for overrides for images when images are used in a gallery. Example usage: Each image in a gallery may have the images own focal point overridden by the gallery.", + "type": "object", + "gallery_properties": { + "focal_point": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_focal_point.json" + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json b/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json new file mode 100644 index 00000000..4f16d00f --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json @@ -0,0 +1,11 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json", + "title": "Geo", + "description": "Latitidue and Longitude of the content", + "type": "object", + "properties": { + "latitude": { "type": "number" }, + "longitude": { "type": "number" } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json b/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json new file mode 100644 index 00000000..d7e1c4c1 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json", + "title": "Headlines", + "description": "The headline(s) or title for this content. The 'basic' key is required.", + "type": "object", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/dictionary.json" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_id.json b/src/main/resources/schema/ans/0.10.11/traits/trait_id.json new file mode 100644 index 00000000..60df9ba4 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_id.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json", + "title": "Globally Unique ID trait", + "description": "A globally unique identifier of the content in the ANS repository.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_image_type.json b/src/main/resources/schema/ans/0.10.11/traits/trait_image_type.json new file mode 100644 index 00000000..74c78ca0 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_image_type.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_image_type.json", + "title": "Image Type", + "description": "A more specific category for an image.", + "type": "string", + "category": { + "type": "string", + "enum": [ "photograph", "graphic", "illustration", "thumbnail" ], + "description": "The machine-readable enumeration of valid image types." + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_label.json b/src/main/resources/schema/ans/0.10.11/traits/trait_label.json new file mode 100644 index 00000000..085a4417 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_label.json @@ -0,0 +1,58 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_label.json", + "title": "Label", + "description": "What the Washington Post calls a Kicker", + "type": "object", + "additionalProperties": false, + "properties": { + "basic": { + "description": "The default label object for this piece of content.", + "type": "object", + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "description": "The text of this label." + }, + "url": { + "type": "string", + "description": "An optional destination url of this label." + }, + "display": { + "type": "boolean", + "description": "If false, this label should be hidden." + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + }, + "required": [ "text" ] + } + }, + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "description": "Additional user-defined keyed label objects.", + "type": "object", + "additionalProperties": false, + "properties": { + "text": { + "type": "string", + "description": "The text of this label." + }, + "url": { + "type": "string", + "description": "An optional destination url of this label." + }, + "display": { + "type": "boolean", + "description": "If false, this label should be hidden." + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + }, + "required": [ "text" ] + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json b/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json new file mode 100644 index 00000000..ce254c14 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json", + "title": "Last Updated Date", + "description": "When the content was last updated (RFC3339-formatted).", + "type": "string", + "format": "date-time" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json b/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json new file mode 100644 index 00000000..234a6640 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json", + "title": "Locale", + "description": "The primary language of the content. The value should follow IETF BCP47. (e.g. 'en', 'es-419', etc.) ", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_location.json b/src/main/resources/schema/ans/0.10.11/traits/trait_location.json new file mode 100644 index 00000000..e8b76c82 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_location.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_location.json", + "title": "Location related trait", + "description": "A description of the location, useful if a full address or lat/long specification is overkill.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json b/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json new file mode 100644 index 00000000..73bb15aa --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json @@ -0,0 +1,21 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json", + "title": "Owner information ", + "description": "Various unrelated fields that should be preserved for backwards-compatibility reasons. See also trait_source.", + "type": "object", + "properties": { + "id": { + "description": "The machine-readable unique identifier of the organization whose database this content is stored in. In Arc, this is equivalent to ARC_ORG_NAME.", + "type": "string" + }, + "name": { + "description": "Deprecated in 0.10.11. See `distributor.name`. (Formerly: The human-readable name of original producer of content. Distinguishes between Wires, Staff and other sources.)", + "type": "string" + }, + "sponsored": { + "description": "True if this content is advertorial or native advertising.", + "type": "boolean" + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json b/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json new file mode 100644 index 00000000..9b3eb469 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json", + "title": "Pitches", + "description": "Trait that represents a story's pitches. In the Arc ecosystem, this data is generated by WebSked.", + "type": "object", + "additionalProperties": false, + "properties": { + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "platform": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch.json" + }, + "description": "A list of the story's pitches to a platform." + }, + "publication": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch.json" + }, + "description": "A list of the story's pitches to a publication." + } + } +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json b/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json new file mode 100644 index 00000000..ac2cedfe --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json @@ -0,0 +1,108 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json", + "title": "Scheduling information", + "description": "Trait that applies planning information to a document or resource. In the Arc ecosystem, this data is generated by WebSked. Newsroom use only. All these fields should be available and editable in WebSked.", + "type": "object", + "additionalProperties": false, + "properties": { + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "websked_sort_date": { + "type": "string", + "format": "date-time", + "description": "Date to be used for chronological sorting in WebSked." + }, + "deadline_miss": { + "type": "integer", + "description": "The delta between the story's planned publish date and actual first publish time, in minutes." + }, + "internal_note": { + "type": "string", + "title": "Internal Note", + "description": "This note is used for shared communication inside the newsroom." + }, + "budget_line": { + "type": "string", + "title": "Budget Line", + "description": "Used for the newsroom to identify what the story is about, especially if a user is unfamiliar with the slug of a story and the headline or they do not yet exist. Newsroom use only." + }, + "scheduling": { + "description": "Scheduling information.", + "type": "object", + "additionalProperties": false, + "properties": { + "planned_publish_date": { + "type": "string", + "format": "date-time", + "description": "When the content is planned to be published." + }, + "scheduled_publish_date": { + "type": "string", + "format": "date-time", + "description": "When the content was first published." + }, + "will_have_gallery": { + "description": "Will this content have galleries?", + "type": "boolean" + }, + "will_have_graphic": { + "description": "Will this content have graphics?", + "type": "boolean" + }, + "will_have_image": { + "description": "Will this content have images?", + "type": "boolean" + }, + "will_have_video": { + "description": "Will this content have videos?", + "type": "boolean" + } + } + }, + "story_length": { + "description": "Story length information.", + "type": "object", + "additionalProperties": false, + "properties": { + "word_count_planned": { + "description": "The anticipated number of words in the story.", + "type": "integer" + }, + "word_count_actual": { + "description": "Current number of words.", + "type": "integer" + }, + "inch_count_planned": { + "description": "The anticipated length of the story in inches.", + "type": "integer" + }, + "inch_count_actual": { + "description": "The current length of the story in inches.", + "type": "integer" + }, + "line_count_planned": { + "description": "The anticipated length of the story in lines.", + "type": "integer" + }, + "line_count_actual": { + "description": "The current length of the story in lines.", + "type": "integer" + }, + "character_count_planned": { + "description": "The anticipated number of characters in the story.", + "type": "integer" + }, + "character_count_actual": { + "description": "The current number of characters in the story.", + "type": "integer" + }, + "character_encoding": { + "description": "The encoding used for counting characters in the story.", + "type": "string" + } + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch.json b/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch.json new file mode 100644 index 00000000..577d14e0 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch.json", + "title": "Platform pitch", + "description": "Trait that represents a pitch to a platform. In the Arc ecosystem, this data is generated by WebSked.", + "type": "object", + "additionalProperties": false, + "properties": { + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "platform_path": { + "type": "string", + "description": "The path of the platform that this pitch targets." + }, + "creation_event": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch_event.json" + }, + "latest_event": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch_event.json" + } + } +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch_event.json b/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch_event.json new file mode 100644 index 00000000..e2a1be87 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch_event.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_platform_pitch_event.json", + "title": "Platform pitch event", + "description": "Trait that represents an update event for a pitch to a platform. In the Arc ecosystem, this data is generated by WebSked.", + "type": "object", + "additionalProperties": false, + "properties": { + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "status": { + "type": "string", + "pattern": "^([a-z]|[ ])*$", + "description": "The current status of the pitch." + }, + "time": { + "type": "string", + "format": "date-time", + "description": "The time of this update." + }, + "user_id": { + "type": "string", + "description": "The ID of the user who made this update." + }, + "note": { + "type": "string", + "description": "Optional note associated with this update." + } + } +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json b/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json new file mode 100644 index 00000000..2696fab2 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json", + "title": "Priority", + "description": "The priority identifier of this operation. This is used by downstream consumers to make decisions about optimization. The value 'standard' indicates an operation generated from a UI or live update. The value 'ingestion' indicates an operation generated by a migration script or background import. Note that this represents a request for priority consideration from event-generating apps and downstream applications are not obligated to honor it.", + "type": "string", + "enum": [ "standard", "ingestion" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json b/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json new file mode 100644 index 00000000..47d3967e --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json", + "title": "Promo Items", + "type": "object", + "description": "Lists of promotional content to use when highlighting the story. In the Arc ecosystem, references in these lists will be denormalized.", + "properties": { + "basic": { + "oneOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/content.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/raw_html.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/custom_embed.json" + } + ] + } + }, + "patternProperties": { + ".*": { + "oneOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/content.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/raw_html.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/custom_embed.json" + } + ] + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch.json b/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch.json new file mode 100644 index 00000000..ff37c927 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch.json", + "title": "Publication pitch", + "description": "Trait that represents a pitch to a publication. In the Arc ecosystem, this data is generated by WebSked.", + "type": "object", + "additionalProperties": false, + "properties": { + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "publication_id": { + "type": "string", + "description": "The ID of the publication that this pitch targets." + }, + "creation_event": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch_event.json" + }, + "latest_event": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch_event.json" + } + } +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch_event.json b/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch_event.json new file mode 100644 index 00000000..8513b4a6 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch_event.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publication_pitch_event.json", + "title": "Publication pitch event", + "description": "Trait that represents an update event for a pitch to a publication. In the Arc ecosystem, this data is generated by WebSked.", + "type": "object", + "additionalProperties": false, + "properties": { + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "status": { + "type": "string", + "pattern": "^([a-z]|[ ])*$", + "description": "The current status of the pitch." + }, + "time": { + "type": "string", + "format": "date-time", + "description": "The time of this update." + }, + "user_id": { + "type": "string", + "description": "The ID of the user who made this update." + }, + "note": { + "type": "string", + "description": "Optional note associated with this update." + }, + "edition_id": { + "type": "string", + "description": "The ID of the publication edition that this pitch targets." + }, + "edition_time": { + "type": "string", + "format": "date-time", + "description": "The time of the publication edition that this pitch targets." + } + } +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json b/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json new file mode 100644 index 00000000..1b215a5c --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json", + "title": "Publish_Date", + "description": "When the story was published.", + "type": "string", + "format": "date-time" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_publishing.json b/src/main/resources/schema/ans/0.10.11/traits/trait_publishing.json new file mode 100644 index 00000000..e2f63949 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_publishing.json @@ -0,0 +1,162 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publishing.json", + "title": "Publishing Information", + "description": "The current published state of all editions of a content item as well as any scheduled publishing information. Machine-generated.", + "type": "object", + "additionalProperties": false, + + "properties": { + + "has_published_edition": { + "title": "Has Published Edition", + "description": "True if and only if at least one published edition exists for this content item.", + "type": "boolean" + }, + + "editions": { + "type": "object", + "description": "A map of edition names to the current publish state for that edition", + "properties": { + "default": { + "$ref": "#/definitions/edition" + } + }, + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "$ref": "#/definitions/edition" + } + }, + "required": [ "default" ] + }, + + "scheduled_operations": { + "title": "Scheduled Operations", + "description": "A map of lists of operations scheduled to be performed on this content item, sorted by operation type.", + "type": "object", + "additionalProperties": false, + "properties": { + "publish_edition": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "operation": { + "enum": [ "publish_edition" ] + }, + "operation_revision_id": { + "title": "Revision ID (Operation)", + "description": "The revision id to be published.", + "type": "string" + }, + "operation_edition": { + "title": "Edition Name (Operation)", + "description": "The name of the edition this operation will publish to.", + "type": "string" + }, + "operation_date": { + "title": "Operation Date", + "description": "The date that this operation will be performed.", + "type": "string" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + } + } + }, + "unpublish_edition": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "operation": { + "enum": [ "unpublish_edition" ] + }, + "operation_edition": { + "title": "Edition Name (Operation)", + "description": "The name of the edition this operation will publish to.", + "type": "string" + }, + "operation_date": { + "title": "Operation Date", + "description": "The date that this operation will be performed.", + "type": "string" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + } + } + } + } + }, + "additional_properties": { + "$ref" : "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + }, + + "required": [ "has_published_edition" ], + + "definitions": { + "edition": { + "additionalProperties": false, + "properties": { + + "edition_name": { + "title": "Edition Name", + "description": "The machine-readable identifier of this edition. This should be the same as the key in 'editions' for the edition object.", + "type": "string" + }, + + "edition_date": { + "title": "Edition Date", + "description": "The machine-generated date that this edition was last updated (i.e., that the content item was published/unpublished to a particular destination.)", + "type": "string", + "format": "date-time" + }, + + "edition_first_publish_date": { + "title": "First Published Date (Edition)", + "description": "The machine-generated date that this edition was created for the first time (i.e., that the content item was first published.)", + "type": "string", + "format": "date-time" + }, + + "edition_display_date": { + "title": "Display Date (Edition)", + "description": "The human-editable date that should be shown to readers as the 'date' for this content item. When viewing the story at this edition name directly, this will override whatever value is set for Display Date on the story directly. After an edition is created, subsequent updates to that edition will not change this date unless otherwise specified.", + "type": "string", + "format": "date-time" + }, + + "edition_publish_date": { + "title": "Publish Date (Edition)", + "description": "The machine-editable date that should be shown to readers as the 'publish date' for this content item. When viewing the story at this edition name directly, this will override whatever value is set for Publish Date on the story directly. Every time an edition is updated (i.e. a story is republished) this date will also be updated unless otherwise specified.", + "type": "string", + "format": "date-time" + }, + + "edition_published": { + "title": "Publish Status", + "description": "If false, this edition has been deleted/unpublished.", + "type": "boolean" + }, + + "edition_revision_id": { + "title": "Revision ID", + "description": "The id of the revision that this edition was created from. Omitted if unpublished.", + "type": "string" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + + }, + "required": [ "edition_published", "edition_date", "edition_name" ] + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json b/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json new file mode 100644 index 00000000..8c00c5b7 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json", + "title": "Related_Content", + "description": "Lists of content items or references this story is related to, arbitrarily keyed. In the Arc ecosystem, references in this object will be denormalized into the fully-inflated content objects they represent.", + "type": "object", + "properties": { + "redirect": { + "description": "An attached redirect. In Arc, when this content item is fetched by url, content api will instead return this redirect object with appropriate headers. In all other cases, this content should be treated normally.", + "type": "array", + "maxItems": 1, + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/redirect.json" + } + } + }, + "patternProperties": { + ".*": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/content.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story_elements/custom_embed.json" + } + ] + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_rendering_guides.json b/src/main/resources/schema/ans/0.10.11/traits/trait_rendering_guides.json new file mode 100644 index 00000000..142f11e0 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_rendering_guides.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_rendering_guides.json", + "title": "Rendering Guides", + "description": "Trait that provides suggestions for the rendering system.", + "type": "object", + "properties":{ + "preferred_method": { + "type": "array", + "description": "The preferred rendering method of the story. Blank means there is no preference. If the rendering application is aware of these other options, it can decide to either use one of them, render messaging to the viewer, or render the story as normal", + "items": { + "anyOf": [ + { + "enum": [ "website", "native" ], + "description": "Well-known values that describe the most common values. 'website' describes a traditional browser experience. 'native' describes a device specific application." + }, + { + "type": "string", + "description": "Other than the well-known values are allowed, and can be ignored if not recognized" + } + ] + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json b/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json new file mode 100644 index 00000000..1247e079 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json", + "title": "Revision", + "description": "Trait that applies revision information to a document. In the Arc ecosystem, many of these fields are populated in stories by the Story API.", + "type": "object", + "additionalProperties": false, + "properties": { + "revision_id": { + "description": "The unique id of this revision.", + "type": "string" + }, + "parent_id": { + "description": "The unique id of the revision that this revisions was branched from, or preceded it on the current branch.", + "type": "string" + }, + "branch": { + "description": "The name of the branch this revision was created on.", + "type": "string" + }, + "editions": { + "description": "A list of identifiers of editions that point to this revision.", + "type": "array", + "items": { + "type": "string" + } + }, + "user_id": { + "type": "string", + "description": "The unique user id of the person who created this revision." + }, + "published": { + "type": "boolean", + "description": "Whether or not this revision's parent story is published, in any form or place" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_seo_filename.json b/src/main/resources/schema/ans/0.10.11/traits/trait_seo_filename.json new file mode 100644 index 00000000..04472855 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_seo_filename.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_seo_filename.json", + "title": "SEO Filename", + "description": "Human-friendly filename used by PageBuilder & Resizer to improve image SEO scoring.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json b/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json new file mode 100644 index 00000000..0a93a214 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json", + "title": "Short_Url", + "description": "A url-shortened version of the canonical url.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json b/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json new file mode 100644 index 00000000..0d3fa27b --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json", + "title": "Slug", + "description": "A short reference name for internal editorial use", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_social.json b/src/main/resources/schema/ans/0.10.11/traits/trait_social.json new file mode 100644 index 00000000..5c037373 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_social.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_social.json", + "title": "Social Links", + "description": "Links to various social media", + "type": "array", + "items": { + "type": "object", + "properties": { + "site": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": {} + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_source.json b/src/main/resources/schema/ans/0.10.11/traits/trait_source.json new file mode 100644 index 00000000..1496677b --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_source.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_source.json", + "title": "Source", + "description": "Information about the original source and/or owner of this content", + "type": "object", + "additionalProperties": false, + "properties": { + "source_id": { + "description": "The id of this content in a foreign CMS.", + "type":"string" + }, + "source_type": { + "type": "string", + "description": "Deprecated in 0.10.11. See `distributor.category` and `distributor.subcategory`. (Formerly: The method used to enter this content. E.g. 'staff', 'wires'.)" + }, + "name": { + "type": "string", + "description": "Deprecated in 0.10.11. See `distributor.name`. (Formerly: The human-readable name of the organization who first produced this content. E.g., 'Reuters'.)" + }, + "system": { + "type": "string", + "description": "The software (CMS or editor) that was used to enter this content. E.g., 'wordpress', 'ellipsis'." + }, + "edit_url": { + "type": "string", + "description": "A link to edit this content in its source CMS." + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_status.json b/src/main/resources/schema/ans/0.10.11/traits/trait_status.json new file mode 100644 index 00000000..23646c16 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_status.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_status.json", + "title": "Status", + "description": "Optional field to story story workflow related status (e.g. published/embargoed/etc)", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json b/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json new file mode 100644 index 00000000..b1dff7a0 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json", + "title": "Sub-Headlines", + "description": "The sub-headline(s) for the content.", + "type": "object", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/dictionary.json" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json b/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json new file mode 100644 index 00000000..afbd3857 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json", + "title": "Subtype or Template", + "type": "string", + "description": "A user-defined categorization method to supplement type. In Arc, this field is reserved for organization-defined purposes, such as selecting the PageBuilder template that should be used to render a document." +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json b/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json new file mode 100644 index 00000000..3d68acd8 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json", + + "title": "Syndication", + "type": "object", + "description": "Key-boolean pair of syndication services where this article may go", + "patternProperties": { + ".*": { + "type": "boolean" + } + }, + "properties": { + "external_distribution": { + "description": "Necessary for fulfilling contractual agreements with third party clients", + "type": "boolean" + }, + "search": { + "description": "Necessary so that we can filter out all articles that editorial has deemed should not be discoverable via search", + "type": "boolean" + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json b/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json new file mode 100644 index 00000000..773d9d93 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json @@ -0,0 +1,223 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json", + "title": "Taxonomy", + "description": "Holds the collection of tags, categories, keywords, etc that describe content.", + "type": "object", + "additionalProperties": false, + "properties": { + "keywords": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/keyword.json" + }, + "description": "A list of keywords. In the Arc ecosystem, this list is populated by Clavis." + }, + "named_entities": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/named_entity.json" + }, + "description": "A list of named entities. In the Arc ecosystem, this list is populated by Clavis." + }, + "topics": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/topic.json" + }, + "description": "A list of topics. In the Arc ecosystem, this list is populated by Clavis." + }, + "auxiliaries": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/auxiliary.json" + }, + "description": "A list of auxiliaries. In the Arc ecosystem, this list is populated by Clavis." + }, + "tags": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/tag.json" + } + }, + "categories": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/category.json" + }, + "description": "A list of categories. Categories are overall, high-level classification of what the content is about." + }, + "content_topics": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/content_topic.json" + }, + "description": "A list of topics. Topics are the subjects that the content is about." + }, + "entities": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/entity.json" + }, + "description": "A list of entities. Entities are proper nouns, like people, places, and organizations." + }, + "custom_categories": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/custom_category.json" + }, + "description": "A list of custom categories. Categories are overall, high-level classification of what the content is about." + }, + "custom_entities": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/custom_entity.json" + }, + "description": "A list of custom entities. Entities are proper nouns, like people, places, and organizations." + }, + + "primary_site": { + "description": "Deprecated in 0.10.11. (See `primary_section` instead.) A primary site object or reference to one. In the Arc ecosystem, a reference here is denormalized into a site from the arc-site-service.", + "oneOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/site.json" + }, + { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + { + "properties": { + "referent": { + "properties": { + "type": { + "enum": [ "site" ] + } + } + } + } + } + ] + } + ] + }, + + "primary_section": { + "description": "A primary section object or reference to one. In the Arc ecosystem, a reference here is denormalized into a site from the arc-site-service.", + "oneOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/section.json" + }, + { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + { + "properties": { + "referent": { + "properties": { + "type": { + "enum": [ "section" ] + } + } + } + } + } + ] + } + ] + }, + + "sites": { + "description": "Deprecated in 0.10.11. (See `sections` instead.) A list of site objects or references to them. In the Arc ecosystem, references in this list are denormalized into sites from the arc-site-service. In a multi-site context, sites will be denormalized against an organization's default website only.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/site.json" + }, + { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + { + "properties": { + "referent": { + "properties": { + "type": { + "enum": [ "site" ] + } + } + } + } + } + ] + } + ] + } + }, + + "sections": { + "description": "A list of site objects or references to them. In the Arc ecosystem, references in this list are denormalized into sites from the arc-site-service. In a multi-site context, sites will be denormalized against an organization's default website only.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/section.json" + }, + { + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + { + "properties": { + "referent": { + "properties": { + "type": { + "enum": [ "section" ] + } + } + } + } + } + ] + } + ] + } + }, + + "seo_keywords": { + "type": "array", + "description": "A list of user-editable manually entered keywords for search purposes. In the Arc ecosystem, these can be generated and saved in source CMS systems, editors, etc.", + "items": { + "type": "string" + } + }, + "stock_symbols": { + "description": "A list of stock symbols of companies related to this content. In the Arc ecosystem, these can be generated and saved in source CMS systems, editors, etc.", + "type": "array", + "items": { + "type": "string" + } + }, + + "associated_tasks": { + "description": "A list of WebSked task IDs that this content was created or curated to satisfy.", + "type": "array", + "maxItems": 200, + "items": { + "type": "string", + "pattern": "^[0-9a-fA-F]{24}$" + } + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json b/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json new file mode 100644 index 00000000..aa4b8a7d --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json", + "title": "Tracking", + "description": "Tracking information, probably implementation-dependent", + "type": "object", + "additionalProperties": {} +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json b/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json new file mode 100644 index 00000000..596adcdf --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json @@ -0,0 +1,59 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json", + "title": "Vanity Credits trait", + "type": "object", + "description": "Similar to the credits trait, but to be used only when ANS is being directly rendered to readers natively. For legal and technical reasons, the `credits` trait is preferred when converting ANS into feeds or other distribution formats. However, when present, `vanity_credits` allows more sophisticated credits presentation to override the default without losing that original data.", + "properties": { + "by": { + "title": "By", + "description": "The primary author(s) of this document. For a story, is is the writer or reporter. For an image, it is the photographer.", + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/author.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + } + ] + } + }, + + "photos_by": { + "title": "Photos by", + "description": "The photographer(s) of supplementary images included in this document, if it is a story. Note that if this document is an image, the photographer(s) should appear in the 'by' slot.", + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/author.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + } + ] + } + } + }, + + "patternProperties": { + "^[a-zA-Z0-9_]*": { + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/author.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + } + ] + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_variations.json b/src/main/resources/schema/ans/0.10.11/traits/trait_variations.json new file mode 100644 index 00000000..7d8a6eff --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_variations.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "Holds variant content metadata, including content zone IDs for use within 'content_elements' and mapping from website IDs to variant IDs", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_variations.json", + "properties": { + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "content_zone_ids": { + "description": "A list of content zone IDs for use within the 'content_elements' array of the hub story", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "variants": { + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/variant.json", + "maxItems": 150 + }, + "type": "array" + } + }, + "title": "Variant content metadata", + "type": "object" +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_version.json b/src/main/resources/schema/ans/0.10.11/traits/trait_version.json new file mode 100644 index 00000000..5c671656 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_version.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json", + "title": "Describes the ANS version of this object", + "description": "The version of ANS that this object was serialized as, in major.minor.patch format. For top-level content objects, this is a required trait.", + "type": "string", + "enum": [ "0.10.11" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_voice_transcripts.json b/src/main/resources/schema/ans/0.10.11/traits/trait_voice_transcripts.json new file mode 100644 index 00000000..f4dd3da4 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_voice_transcripts.json @@ -0,0 +1,68 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_voice_transcripts.json", + "title": "Voice transcript(s) configuration and output.", + "description": "Any voice transcripts (e.g. text-to-speech or author-narrations) of the document requested by the user, along with configuration information and the resulting output.", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "type": { + "type": "string", + "enum": [ "voice_transcript" ] + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + + "options": { + "title": "Options (Requested)", + "description": "The transcription settings as requested by an end-user or API caller. These values should be displayed to editorial users in Arc apps.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "description": "If true, then a transcript of the appropriate options was requested for this document." + }, + "voice": { + "type": "string", + "title": "Voice ID", + "description": "The id of the 'voice' used to read aloud an audio transcript." + } + }, + "required": [ "enabled" ] + }, + + "options_used": { + "title": "Options (Used)", + "description": "The transcription settings that were used by the renderer to generate the final output. (If these differ from 'options' it may indicate an inability to render exactly as specified.) These values can be used when rendering to readers or external users.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "description": "If true, then a transcript of the appropriate options was generated for this document." + }, + "voice": { + "type": "string", + "title": "Voice ID", + "description": "The id of the 'voice' used to read aloud an audio transcript." + } + }, + "required": [ "enabled" ] + }, + + "output": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/audio.json" + } + }, + + "required": [ "options" ] + } + +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_website.json b/src/main/resources/schema/ans/0.10.11/traits/trait_website.json new file mode 100644 index 00000000..010e869e --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_website.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website.json", + "title": "Website", + "description": "The _id of the website on which this document exists. This field is only available in Content API. If different from canonical_website, then this document was originally sourced from the canonical_website. Generated at fetch time by Content API.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json b/src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json new file mode 100644 index 00000000..d9684a5b --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json", + "title": "Website URL", + "description": "The relative URL to this document on the website specified by the `website` field. In a multi-site context, this is the url that is typically queried on when fetching by URL. It may be different than canonical_url. Generated at fetch time by Content API.", + "type": "string" +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_websites.json b/src/main/resources/schema/ans/0.10.11/traits/trait_websites.json new file mode 100644 index 00000000..133e4313 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_websites.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_websites.json", + "title": "Websites Input", + "description": "Website-specific metadata for url generation for multi-site copies. These fields are not indexed in Content API.", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9_]*": { + "type": "object", + "additionalProperties": false, + "properties": { + "website_section": { + "anyOf": [ + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json" + }, + { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/section.json" + } + ] + }, + "website_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json" + } + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json b/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json new file mode 100644 index 00000000..c11d05c3 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json", + "title": "Workflow information", + "description": "Trait that applies workflow information to a document or resource. In the Arc ecosystem, this data is generated by WebSked.", + "type": "object", + "additionalProperties": false, + "properties": { + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "status_code": { + "type": "integer", + "minimum": 1, + "description": "Code indicating the story's current workflow status. This number should match the values configured in WebSked." + }, + "note": { + "type": "string", + "description": "This note will be used for any task automatically generated via WebSked task triggers." + } + } +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/url_operation.json b/src/main/resources/schema/ans/0.10.11/url_operation.json new file mode 100644 index 00000000..04dada95 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/url_operation.json @@ -0,0 +1,59 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/url_operation.json", + "description": "An operation on a url", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "url-operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "insert-redirect" ] + }, + "redirect_type": { + "description": "Identifies the redirect type this operation is.", + "type": "string", + "enum": [ "vanity", "story" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The id of the item being operated" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + + "priority": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json" + }, + "app_name": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json" + }, + + "original_url": { + "type": "string", + "description": "The original url that will trigger a redirect to the destination_url." + }, + "destination_url": { + "type": "string", + "description": "The new canonical_url of the story. The original_url will redirect to the destination_url." + } + }, + "required": [ "type", "operation", "id", "organization_id" ] + }] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/audio_stream.json b/src/main/resources/schema/ans/0.10.11/utils/audio_stream.json new file mode 100644 index 00000000..e621d5c5 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/audio_stream.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/audio_stream.json", + "title": "A stream of audio.", + "description": "Configuration for a piece of audio content, over a stream.", + "type": "object", + "properties": { + "filesize": { + "title": "File size", + "description": "The size of the audio file in bytes.", + "type": "number" + }, + "audio_codec": { + "title": "Audio Codec", + "description": "The codec used to encode the audio stream. (E.g. mpeg)", + "type": "string" + }, + "stream_type": { + "title": "Audio Stream Type", + "description": "The type of audio (e.g. mp3).", + "type": "string" + }, + "url": { + "title": "URL", + "description": "The file location of the stream.", + "type": "string", + "format": "uri" + }, + "bitrate": { + "title": "Bitrate", + "description": "The bitrate of the audio in kilobytes per second.", + "type": "number" + } + }, + "required": [ "url" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/author.json b/src/main/resources/schema/ans/0.10.11/utils/author.json new file mode 100644 index 00000000..3aee2ea4 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/author.json @@ -0,0 +1,212 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/author.json", + "title": "An author of a piece of content.", + "description": "Models attribution to an individual or group for contribution towards some content item. In the Arc ecosystem, these are stored in the arc-author-service.", + "type": "object", + "additionalProperties": false, + "properties": { + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + + "type": { + "description": "Indicates that this is an author", + "type": "string", + "enum": [ "author" ] + }, + + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + + "name": { + "title": "Name", + "description": "The full human name of contributor. See also byline, first_name, last_name, middle_name, suffix.", + "type": "string" + }, + + "image": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/image.json" + }, + + "url": { + "description": "A link to an author's landing page on the website, or a personal website.", + "type": "string" + }, + + "social_links": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_social.json" + }, + + "slug": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json" + }, + + "first_name": { + "title": "First Name", + "description": "The real first name of a human author.", + "type": "string" + }, + + "middle_name": { + "title": "Middle Name", + "description": "The real middle name of a human author.", + "type": "string" + }, + + "last_name": { + "title": "Last Name", + "description": "The real last name of a human author.", + "type": "string" + }, + + "suffix": { + "title": "Suffix", + "description": "The real suffix of a human author.", + "type": "string" + }, + + "byline": { + "title": "Byline", + "description": "The public-facing name, or nom-de-plume, name of the author.", + "type": "string" + }, + + "location": { + "title": "Location", + "description": "The city or locality that the author resides in or is primarily associated with.", + "type": "string" + }, + + "division": { + "title": "Division", + "description": "The desk or group that this author normally reports to. E.g., 'Politics' or 'Sports.'", + "type": "string" + }, + + "email": { + "title": "E-mail", + "description": "The professional email address of this author.", + "type": "string", + "format": "email" + }, + + "role": { + "title": "Role", + "description": "The organizational role or title of this author.", + "type": "string" + }, + + "expertise": { + "title": "Expertise", + "description": "A comma-delimited list of subjects the author in which the author has expertise.", + "type": "string" + }, + + "affiliation": { + "title": "Affiliation", + "description": "The name of an organization the author is affiliated with. E.g., The Washington Post, or George Mason University.", + "type": "string" + }, + + "languages": { + "title": "Languages", + "description": "A description of list of languages that the author is somewhat fluent in, excluding the native language of the parent publication, and identified in the language of the parent publication. E.g., Russian, Japanese, Greek.", + "type": "string" + }, + + "bio": { + "title": "Short Biography", + "description": "A one or two sentence description of the author.", + "type": "string" + }, + + "long_bio": { + "title": "Long Biography", + "description": "The full biography of the author.", + "type": "string" + }, + + "books": { + "title": "Books", + "description": "A list of books written by the author.", + "type": "array", + "items": { + "title": "Book", + "type": "object", + "additionalProperties": false, + "properties": { + "book_title": { + "title": "Title", + "description": "The book title.", + "type": "string" + }, + "book_url": { + "title": "URL", + "description": "A link to a page to purchase or learn more about the book.", + "type": "string" + } + } + } + }, + + "education": { + "title": "Education", + "description": "A list of schools that this author has graduated from.", + "type": "array", + "items": { + "title": "School", + "type": "object", + "additionalProperties": false, + "properties": { + "school_name": { + "title": "School Name", + "description": "The name of the school.", + "type": "string" + } + } + } + }, + + + "awards": { + "title": "Awards", + "description": "A list of awards the author has received.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "award_name": { + "title": "Award Name", + "description": "The name of the award.", + "type": "string" + } + } + } + }, + + "contributor": { + "type": "boolean", + "title": "Contributor", + "description": "If true, this author is an external contributor to the publication." + }, + + "org": { + "title": "Org", + "description": "Deprecated. In ANS 0.5.8 and prior versions, this field is populated with the 'location' field from Arc Author Service. New implementations should use the 'location' and 'affiliation' field. Content should be identical to 'location.'", + "type": "string" + }, + + "socialLinks": { + "description": "Deperecated. Included for backwards-compatibility. Content should be identical to social_links.", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_social.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + } + }, + "required": [ "type", "name" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/auxiliary.json b/src/main/resources/schema/ans/0.10.11/utils/auxiliary.json new file mode 100644 index 00000000..2fbc2d2c --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/auxiliary.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/auxiliary.json", + "title": "Auxiliary", + "description": "Models a auxiliary used in targeting a piece of content.", + "type": "object", + "required": ["_id", "uid"], + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "The unique identifier for this auxiliary." + }, + "name": { + "type": "string", + "description": "The general name for this auxiliary." + }, + "uid": { + "type": "string", + "description": "A short identifier for this auxiliary. Usually used in cases where a long form id cannot work." + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/category.json b/src/main/resources/schema/ans/0.10.11/utils/category.json new file mode 100644 index 00000000..a6eafe3d --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/category.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/category.json", + "title": "Category", + "description": "Models a category used in classifying a piece of content.", + "type": "object", + "required": ["_id", "name", "classifier"], + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "The unique ID for this category within its classifier." + }, + "classifier": { + "type": "string", + "description": "The unique identifier for the classifier that matched this category." + }, + "name": { + "type": "string", + "description": "The human readable label for this category." + }, + "score": { + "type": "number", + "description": "The score assigned to this category between 0 and 1, where 1 is an exact match." + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/content_element.json b/src/main/resources/schema/ans/0.10.11/utils/content_element.json new file mode 100644 index 00000000..3c6ba7ed --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/content_element.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/content_element.json", + "title": "An element that can be listed as part of content elements", + "description": "An item that conforms to this schema can be rendered in a sequence", + "type": "object", + "additionalProperties": {}, + "properties": { + "type": { + "type": "string" + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "gallery_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_gallery_properties.json" + } + }, + "required": [ "type" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/content_topic.json b/src/main/resources/schema/ans/0.10.11/utils/content_topic.json new file mode 100644 index 00000000..d9dc42ae --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/content_topic.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/content_topic.json", + "title": "Content Topic", + "description": "Models a keyword used in describing a piece of content.", + "type": "object", + "required": ["_id", "label", "score"], + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "The unique Wikidata ID for this topic." + }, + "label": { + "type": "string", + "description": "A topic this piece of content is about." + }, + "score": { + "type": "number", + "description": "The score assigned to this topic between 0 and 1, where 1 is an exact match." + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/custom_category.json b/src/main/resources/schema/ans/0.10.11/utils/custom_category.json new file mode 100644 index 00000000..95c91b05 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/custom_category.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/custom_category.json", + "title": "Custom Category", + "description": "Models a category used in classifying a piece of content.", + "type": "object", + "required": ["_id", "name", "classifier"], + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "The unique ID for this category within its classifier." + }, + "classifier": { + "type": "string", + "description": "The unique identifier for the classifier that matched this category." + }, + "name": { + "type": "string", + "description": "The human readable label for this category." + }, + "score": { + "type": "number", + "description": "The score assigned to this category between 0 and 1, where 1 is an exact match." + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/custom_entity.json b/src/main/resources/schema/ans/0.10.11/utils/custom_entity.json new file mode 100644 index 00000000..e8c088fe --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/custom_entity.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/custom_entity.json", + "title": "Custom Entity", + "description": "Models a named custom entity (i.e. name of a person, place, or organization) used in a piece of content.", + "type": "object", + "required": ["label"], + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "The unique ID for this entity." + }, + "custom_id": { + "type": "string", + "description": "A unique identifier for a custom-defined entity." + }, + "label": { + "type": "string", + "description": "The actual string of text that was identified as a named entity." + }, + "type": { + "type": "string", + "description": "A description of what the named entity is. E.g. 'organization', 'person', or 'location'." + }, + "score": { + "type": "number", + "description": "The score assigned to this entity between 0 and 1, where 1 is an exact match." + } + } + } diff --git a/src/main/resources/schema/ans/0.10.11/utils/dictionary.json b/src/main/resources/schema/ans/0.10.11/utils/dictionary.json new file mode 100644 index 00000000..de69730e --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/dictionary.json @@ -0,0 +1,15 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/dictionary.json", + "properties": { + "basic": { + "type": "string" + } + }, + "patternProperties": { + ".*": { + "type": "string" + } + }, + "required": [ "basic" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/entity.json b/src/main/resources/schema/ans/0.10.11/utils/entity.json new file mode 100644 index 00000000..f0f53097 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/entity.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/entity.json", + "title": "Entity", + "description": "Models a named entity (i.e. name of a person, place, or organization) used in a piece of content.", + "type": "object", + "required": ["label"], + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "The unique Wikidata ID for this entity." + }, + "custom_id": { + "type": "string", + "description": "A unique identifier for a custom-defined entity." + }, + "label": { + "type": "string", + "description": "The actual string of text that was identified as a named entity." + }, + "type": { + "type": "string", + "description": "A description of what the named entity is. E.g. 'organization', 'person', or 'location'." + }, + "score": { + "type": "number", + "description": "The score assigned to this entity between 0 and 1, where 1 is an exact match." + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/keyword.json b/src/main/resources/schema/ans/0.10.11/utils/keyword.json new file mode 100644 index 00000000..a165d9f4 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/keyword.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/keyword.json", + "title": "Keyword", + "description": "Models a keyword used in describing a piece of content.", + "type": "object", + "required": ["keyword", "score"], + "additionalProperties": false, + "properties": { + "keyword": { + "type": "string", + "description": "The keyword used to describe a piece of content" + }, + "score": { + "type": "number", + "description": "An arbitrary weighting to give the keyword" + }, + "tag": { + "type": "string", + "description": "The Part of Speech tag for this keyword." + }, + "frequency": { + "type": "integer", + "description": "An optional count of the frequency of the keyword as it appears in the content it describes" + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/named_entity.json b/src/main/resources/schema/ans/0.10.11/utils/named_entity.json new file mode 100644 index 00000000..6b5fb8e5 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/named_entity.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/named_entity.json", + "title": "Named Entity", + "description": "Models a named entity (i.e. name of a person, place, or organization) used in a piece of content.", + "type": "object", + "required": ["_id", "name", "type"], + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "A unique identifier for the concept of the named entity." + }, + "name": { + "type": "string", + "description": "The actual string of text that was identified as a named entity." + }, + "type": { + "type": "string", + "description": "A description of what the named entity is. E.g. 'organization', 'person', or 'location'." + }, + "score": { + "type": "number", + "decription": "An optional relevancy for this named entitiy." + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/oembed_response.json b/src/main/resources/schema/ans/0.10.11/utils/oembed_response.json new file mode 100644 index 00000000..219b6391 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/oembed_response.json @@ -0,0 +1,46 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/oembed_response.json", + "description": "An oembed object", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "oembed_response" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "raw_oembed": { + "type": "object", + "additionalProperties": {} + }, + + "referent": { + "type": "object", + "additionalProperties": false, + "properties": { + "id" : { + "description": "The id passed to the provider to retrieve an ANS document", + "type": "string" + }, + "provider": { + "description": "A URL that can resolve the id into an ANS element", + "type": "string" + } + }, + "required": [ "provider", "id" ] + } + + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/promo_reference.json b/src/main/resources/schema/ans/0.10.11/utils/promo_reference.json new file mode 100644 index 00000000..34ca2995 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/promo_reference.json @@ -0,0 +1,52 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/promo_reference.json", + "title": "Representation of a normalized element, intended to only partially denormalize.", + "description": "This represents a reference to external content that should be partially denormalized. Unlike a regular reference, it is used in a promotional context only and will never include the content_elements or related_content of the object being denormalized.", + "additionalProperties": false, + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ "promo_reference" ] + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "referent": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "description": "The type of the ANS document to denormalize.", + "type": "string", + "enum": [ "story", "gallery", "video" ] + }, + "id" : { + "description": "The id of the ANS document to denormalize.", + "type": "string" + }, + "referent_properties": { + "additionalProperties": {}, + "description": "An object for key-value pairs that should override the values of keys with the same name in the denormalized object", + "type": "object" + } + }, + "required": [ "id", "type" ] + } + }, + "required": [ "type", "referent" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/reference.json b/src/main/resources/schema/ans/0.10.11/utils/reference.json new file mode 100644 index 00000000..6e990fe2 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/reference.json @@ -0,0 +1,73 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/reference.json", + "title": "Representation of a normalized element", + "description": "This represents a reference to external content that should be denormalized", + "additionalProperties": false, + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ "reference" ] + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "referent": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "description": "The ANS type that the provider should return.", + "type": "string" + }, + "service": { + "description": "The type of interaction the provider expects. E.g., 'oembed'", + "type": "string" + }, + "id" : { + "description": "The id passed to the provider to retrieve an ANS document", + "type": "string" + }, + "provider": { + "description": "A URL that can resolve the id into an ANS element", + "type": "string" + }, + "website": { + "description": "The website which the referenced id belongs to. Currently supported only for sections.", + "type": "string" + }, + "referent_properties": { + "additionalProperties": {}, + "description": "An object for key-value pairs that should override the values of keys with the same name in the denormalized object", + "type": "object" + } + }, + "dependencies": { + "website": { + "properties": { + "type": { + "type": "string", + "enum": [ "section" ] + } + } + } + }, + "required": [ "id" ] + } + }, + "required": [ "type", "referent" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/section.json b/src/main/resources/schema/ans/0.10.11/utils/section.json new file mode 100644 index 00000000..3380cd03 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/section.json @@ -0,0 +1,56 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/section.json", + "title": "Section", + "description": "A hierarchical section in a taxonomy. In the Arc ecosystem, these are stored in the arc-site-service.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "section" ] + }, + "_id" : { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "_website": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "name": { + "description": "The name of this site", + "type": "string" + }, + "description": { + "description": "A short description or tagline about this site", + "type": "string" + }, + "path": { + "description": "The url path to this site", + "type": "string" + }, + "parent_id": { + "description": "The id of this section's parent section in the default hierarchy, if any.", + "type": "string" + }, + "parent": { + "description": "The id of this section's parent section in various commonly-used hierarchies, where available.", + "type": "object", + "properties": { + "default": { + "type": "string" + } + } + }, + + "primary": { + "description": "Is this the primary site?", + "type": "boolean" + } + }, + "required": [ "type", "version", "name" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/site.json b/src/main/resources/schema/ans/0.10.11/utils/site.json new file mode 100644 index 00000000..22771bca --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/site.json @@ -0,0 +1,43 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/site.json", + "title": "Site", + "description": "A hierarchical section or 'site' in a taxonomy. In the Arc ecosystem, these are stored in the arc-site-service.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "site" ] + }, + "_id" : { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "name": { + "description": "The name of this site", + "type": "string" + }, + "description": { + "description": "A short description or tagline about this site", + "type": "string" + }, + "path": { + "description": "The url path to this site", + "type": "string" + }, + "parent_id": { + "description": "The id of this section's parent site, if any", + "type": "string" + }, + "primary": { + "description": "Is this the primary site?", + "type": "boolean" + } + }, + "required": [ "type", "version", "name" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/story-summary.json b/src/main/resources/schema/ans/0.10.11/utils/story-summary.json new file mode 100644 index 00000000..dd1395aa --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/story-summary.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/story_summary.json", + "description": "A summary of a story", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "enum": [ "story" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "headlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + } + }, + + "required": [ "type", "_id", "canonical_url", "headlines", "revision", "last_updated_date" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/table_cell.json b/src/main/resources/schema/ans/0.10.11/utils/table_cell.json new file mode 100644 index 00000000..99664f55 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/table_cell.json @@ -0,0 +1,28 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/table_cell.json", + "description": "A single table cell.", + "type": "object", + + "properties": { + "type": { + "enum": [ "table_cell" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "content_elements": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_elements.json" + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/table_row.json b/src/main/resources/schema/ans/0.10.11/utils/table_row.json new file mode 100644 index 00000000..44cc1d9d --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/table_row.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/table_row.json", + "description": "A list of table cells, usually for use in a table row.", + "type": "object", + + "properties": { + "type": { + "enum": [ "table_row" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "cells": { + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/table_cell.json" + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/tag.json b/src/main/resources/schema/ans/0.10.11/utils/tag.json new file mode 100644 index 00000000..dcb6d3f4 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/tag.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/tag.json", + "title": "Tag", + "description": "Models a keyword used in describing a piece of content.", + "type": "object", + "additionalProperties": false, + "properties": { + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "type": { + "enum": [ "tag" ] + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "text": { + "type": "string", + "description": "The text of the tag as displayed to users." + }, + "description": { + "type": "string", + "description": "A more detailed description of the tag." + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "slug": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json" + } + }, + "required": [ "text" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/topic.json b/src/main/resources/schema/ans/0.10.11/utils/topic.json new file mode 100644 index 00000000..2c536d33 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/topic.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/topic.json", + "title": "Topic", + "description": "Models a topic used in describing a piece of content.", + "type": "object", + "required": ["_id", "score", "uid"], + "additionalProperties": false, + "properties": { + "_id": { + "type": "string", + "description": "The unique identifier for this topic." + }, + "name": { + "type": "string", + "description": "The general name for this topic." + }, + "score": { + "type": "number", + "description": "An arbitrary weighting to give the topic" + }, + "uid": { + "type": "string", + "description": "A short identifier for this topic. Usually used in cases where a long form id cannot work." + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/variant.json b/src/main/resources/schema/ans/0.10.11/utils/variant.json new file mode 100644 index 00000000..ccf18516 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/variant.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "additionalProperties": false, + "description": "Variant metadata describing its ID as well as the websites to which it is assigned", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/variant.json", + "properties": { + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json", + "description": "variant ID" + }, + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + "content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/story.json", + "description": "Variant content. Only 'story' data is supported, but this may expand in the future." + }, + "created_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + }, + "name": { + "description": "User-facing name for the variant", + "maxLength": 256, + "type": "string" + }, + "publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json" + }, + "published": { + "description": "Published status for the variant", + "type": "boolean" + }, + "type": { + "enum": ["variant"] + }, + "websites": { + "description": "websites assigned to this variant; individual values must be mutually exclusive with other variants", + "items": { + "type": "string" + }, + "maxItems": 50, + "type": "array" + } + }, + "required": [ + "type" + ], + "title": "Variant metadata", + "type": "object" +} \ No newline at end of file diff --git a/src/main/resources/schema/ans/0.10.11/utils/video_stream.json b/src/main/resources/schema/ans/0.10.11/utils/video_stream.json new file mode 100644 index 00000000..af3b65bb --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/video_stream.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/video_stream.json", + "title": "A stream of video.", + "description": "Configuration for a piece of video content, over a stream.", + "type": "object", + "properties": { + "height": { + "description": "The height of the video.", + "type": "number" + }, + "width": { + "description": "The width of the video.", + "type": "number" + }, + "filesize": { + "description": "The size of the video, in bytes.", + "type": "number" + }, + "audio_codec": { + "description": "The audio codec.", + "type": "string" + }, + "video_codec": { + "description": "The video codec.", + "type": "string" + }, + "stream_type": { + "description": "The type of video (e.g. mp4).", + "type": "string" + }, + "url": { + "description": "Where to get the stream from.", + "type": "string" + }, + "bitrate": { + "description": "The bitrate of the video", + "type": "number" + }, + "provider": { + "description": "The provider of the video.", + "type": "string" + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/utils/video_subtitle.json b/src/main/resources/schema/ans/0.10.11/utils/video_subtitle.json new file mode 100644 index 00000000..4fa3d55b --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/utils/video_subtitle.json @@ -0,0 +1,34 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/video_subtitle.json", + "title": "Video Subtitle Configuration Schema.", + "description": "Data about different subtitle encodings and confidences of auto-transcribed content.", + "type": "object", + "properties": { + "confidence": { + "type": "number", + "description": "How confident the transcriber (human or automated) is of the accuracy of the subtitles." + }, + "urls": { + "type": "array", + "items": { + "$ref": "#/definitions/subtitle_url" + }, + "description": "The locations of any subtitle transcriptions of the video." + } + }, + "definitions": { + "subtitle_url": { + "properties": { + "format": { + "type": "string", + "description": "The format of the subtitles (e.g. SRT, DFXP, WEB_VTT, etc)" + }, + "url" :{ + "type": "string", + "description": "The url of the subtitle stream." + } + } + } + } +} diff --git a/src/main/resources/schema/ans/0.10.11/video.json b/src/main/resources/schema/ans/0.10.11/video.json new file mode 100644 index 00000000..272137b5 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/video.json @@ -0,0 +1,202 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/video.json", + "title": "Video Content", + "description": "Holds attributes of an ANS video component. In the Arc ecosystem, these are stored in Goldfish.", + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ "video" ] + }, + "_id": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_id.json" + }, + "version": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_version.json" + }, + "subtype": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subtype.json" + }, + "channels": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_channel.json" + }, + "alignment": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_alignment.json" + }, + + "language": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_locale.json" + }, + "copyright": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_copyright.json" + }, + "canonical_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_url.json" + }, + "canonical_website": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_canonical_website.json" + }, + "website": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website.json" + }, + "website_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_website_url.json" + }, + "short_url": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_short_url.json" + }, + "created_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_created_date.json" + }, + "last_updated_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_last_updated_date.json" + }, + "publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_publish_date.json" + }, + "first_publish_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_first_publish_date.json" + }, + "display_date": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_display_date.json" + }, + "location": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_location.json" + }, + "geo": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_geo.json" + }, + "address": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_address.json" + }, + "editor_note": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_editor_note.json" + }, + "status": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_status.json" + }, + "headlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_headlines.json" + }, + "subheadlines": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_subheadlines.json" + }, + "description": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_description.json" + }, + "credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_credits.json" + }, + "vanity_credits": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_vanity_credits.json" + }, + "taxonomy": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_taxonomy.json" + }, + "promo_items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_promo_items.json" + }, + "related_content": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_related_content.json" + }, + "owner": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_owner.json" + }, + "planning": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_planning.json" + }, + "workflow": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_workflow.json" + }, + "pitches": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_pitches.json" + }, + "revision": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_revision.json" + }, + "syndication": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_syndication.json" + }, + "source": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_source.json" + }, + "distributor": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_distributor.json" + }, + "tracking": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_tracking.json" + }, + "comments": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_comments.json" + }, + "label": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_label.json" + }, + "slug": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_slug.json" + }, + "content_restrictions": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_restrictions.json" + }, + + "additional_properties": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_additional_properties.json" + }, + + "content_aliases": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_content_aliases.json" + }, + + "duration": { + "description": "Runtime of the video in milliseconds.", + "type": "number" + }, + "transcript": { + "description": "A transcript of the contents of the video.", + "type" : "string" + }, + "rating": { + "description": "A rating of the video, to be used for appropriate age/content warnings.", + "type": "string" + }, + "video_type": { + "description": "The type of video (e.g. clip, livestream, etc)", + "type": "string" + }, + "youtube_content_id": { + "description": "The YouTube ID of the content, if (re)hosted on youtube.com", + "type": "string" + }, + "streams": { + "description": "The different streams this video can play in.", + "type": "array", + "items": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/video_stream.json" + } + }, + "subtitles": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/utils/video_subtitle.json" + }, + "promo_image": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/image.json", + "description": "A promo/leader image to the video." + }, + "embed_html": { + "description": "An HTML snippet used to embed this video in another document. Used for oembed responses.", + "type": "string" + }, + "corrections": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_corrections.json" + }, + "websites": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_websites.json" + }, + "contributors": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_contributors.json" + } + + }, + "required": [ "type", "version" ] +} diff --git a/src/main/resources/schema/ans/0.10.11/video_operation.json b/src/main/resources/schema/ans/0.10.11/video_operation.json new file mode 100644 index 00000000..2359ab17 --- /dev/null +++ b/src/main/resources/schema/ans/0.10.11/video_operation.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/video_operation.json", + "description": "An operation on a video", + "type": "object", + "allOf": [{ + "properties": { + "type": { + "description": "Identifies this as an ANS operation", + "type": "string", + "enum": [ "video-operation" ] + }, + "operation": { + "type": "string", + "description": "The identifier of the operation being performed", + "enum": [ "insert", "update", "delete" ] + }, + "date": { + "description": "When the operation should be considered performed", + "type": "string", + "format": "date-time" + }, + "id": { + "type": "string", + "description": "The id of the item being operated" + }, + "organization_id": { + "type": "string", + "description": "The id of the organization" + }, + "version": { + "type": "string", + "description": "The version of ANS this item is written in" + }, + + "priority": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_priority.json" + }, + "app_name": { + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/traits/trait_app_name.json" + }, + + "body": { + "description": "The object being inserted/updated/deleted", + "$ref": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.10.11/video.json" + } + }, + "required": [ "type", "operation", "id", "organization_id" ] + }] +} diff --git a/tests/fixtures/schema/0.10.11/address-fixture-bad-po-box.json b/tests/fixtures/schema/0.10.11/address-fixture-bad-po-box.json new file mode 100644 index 00000000..7e41234d --- /dev/null +++ b/tests/fixtures/schema/0.10.11/address-fixture-bad-po-box.json @@ -0,0 +1,6 @@ +{ + "post_office_box": "defining this requires also defining street address, which we don't, so this should be bad JSON", + "locality": "Washington, D.C.", + "postal_code": "20002", + "country_name": "USA" +} diff --git a/tests/fixtures/schema/0.10.11/address-fixture-good.json b/tests/fixtures/schema/0.10.11/address-fixture-good.json new file mode 100644 index 00000000..bf41fa91 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/address-fixture-good.json @@ -0,0 +1,8 @@ +{ + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" +} diff --git a/tests/fixtures/schema/0.10.11/audio-fixture-bad-no-source.json b/tests/fixtures/schema/0.10.11/audio-fixture-bad-no-source.json new file mode 100644 index 00000000..5e652da6 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/audio-fixture-bad-no-source.json @@ -0,0 +1,4 @@ +{ + "type": "audio", + "version": "0.10.11" +} diff --git a/tests/fixtures/schema/0.10.11/audio-fixture-bad.json b/tests/fixtures/schema/0.10.11/audio-fixture-bad.json new file mode 100644 index 00000000..7ef81241 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/audio-fixture-bad.json @@ -0,0 +1,3 @@ +{ + "name": "vaughant" +} diff --git a/tests/fixtures/schema/0.10.11/audio-fixture-good-custom.json b/tests/fixtures/schema/0.10.11/audio-fixture-good-custom.json new file mode 100644 index 00000000..2300f0ff --- /dev/null +++ b/tests/fixtures/schema/0.10.11/audio-fixture-good-custom.json @@ -0,0 +1,12 @@ +{ + "_id": "0987654321", + "type": "audio", + "version": "0.10.11", + "source_url": "https://www.washingtonpost.com/audio/foo/bar.mp3", + "mimetype": "audio/mp3", + "additional_properties": { + "custom": { + "playerLogo": "https://www.washingtonpost.com/logo.png" + } + } +} diff --git a/tests/fixtures/schema/0.10.11/audio-fixture-good-settings.json b/tests/fixtures/schema/0.10.11/audio-fixture-good-settings.json new file mode 100644 index 00000000..f6d1ad8c --- /dev/null +++ b/tests/fixtures/schema/0.10.11/audio-fixture-good-settings.json @@ -0,0 +1,11 @@ +{ + "_id": "0987654321", + "type": "audio", + "version": "0.10.11", + "source_url": "https://www.washingtonpost.com/audio/foo/bar.mp3", + "mimetype": "audio/mp3", + "autoplay": true, + "controls": true, + "preload": false, + "loop": false +} diff --git a/tests/fixtures/schema/0.10.11/audio-fixture-good-streams.json b/tests/fixtures/schema/0.10.11/audio-fixture-good-streams.json new file mode 100644 index 00000000..867610a1 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/audio-fixture-good-streams.json @@ -0,0 +1,30 @@ +{ + "_id": "0987654321", + "type": "audio", + "version": "0.10.11", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.11", + "name": "John Jacob", + "byline": "John Jacob" + } + ] + }, + + "streams": [{ + "filesize": 3292344, + "audio_codec": "mpeg", + "stream_type": "mp3", + "bitrate": 96, + "url": "https://arc-content-api.s3.amazonaws.com/test-96.mp3" + }, { + "filesize": 4292341, + "audio_codec": "mpeg", + "stream_type": "mp3", + "bitrate": 128, + "url": "https://arc-content-api.s3.amazonaws.com/test-128.mp3" + }] + +} diff --git a/tests/fixtures/schema/0.10.11/audio-fixture-good.json b/tests/fixtures/schema/0.10.11/audio-fixture-good.json new file mode 100644 index 00000000..a0145f26 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/audio-fixture-good.json @@ -0,0 +1,20 @@ +{ + "_id": "0987654321", + "type": "audio", + "version": "0.10.11", + "source_url": "https://www.washingtonpost.com/audio/foo/bar.mp3", + "mimetype": "audio/mp3", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.11", + "name": "John Jacob", + "byline": "John Jacob" + } + ] + }, + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/author-fixture-good.json b/tests/fixtures/schema/0.10.11/author-fixture-good.json new file mode 100644 index 00000000..d0c4e45e --- /dev/null +++ b/tests/fixtures/schema/0.10.11/author-fixture-good.json @@ -0,0 +1,80 @@ +{ + "type": "author", + "version": "0.10.11", + "_id": "engelg", + "name": "Gregory Engel", + "image": { + "type": "image", + "version": "0.10.11", + "url": "https://img.washingtonpost.com/rf/image_1248x701/2010-2019/WashingtonPost/2017/11/08/Local/Images/vagovernorgop3.jpg?t=20170517a" + }, + "url": "http://www.washingtonpost.com", + "social_links": [ + { + "site": "facebook", + "url": "http://facebook.com/gregory.r.engel" + }, + { + "site": "reddit", + "url": "http://reddit.com/u/gregory.r.engel" + } + ], + "slug": "gregory-r-engel", + "first_name": "Gregory", + "middle_name": "R.", + "last_name": "Engel", + "suffix": "Jr.", + "byline": "Greg Engel", + "location": "Washington, D.C.", + "division": "Sports", + "email": "gregory.engel@washpost.com", + "role": "Content API Developer", + "expertise": "Baltimore, Soviet Cinema, Blue Seashells", + "affiliation": "The Washington Post", + "languages": "Russian", + "bio": "Gregory Engel is a developer for Arc Publishing at The Washington Post", + "long_bio": "Gregory Engel is a developer for Arc Publishing at The Washington Post. He has won numerous awards for his ten-part expose on breakfast cereal marshmallows in feudal Japan, including a Very Good Writer Award from Very Good Writer Magazine. He engages in online dicourse with his numerous fans and vociferous critics. His real name is 'Joe.'", + "books": [ + { + "book_title": "Ten Ways to Eat Ice Cream: A Human's Guide for the Intimidated", + "book_url": "http://icecreambook.com" + }, + { + "book_title": "If Only They Would Build It: The History of Turtle Fences in Medieval Wisconsin", + "book_url": "http://turtlefencebook.com" + }, + { + "book_title": "The Speckled Land (A George Irwin Mystery)", + "book_url": "http://georgeirwinmysteries.com" + } + ], + "education": [ + { + "school_name": "Oberlin College" + }, + { + "school_name": "International Language Institute" + } + ], + "awards": [ + { + "award_name": "A Very Good Writer Award" + }, + { + "award_name": "A Just-OK Writer Award" + } + ], + "contributor": false, + + "org": "Washington, D.C.", + "socialLinks": [ + { + "site": "facebook", + "url": "http://facebook.com/gregory.r.engel" + }, + { + "site": "reddit", + "url": "http://reddit.com/u/gregory.r.engel" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/auxiliary-fixture-bad-missing-uid.json b/tests/fixtures/schema/0.10.11/auxiliary-fixture-bad-missing-uid.json new file mode 100644 index 00000000..22e6b562 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/auxiliary-fixture-bad-missing-uid.json @@ -0,0 +1,4 @@ +{ + "id": "12345", + "name": "This should fail because it is missing the uid field." +} diff --git a/tests/fixtures/schema/0.10.11/auxiliary-fixture-good-optional-name.json b/tests/fixtures/schema/0.10.11/auxiliary-fixture-good-optional-name.json new file mode 100644 index 00000000..10ca88dc --- /dev/null +++ b/tests/fixtures/schema/0.10.11/auxiliary-fixture-good-optional-name.json @@ -0,0 +1,4 @@ +{ + "_id": "12345", + "uid": "1x9" +} diff --git a/tests/fixtures/schema/0.10.11/auxiliary-fixture-good.json b/tests/fixtures/schema/0.10.11/auxiliary-fixture-good.json new file mode 100644 index 00000000..7a77677f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/auxiliary-fixture-good.json @@ -0,0 +1,5 @@ +{ + "_id": "12345", + "name": "JPMorgan and Chase", + "uid": "1x9" +} diff --git a/tests/fixtures/schema/0.10.11/bq-fixture-bad.json b/tests/fixtures/schema/0.10.11/bq-fixture-bad.json new file mode 100644 index 00000000..7ef81241 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/bq-fixture-bad.json @@ -0,0 +1,3 @@ +{ + "name": "vaughant" +} diff --git a/tests/fixtures/schema/0.10.11/bq-fixture-good.json b/tests/fixtures/schema/0.10.11/bq-fixture-good.json new file mode 100644 index 00000000..bf740190 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/bq-fixture-good.json @@ -0,0 +1,6 @@ +{ + "_id": "49876543210", + "type": "blockquote", + "content": "Here's my html" + +} diff --git a/tests/fixtures/schema/0.10.11/code-fixture-good.json b/tests/fixtures/schema/0.10.11/code-fixture-good.json new file mode 100644 index 00000000..72eed35b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/code-fixture-good.json @@ -0,0 +1,7 @@ +{ + "_id": "0987654321", + "type": "code", + "content": "var x = \"foo\";\nconsole.log(\"foo\");", + "language": "javascript" + +} diff --git a/tests/fixtures/schema/0.10.11/collection-fixture-good.json b/tests/fixtures/schema/0.10.11/collection-fixture-good.json new file mode 100644 index 00000000..7a41bc55 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/collection-fixture-good.json @@ -0,0 +1,327 @@ +{ + "_id": "ZYXWVUTSRQPONMLKJIHGFEDCBA", + "type": "collection", + "version": "0.10.11", + "created_date": "2017-06-24T09:50:50.52Z", + "last_updated_date": "2017-06-24T09:50:50.52Z", + "channels": ["ios", "android"], + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2017-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "Copyright © 2018 Thomson Reuters.", + "canonical_url": "/news/dogs/man-bites-dog", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The Man Bites Dog collection", + "twitter": "Lots of Items about Man Biting Dog" + }, + "description": { + "basic": "A man bit a dog, and we have all the stories" + }, + "content_restrictions": { + "content_code": "green" + }, + "related_content": { + "basic": [ + { + "type": "reference", + "_id": "00001", + "channels": [ + "mobile" + ], + + "referent": { + "type": "story", + "id": "ABCDEFGHIJKLMNO", + "provider": "http://www.story.com/api", + "referent_properties":{ + "alt_headline": "An alternate headline" + } + } + } + ] + }, + "promo_items": { + "basic": { + "_id": "BBBBBBBBBBBBBBBBBBBBBBBBBB", + "type": "image", + "version": "0.10.11", + "created_date": "2017-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "tags": [ + { + "_id": "fred", + "text": "Fred", + "slug": "fred", + "description": "For all things Fred", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "writing", + "text": "Writing" + } + ], + "keywords": [ + { + "keyword": "Dog", + "score": 0.77, + "frequency": 2 + } + ], + "primary_section": { + "_id": "/news", + "_website": "washpost", + "type": "section", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news" + }, + "sections": [ + { + "_id": "/news", + "_website": "washpost", + "type": "section", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news" + }, + { + "_id": "/news/dogs", + "_website": "washpost", + "type": "section", + "version": "0.10.11", + "name": "Dogs", + "description": "For all your dog news", + "path": "/news/dogs", + "parent_id" : "/news", + "parent": { + "default": "/news" + }, + "additional_properties": { + "foo": "bar" + } + } + ], + "stock_symbols": [ "IBM", "INTL", "AMZN", "MRSFT" ], + "additional_properties": { + "more": "info" + } + }, + "label": { + "basic": { + "text": "The Kicker", + "url": "https://www.washingtonpost.com/kicker", + "display": true, + "additional_properties": { + "bar": "foo" + } + }, + "another_one": { + "text": "Another One" + } + }, + "publish_date": "2017-06-24T09:49:00.10Z", + "first_publish_date": "2017-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2017-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + + "planning": { + "scheduling": { + "planned_publish_date": "2017-06-24T09:49:00.10Z", + "scheduled_publish_date": "2017-06-24T09:49:00.10Z", + "will_have_gallery": true, + "will_have_graphic": false, + "will_have_image": true, + "will_have_video": false + }, + "story_length": { + "word_count_planned": 2400, + "word_count_actual": 3000, + "inch_count_planned": 6, + "inch_count_actual": 8, + "line_count_planned": 100, + "line_count_actual": 120 + } + }, + + "content_elements": [ + { + "type": "promo_reference", + "referent": { + "type": "story", + "id": "ABCDEFGHIJKLMNOPQRTUVWXYZ", + "referent_properties": { + "headlines": { + "basic": "HEADLINE OVERRIDE - Man Bites Dog!" + } + } + } + }, + { + "type": "promo_reference", + "referent": { + "type": "gallery", + "id": "DEFDEFGHIJKLMNOPQRTUVWXYZ", + "referent_properties": { + "headlines": { + "basic": "HEADLINE OVERRIDE - Pictures of Man Biting Dog!" + } + } + } + }, + { + "type": "promo_reference", + "referent": { + "type": "video", + "id": "GHIGHIGHIJKLMNOPQRTUVWXYZ", + "referent_properties": { + "headlines": { + "basic": "HEADLINE OVERRIDE - Man Bites Dog on Video!" + } + } + } + } + ], + + "corrections": [ + { + "type": "correction", + "correction_type": "clarification", + "text": "What I said before was not exactly true." + }, + { + "type": "correction", + "correction_type": "correction", + "text": "What I said before was false and not true." + } + ], + + "owner": { + "id": "washpost", + "name": "(deprecated)", + "sponsored": false + }, + + "source": { + "source_id": "1234-5678", + "source_type": "(deprecated)", + "name": "(deprecated)", + "system": "Methode", + "edit_url": "http://washpost.methode.com/foo/bar/1234-5678", + "additional_properties": { + "foo": "bar" + } + }, + + "distributor": { + "name": "Reuters", + "category": "wires", + "subcategory": "wires-reuters", + "additional_properties": { + "foo": "bar" + } + }, + + "syndication": { + "external_distribution": true, + "search": true + }, + + "comments": { + "comments_period": 14, + "allow_comments": true, + "display_comments": true, + "moderation_required": false, + + "additional_properties": { + "favorite_comment": "All work and no play makes Jack a dull boy." + } + }, + + "additional_properties": { + "foo": "bar" + }, + + "websites": { + "washpost": { + "website_section": { + "_id": "/news", + "_website": "washpost", + "type": "section", + "version": "0.10.11", + "name": "General News", + "path": "/news" + }, + "website_url": "/news/dogs/man-bites-dog" + } + }, + "canonical_website": "washpost", + "dynamic_items": { + "type": "sections", + "ids": ["/politics"] + }, + "content_aliases": [ "man-dog-bite-collection", "dog-collection-1" ] +} diff --git a/tests/fixtures/schema/0.10.11/content-fixture-good.json b/tests/fixtures/schema/0.10.11/content-fixture-good.json new file mode 100644 index 00000000..e927de95 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/content-fixture-good.json @@ -0,0 +1,29 @@ +{ + "_id": "unique ANS id", + "type": "content", + "created_date": "20.5.16-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "credits": [ + { + "name": "Bob Woodward", + "role": "Author", + "org": "The Washington Post" + } + ], + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "foo": "bar" +} diff --git a/tests/fixtures/schema/0.10.11/content-fixture-no-dates.json b/tests/fixtures/schema/0.10.11/content-fixture-no-dates.json new file mode 100644 index 00000000..226064a6 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/content-fixture-no-dates.json @@ -0,0 +1,26 @@ +{ + "_id": "unique ANS id", + "type": "content", + "credits": [ + { + "name": "Bob Woodward", + "role": "Author", + "org": "The Washington Post" + } + ], + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington, D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "foo": "bar" +} diff --git a/tests/fixtures/schema/0.10.11/content-operation-good.json b/tests/fixtures/schema/0.10.11/content-operation-good.json new file mode 100644 index 00000000..ffa29c01 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/content-operation-good.json @@ -0,0 +1,31 @@ +{ + "id" : "default_false_XYZ123", + "type": "insert-story", + "body" : { + "_id" : "XYZ123", + "version": "0.10.11", + "type" : "story", + "content_elements": [ + { + "type": "image", + "_id": "AB456" + } + ] + }, + "date" : "2016-04-02T12:02:00+00:00", + "submit_date" : "2016-04-02T12:02:01+00:00", + "operation" : "insert-story", + "organization_id" : "washpost", + "type" : "content-operation", + "published": false, + "created": false, + "branch": "default", + "version" : "0.10.11", + "trigger": { + "type": "image", + "id": "AB456", + "referent_update": true, + "priority": "standard", + "app_name": "ellipsis" + } +} diff --git a/tests/fixtures/schema/0.10.11/credit-fixture-bad-missing-name.json b/tests/fixtures/schema/0.10.11/credit-fixture-bad-missing-name.json new file mode 100644 index 00000000..fff2a5a4 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/credit-fixture-bad-missing-name.json @@ -0,0 +1,4 @@ +{ + "org": "The Washington Post", + "role": "Author" +} diff --git a/tests/fixtures/schema/0.10.11/credit-fixture-good.json b/tests/fixtures/schema/0.10.11/credit-fixture-good.json new file mode 100644 index 00000000..e5fc2d1e --- /dev/null +++ b/tests/fixtures/schema/0.10.11/credit-fixture-good.json @@ -0,0 +1,23 @@ +{ + "name": "John Q. Reporter", + "org": "The Washington Post", + "role": "Author", + "image": { + "_id": "unique ANS id", + "type": "image", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "description": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/custom_embed-fixture-bad-1.json b/tests/fixtures/schema/0.10.11/custom_embed-fixture-bad-1.json new file mode 100644 index 00000000..719148a8 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/custom_embed-fixture-bad-1.json @@ -0,0 +1,22 @@ +{ + "_id": "WXYZABCDEFGHIJKLMNOPQRSTUV", + "type": "custom_embed", + + "subtype": "my_custom_video", + "alignment": "left", + "channels": [ "web" ], + + "embed": { + "id": "12345", + "url": "https://my.custom.video.com/api/embed/", + "config": { + "referent": { + "type": "video", + "id": "12345", + "provider": "" + }, + "autoplay": true, + "startPos": 32 + } + } +} diff --git a/tests/fixtures/schema/0.10.11/custom_embed-fixture-bad-2.json b/tests/fixtures/schema/0.10.11/custom_embed-fixture-bad-2.json new file mode 100644 index 00000000..c26b9ccd --- /dev/null +++ b/tests/fixtures/schema/0.10.11/custom_embed-fixture-bad-2.json @@ -0,0 +1,15 @@ +{ + "_id": "WXYZABCDEFGHIJKLMNOPQRSTUV", + "type": "custom_embed", + + "subtype": "my_custom_video", + "alignment": "left", + "channels": [ "web" ], + + "embed": { + "config": { + "autoplay": true, + "startPos": 32 + } + } +} diff --git a/tests/fixtures/schema/0.10.11/custom_embed-fixture-good.json b/tests/fixtures/schema/0.10.11/custom_embed-fixture-good.json new file mode 100644 index 00000000..3a4896c9 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/custom_embed-fixture-good.json @@ -0,0 +1,17 @@ +{ + "_id": "WXYZABCDEFGHIJKLMNOPQRSTUV", + "type": "custom_embed", + + "subtype": "my_custom_video", + "alignment": "left", + "channels": [ "web" ], + + "embed": { + "id": "12345", + "url": "https://my.custom.video.com/api/embed/", + "config": { + "autoplay": true, + "startPos": 32 + } + } +} diff --git a/tests/fixtures/schema/0.10.11/divider-fixture-bad.json b/tests/fixtures/schema/0.10.11/divider-fixture-bad.json new file mode 100644 index 00000000..799a2020 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/divider-fixture-bad.json @@ -0,0 +1,4 @@ +{ + "type": "divider", + "content": "Foo" +} diff --git a/tests/fixtures/schema/0.10.11/element-group-fixture-good.json b/tests/fixtures/schema/0.10.11/element-group-fixture-good.json new file mode 100644 index 00000000..cd99612b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/element-group-fixture-good.json @@ -0,0 +1,13 @@ +{ + "type": "element_group", + "content_elements": [ + { + "type": "text", + "content": "Foo" + }, + { + "type": "text", + "content": "Bar" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/endorsement-fixture-bad-missing-prop.json b/tests/fixtures/schema/0.10.11/endorsement-fixture-bad-missing-prop.json new file mode 100644 index 00000000..bb97c91c --- /dev/null +++ b/tests/fixtures/schema/0.10.11/endorsement-fixture-bad-missing-prop.json @@ -0,0 +1,4 @@ +{ + "_id": "ABC456789ABC", + "type": "endorsement" +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/endorsement-fixture-bad-type-mismatch.json b/tests/fixtures/schema/0.10.11/endorsement-fixture-bad-type-mismatch.json new file mode 100644 index 00000000..23161e11 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/endorsement-fixture-bad-type-mismatch.json @@ -0,0 +1,5 @@ +{ + "_id": "ABC456789ABC", + "type": "endorsement", + "endorsement": 4.5 +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/endorsement-fixture-good.json b/tests/fixtures/schema/0.10.11/endorsement-fixture-good.json new file mode 100644 index 00000000..43287472 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/endorsement-fixture-good.json @@ -0,0 +1,5 @@ +{ + "_id": "ABC456789ABC", + "type": "endorsement", + "endorsement": "Don't Buy" +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/gallery-fixture-good-no-images.json b/tests/fixtures/schema/0.10.11/gallery-fixture-good-no-images.json new file mode 100644 index 00000000..0241f99d --- /dev/null +++ b/tests/fixtures/schema/0.10.11/gallery-fixture-good-no-images.json @@ -0,0 +1,19 @@ +{ + "_id" : "XYZABC1", + "additional_properties" : { + "version" : 0, + "coverPhoto" : null, + "published" : false + }, + "content_elements" : [ ], + "created_date" : "2016-04-02T12:02:00+00:00", + "description" : { + "basic" : "test gallery description 1" + }, + "headlines" : { + "basic" : "gallery galleryName 1" + }, + "last_updated_date" : "2016-04-02T12:02:00+00:00", + "type" : "gallery", + "version" : "0.10.11" +} diff --git a/tests/fixtures/schema/0.10.11/gallery-fixture-good.json b/tests/fixtures/schema/0.10.11/gallery-fixture-good.json new file mode 100644 index 00000000..36b17a75 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/gallery-fixture-good.json @@ -0,0 +1,41 @@ +{ + "_id" : "XYZABC1", + "additional_properties" : { + "version" : 0, + "coverPhoto" : null, + "published" : false + }, + "channels": ["web"], + "content_elements" : [ { + "_id" : "XYZABC2", + "additional_properties" : { + "originalUrl" : "", + "published" : false + }, + "type" : "image", + "url" : "", + "version" : "0.10.11" + }, { + "_id" : "XYZABC3", + "additional_properties" : { + "originalUrl" : "", + "published" : false + }, + "type" : "image", + "url" : "", + "version" : "0.10.11" + } ], + "created_date" : "2016-04-02T12:02:00+00:00", + "description" : { + "basic" : "test gallery description 1" + }, + "headlines" : { + "basic" : "gallery galleryName 1" + }, + "content_restrictions": { + "content_code": "green" + }, + "last_updated_date" : "2016-04-02T12:02:00+00:00", + "type" : "gallery", + "version" : "0.10.11" +} diff --git a/tests/fixtures/schema/0.10.11/gallery-operation-create.json b/tests/fixtures/schema/0.10.11/gallery-operation-create.json new file mode 100644 index 00000000..891101da --- /dev/null +++ b/tests/fixtures/schema/0.10.11/gallery-operation-create.json @@ -0,0 +1,79 @@ +{ + "_id" : "XYZABC1", + "body" : { + "_id" : "XYZABC2", + "additional_properties" : { + "version" : 0, + "coverPhoto" : null, + "published" : false + }, + "content_elements" : [ { + "additional_properties" : { + "galleryOrder" : 0, + "published" : true + }, + "caption" : "Caption 1", + "credits" : { + "by" : [ { + "name" : "Fake gallery photo 1", + "type" : "author" + } ] + }, + "height" : 300, + "type" : "image", + "url" : "http://path/to/image/1.jpg", + "version" : "0.10.11", + "width" : 200 + }, { + "additional_properties" : { + "galleryOrder" : 1, + "published" : false + }, + "caption" : "Caption 2", + "credits" : { + "by" : [ { + "name" : "Fake gallery photo 2", + "type" : "author" + } ] + }, + "height" : 300, + "type" : "image", + "url" : "http://path/to/image/2.jpg", + "version" : "0.10.11", + "width" : 200 + }, { + "additional_properties" : { + "galleryOrder" : 2, + "published" : false + }, + "caption" : "Caption 3", + "credits" : { + "by" : [ { + "name" : "Fake gallery photo 3", + "type" : "author" + } ] + }, + "height" : 300, + "type" : "image", + "url" : "http://path/to/image/3.jpg", + "version" : "0.10.11", + "width" : 200 + } ], + "description" : { + "basic" : "A fake gallery with 3 images used for testing." + }, + "headlines" : { + "basic" : "Gallery of Test Images" + }, + "type" : "gallery", + "version" : "0.10.11" + }, + "date" : "2016-04-02T12:02:00+00:00", + "submit_date" : "2016-04-02T12:02:01+00:00", + "operation" : "insert", + "organization_id" : "PW5TIZPZINHXBPNQTAJRSIS123", + "type" : "gallery-operation", + "version" : "0.10.11", + "priority": "standard", + "app_name": "anglerfish" +} diff --git a/tests/fixtures/schema/0.10.11/gallery-operation-delete.json b/tests/fixtures/schema/0.10.11/gallery-operation-delete.json new file mode 100644 index 00000000..ee8fe84d --- /dev/null +++ b/tests/fixtures/schema/0.10.11/gallery-operation-delete.json @@ -0,0 +1,10 @@ +{ + "_id" : "XYZABC1", + "date" : "2016-04-02T12:02:00+00:00", + "operation" : "delete", + "organization_id" : "PW5TIZPZINHXBPNQTAJRSIS123", + "type" : "gallery-operation", + "version" : "0.10.11", + "priority": "standard", + "app_name": "anglerfish" +} diff --git a/tests/fixtures/schema/0.10.11/gallery-operation-update.json b/tests/fixtures/schema/0.10.11/gallery-operation-update.json new file mode 100644 index 00000000..b33936d4 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/gallery-operation-update.json @@ -0,0 +1,79 @@ +{ + "_id" : "XYZABC1", + "body" : { + "_id" : "XYZABC2", + "additional_properties" : { + "version" : 0, + "coverPhoto" : null, + "published" : false + }, + "content_elements" : [ { + "additional_properties" : { + "galleryOrder" : 0, + "published" : true + }, + "caption" : "Caption 1", + "credits" : { + "by" : [ { + "name" : "Fake gallery photo 1", + "type" : "author" + } ] + }, + "height" : 300, + "type" : "image", + "url" : "http://path/to/image/1.jpg", + "version" : "0.10.11", + "width" : 200 + }, { + "additional_properties" : { + "galleryOrder" : 1, + "published" : false + }, + "caption" : "Caption 2", + "credits" : { + "by" : [ { + "name" : "Fake gallery photo 2", + "type" : "author" + } ] + }, + "height" : 300, + "type" : "image", + "url" : "http://path/to/image/2.jpg", + "version" : "0.10.11", + "width" : 200 + }, { + "additional_properties" : { + "galleryOrder" : 2, + "published" : false + }, + "caption" : "Caption 3", + "credits" : { + "by" : [ { + "name" : "Fake gallery photo 3", + "type" : "author" + } ] + }, + "height" : 300, + "type" : "image", + "url" : "http://path/to/image/3.jpg", + "version" : "0.10.11", + "width" : 200 + } ], + "description" : { + "basic" : "A fake gallery with 3 images used for testing." + }, + "headlines" : { + "basic" : "Gallery of Test Images" + }, + "type" : "gallery", + "version" : "0.10.11" + }, + "date" : "2016-04-02T12:02:00+00:00", + "operation" : "update", + "organization_id" : "PW5TIZPZINHXBPNQTAJRSIS123", + "type" : "gallery-operation", + "version" : "0.10.11", + "priority": "standard", + "app_name": "anglerfish" + +} diff --git a/tests/fixtures/schema/0.10.11/geo-fixture-bad-not-a-number.json b/tests/fixtures/schema/0.10.11/geo-fixture-bad-not-a-number.json new file mode 100644 index 00000000..6db94cfd --- /dev/null +++ b/tests/fixtures/schema/0.10.11/geo-fixture-bad-not-a-number.json @@ -0,0 +1,4 @@ +{ + "latitude": "38.9047 N", + "longitude": "77.0164 W" +} diff --git a/tests/fixtures/schema/0.10.11/geo-fixture-good.json b/tests/fixtures/schema/0.10.11/geo-fixture-good.json new file mode 100644 index 00000000..148acdbc --- /dev/null +++ b/tests/fixtures/schema/0.10.11/geo-fixture-good.json @@ -0,0 +1,4 @@ +{ + "latitude": 38.9047, + "longitude": -77.0164 +} diff --git a/tests/fixtures/schema/0.10.11/geo-restriction-fixture-bad-length.json b/tests/fixtures/schema/0.10.11/geo-restriction-fixture-bad-length.json new file mode 100644 index 00000000..431e9a77 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/geo-restriction-fixture-bad-length.json @@ -0,0 +1,10 @@ +{ + "geo": { + "restrictions": [{ + "restriction_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + }, + { + "restriction_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + }] + } +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-empty.json b/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-empty.json new file mode 100644 index 00000000..9bb05b2b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-empty.json @@ -0,0 +1,5 @@ +{ + "geo": { + "restrictions": [] + } +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-property.json b/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-property.json new file mode 100644 index 00000000..a34d61ce --- /dev/null +++ b/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-property.json @@ -0,0 +1,8 @@ +{ + "geo": { + "restrictions": [{ + "restriction_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "name": "A Geo-Restriction" + }] + } +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-type.json b/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-type.json new file mode 100644 index 00000000..964ca00e --- /dev/null +++ b/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-bad-type.json @@ -0,0 +1,7 @@ +{ + "geo": { + "restrictions": { + "restriction_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-good.json b/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-good.json new file mode 100644 index 00000000..f09e8722 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/geo-restrictions-fixture-good.json @@ -0,0 +1,7 @@ +{ + "geo": { + "restrictions": [{ + "restriction_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + }] + } +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/header-fixture-bad.json b/tests/fixtures/schema/0.10.11/header-fixture-bad.json new file mode 100644 index 00000000..dee2e077 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/header-fixture-bad.json @@ -0,0 +1,6 @@ +{ + "_id": "0987654321", + "type": "header", + "text": "A New Deal", + "level": 2 +} diff --git a/tests/fixtures/schema/0.10.11/header-fixture-good.json b/tests/fixtures/schema/0.10.11/header-fixture-good.json new file mode 100644 index 00000000..81bfca56 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/header-fixture-good.json @@ -0,0 +1,6 @@ +{ + "_id": "0987654321", + "type": "header", + "content": "A New Deal", + "level": 2 +} diff --git a/tests/fixtures/schema/0.10.11/image-fixture-bad-alignment.json b/tests/fixtures/schema/0.10.11/image-fixture-bad-alignment.json new file mode 100644 index 00000000..432da4fa --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-fixture-bad-alignment.json @@ -0,0 +1,5 @@ +{ + "type": "image", + "version": "0.10.11", + "alignment": "bottom" +} diff --git a/tests/fixtures/schema/0.10.11/image-fixture-bad-auth-format.json b/tests/fixtures/schema/0.10.11/image-fixture-bad-auth-format.json new file mode 100644 index 00000000..b56fb08d --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-fixture-bad-auth-format.json @@ -0,0 +1,67 @@ +{ + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "channels": ["web", "print"], + "created_date": "2015-06-25T09:50:50.52Z", + "auth": { + "1": "aaaaaaaaaaaaa" + }, + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "John Jacob", + "type": "author", + "version": "0.10.11" + } + ] + }, + "contributors": { + "created_by" : { + "user_id": "william.davis@washpost.com", + "display_name": "Tyler Davis" + } + }, + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "content_restrictions": { + "content_code": "green" + }, + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "alt_text": "Close-up of US Supreme Court Justice Antonin Scalia. His right hand is raised to emphasize his testimony.", + "subtitle": "Scalia tried to make the court a conservative stronghold. He failed.", + "width": 800, + "height": 640, + "licensable": true, + "taxonomy": { + "keywords": [ + { + "keyword": "Supreme Court", + "score": 0.003816102874901 + } + ] + }, + "image_type": "photograph", + "focal_point": { + "x": 460, + "y": 220 + }, + "seo_filename": "supreme-court-scalia-testimony", + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-null-value.json b/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-null-value.json new file mode 100644 index 00000000..4b0ab1e2 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-null-value.json @@ -0,0 +1,57 @@ +{ + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "channels": ["web", "print"], + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "John Jacob", + "type": "author", + "version": "0.10.11" + } + ] + }, + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "content_restrictions": { + "content_code": "green" + }, + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "alt_text": "Close-up of US Supreme Court Justice Antonin Scalia. His right hand is raised to emphasize his testimony.", + "subtitle": "Scalia tried to make the court a conservative stronghold. He failed.", + "width": 800, + "height": 640, + "licensable": true, + "taxonomy": { + "keywords": [ + { + "keyword": "Supreme Court", + "score": 0.003816102874901 + } + ] + }, + "image_type": "photograph", + "focal_point": { + "x": 460, + "y": null + }, + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-out-of-range.json b/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-out-of-range.json new file mode 100644 index 00000000..982405bd --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-out-of-range.json @@ -0,0 +1,57 @@ +{ + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "channels": ["web", "print"], + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "John Jacob", + "type": "author", + "version": "0.10.11" + } + ] + }, + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "content_restrictions": { + "content_code": "green" + }, + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "alt_text": "Close-up of US Supreme Court Justice Antonin Scalia. His right hand is raised to emphasize his testimony.", + "subtitle": "Scalia tried to make the court a conservative stronghold. He failed.", + "width": 800, + "height": 640, + "licensable": true, + "taxonomy": { + "keywords": [ + { + "keyword": "Supreme Court", + "score": 0.003816102874901 + } + ] + }, + "image_type": "photograph", + "focal_point": { + "x": 960, + "y": 850 + }, + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-text-value.json b/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-text-value.json new file mode 100644 index 00000000..06b87192 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-text-value.json @@ -0,0 +1,57 @@ +{ + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "channels": ["web", "print"], + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "John Jacob", + "type": "author", + "version": "0.10.11" + } + ] + }, + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "content_restrictions": { + "content_code": "green" + }, + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "alt_text": "Close-up of US Supreme Court Justice Antonin Scalia. His right hand is raised to emphasize his testimony.", + "subtitle": "Scalia tried to make the court a conservative stronghold. He failed.", + "width": 800, + "height": 640, + "licensable": true, + "taxonomy": { + "keywords": [ + { + "keyword": "Supreme Court", + "score": 0.003816102874901 + } + ] + }, + "image_type": "photograph", + "focal_point": { + "x": "460", + "y": "220" + }, + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-wrong-prop-name.json b/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-wrong-prop-name.json new file mode 100644 index 00000000..a500e387 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-fixture-bad-focal-point-wrong-prop-name.json @@ -0,0 +1,57 @@ +{ + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "channels": ["web", "print"], + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "John Jacob", + "type": "author", + "version": "0.10.11" + } + ] + }, + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "content_restrictions": { + "content_code": "green" + }, + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "alt_text": "Close-up of US Supreme Court Justice Antonin Scalia. His right hand is raised to emphasize his testimony.", + "subtitle": "Scalia tried to make the court a conservative stronghold. He failed.", + "width": 800, + "height": 640, + "licensable": true, + "taxonomy": { + "keywords": [ + { + "keyword": "Supreme Court", + "score": 0.003816102874901 + } + ] + }, + "image_type": "photograph", + "focal_point": { + "h": 460, + "v": 220 + }, + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/image-fixture-good-no-height-width.json b/tests/fixtures/schema/0.10.11/image-fixture-good-no-height-width.json new file mode 100644 index 00000000..3cb6cbc5 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-fixture-good-no-height-width.json @@ -0,0 +1,6 @@ +{ + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg" +} diff --git a/tests/fixtures/schema/0.10.11/image-fixture-good.json b/tests/fixtures/schema/0.10.11/image-fixture-good.json new file mode 100644 index 00000000..3caebfb5 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-fixture-good.json @@ -0,0 +1,67 @@ +{ + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "channels": ["web", "print"], + "created_date": "2015-06-25T09:50:50.52Z", + "auth": { + "1": "d63ebc8a0ef58bea24af72d169dc12681ad0efcb8c2282d8eddafc0a77df39e3" + }, + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "John Jacob", + "type": "author", + "version": "0.10.11" + } + ] + }, + "contributors": { + "created_by" : { + "user_id": "william.davis@washpost.com", + "display_name": "Tyler Davis" + } + }, + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "content_restrictions": { + "content_code": "green" + }, + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "alt_text": "Close-up of US Supreme Court Justice Antonin Scalia. His right hand is raised to emphasize his testimony.", + "subtitle": "Scalia tried to make the court a conservative stronghold. He failed.", + "width": 800, + "height": 640, + "licensable": true, + "taxonomy": { + "keywords": [ + { + "keyword": "Supreme Court", + "score": 0.003816102874901 + } + ] + }, + "image_type": "photograph", + "focal_point": { + "x": 460, + "y": 220 + }, + "seo_filename": "supreme-court-scalia-testimony", + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/image-operation-create.json b/tests/fixtures/schema/0.10.11/image-operation-create.json new file mode 100644 index 00000000..e14e97df --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-operation-create.json @@ -0,0 +1,42 @@ +{ + "_id" : "XYZ123", + "body" : { + "_id" : "XYZ123", + "additional_properties" : { + "galleries" : [ ], + "originalUrl" : "http://anglerfish/fake/url/", + "published" : false, + "version" : 0 + }, + "address" : { + "street_address" : "Gladsaxe Teen Club", + "locality" : "Gladsaxe", + "region" : "Egegaard Skole" + }, + "caption" : "A fake photo used for testing.", + "credits" : { + "by" : [ { + "name" : "Johnny Anonymous", + "byline": "Johnny Anonymous", + "type" : "author", + "version": "0.10.11" + } ] + }, + "height" : 600, + "licensable": false, + "subtitle" : "A test photo", + "type" : "image", + "url" : "http://anglerfish/fake/url/", + "version" : "0.10.11", + "width" : 400 + }, + "date" : "2016-04-02T12:02:00+00:00", + "submit_date" : "2016-04-02T12:02:01+00:00", + "operation" : "insert", + "organization_id" : "PW5TIZPZINHXBPNQTAJRSIS123", + "type" : "image-operation", + "version" : "0.10.11", + "priority": "standard", + "app_name": "anglerfish" + +} diff --git a/tests/fixtures/schema/0.10.11/image-operation-delete.json b/tests/fixtures/schema/0.10.11/image-operation-delete.json new file mode 100644 index 00000000..f0364561 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-operation-delete.json @@ -0,0 +1,10 @@ +{ + "_id" : "XYZ123", + "date" : "2016-04-02T12:02:00+00:00", + "operation" : "delete", + "organization_id" : "PW5TIZPZINHXBPNQTAJRSIS123", + "type" : "image-operation", + "version" : "0.10.11", + "priority": "standard", + "app_name": "anglerfish" +} diff --git a/tests/fixtures/schema/0.10.11/image-operation-update.json b/tests/fixtures/schema/0.10.11/image-operation-update.json new file mode 100644 index 00000000..3da94661 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/image-operation-update.json @@ -0,0 +1,40 @@ +{ + "_id" : "XYZ123", + "body" : { + "_id" : "XYZ123", + "additional_properties" : { + "galleries" : [ ], + "originalUrl" : "http://anglerfish/fake/url/", + "published" : false, + "version" : 0 + }, + "address" : { + "street_address" : "Gladsaxe Teen Club", + "locality" : "Gladsaxe", + "region" : "Egegaard Skole" + }, + "caption" : "A fake photo used for testing.", + "credits" : { + "by" : [ { + "name" : "Johnny Anonymous", + "byline": "Johnny Anonymous", + "type" : "author", + "version": "0.10.11" + } ] + }, + "height" : 600, + "licensable": true, + "subtitle" : "A test photo", + "type" : "image", + "url" : "http://anglerfish/fake/url/", + "version" : "0.10.11", + "width" : 400 + }, + "date" : "2016-04-02T12:02:00+00:00", + "operation" : "update", + "organization_id" : "PW5TIZPZINHXBPNQTAJRSIS123", + "type" : "image-operation", + "version" : "0.10.11", + "priority": "standard", + "app_name": "anglerfish" +} diff --git a/tests/fixtures/schema/0.10.11/interstitial-link-fixture-bad.json b/tests/fixtures/schema/0.10.11/interstitial-link-fixture-bad.json new file mode 100644 index 00000000..1b57b3cc --- /dev/null +++ b/tests/fixtures/schema/0.10.11/interstitial-link-fixture-bad.json @@ -0,0 +1,5 @@ +{ + "_id": "0987654321", + "type": "interstitial-link", + "text": "Can Clinton and Trump ride to big victories in next weeks Acela primary?" +} diff --git a/tests/fixtures/schema/0.10.11/interstitial-link-fixture-good-2.json b/tests/fixtures/schema/0.10.11/interstitial-link-fixture-good-2.json new file mode 100644 index 00000000..e14db1ac --- /dev/null +++ b/tests/fixtures/schema/0.10.11/interstitial-link-fixture-good-2.json @@ -0,0 +1,18 @@ +{ + "_id": "0987654321", + "type": "interstitial_link", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?", + "description": { + "type": "text", + "content": "Emboldened by dominant victories in New York, Hillary Clinton and Donald Trump plunged swiftly Wednesday into the next batch of primaries in five states along the Northeast Corridor, where they hope to bury or break their challengers for the Democratic and Republican presidential nominations." + }, + "image": { + "type": "reference", + "referent": { + "type": "image", + "id": "AAAAAFGHIJKLMNOPQRSTUVWXYZ", + "provider": "" + } + } +} diff --git a/tests/fixtures/schema/0.10.11/interstitial-link-fixture-good.json b/tests/fixtures/schema/0.10.11/interstitial-link-fixture-good.json new file mode 100644 index 00000000..10217be4 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/interstitial-link-fixture-good.json @@ -0,0 +1,6 @@ +{ + "_id": "0987654321", + "type": "interstitial_link", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?" +} diff --git a/tests/fixtures/schema/0.10.11/keyword-fixture-bad-missing-score.json b/tests/fixtures/schema/0.10.11/keyword-fixture-bad-missing-score.json new file mode 100644 index 00000000..5684fd3f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/keyword-fixture-bad-missing-score.json @@ -0,0 +1,4 @@ +{ + "keyword": "This should fail because it is missing the score field.", + "frequency": 5 +} diff --git a/tests/fixtures/schema/0.10.11/keyword-fixture-bad-numeric-frequency.json b/tests/fixtures/schema/0.10.11/keyword-fixture-bad-numeric-frequency.json new file mode 100644 index 00000000..70396930 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/keyword-fixture-bad-numeric-frequency.json @@ -0,0 +1,5 @@ +{ + "keyword": "This should fail because frequency is an integer, not a number", + "score": 0.6, + "frequency": 0.5 +} diff --git a/tests/fixtures/schema/0.10.11/keyword-fixture-bad-score-type.json b/tests/fixtures/schema/0.10.11/keyword-fixture-bad-score-type.json new file mode 100644 index 00000000..76498297 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/keyword-fixture-bad-score-type.json @@ -0,0 +1,5 @@ +{ + "keyword": "This should fail because score is a number, not a string.", + "score": "0.6", + "frequency": 5 +} diff --git a/tests/fixtures/schema/0.10.11/keyword-fixture-bad-tag-type.json b/tests/fixtures/schema/0.10.11/keyword-fixture-bad-tag-type.json new file mode 100644 index 00000000..8620f003 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/keyword-fixture-bad-tag-type.json @@ -0,0 +1,5 @@ +{ + "keyword": "This should fail because tag is a string, not a number", + "score": 0.6, + "tag": 1.25 +} diff --git a/tests/fixtures/schema/0.10.11/keyword-fixture-good.json b/tests/fixtures/schema/0.10.11/keyword-fixture-good.json new file mode 100644 index 00000000..3c0143b9 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/keyword-fixture-good.json @@ -0,0 +1,6 @@ +{ + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2, + "tag": "noun" +} diff --git a/tests/fixtures/schema/0.10.11/label-bad-arbitrary-properties.json b/tests/fixtures/schema/0.10.11/label-bad-arbitrary-properties.json new file mode 100644 index 00000000..299ddd84 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/label-bad-arbitrary-properties.json @@ -0,0 +1,6 @@ +{ + "basic": { + "text": "This label is invalid because it has extra properties defined below.", + "a": "b" + } +} diff --git a/tests/fixtures/schema/0.10.11/label-bad-field-name-with-dots.json b/tests/fixtures/schema/0.10.11/label-bad-field-name-with-dots.json new file mode 100644 index 00000000..5c3a22f4 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/label-bad-field-name-with-dots.json @@ -0,0 +1,5 @@ +{ + "basic.label": { + "text": "This is not valid because there is a dot in the field name." + } +} diff --git a/tests/fixtures/schema/0.10.11/label-good.json b/tests/fixtures/schema/0.10.11/label-good.json new file mode 100644 index 00000000..92051c7b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/label-good.json @@ -0,0 +1,13 @@ +{ + "basic": { + "text": "Breaking" + }, + "secondary": { + "text": "Recent", + "url": "/recent", + "display": true, + "additional_properties": { + "bar": "baz" + } + } +} diff --git a/tests/fixtures/schema/0.10.11/link-list-fixture-bad.json b/tests/fixtures/schema/0.10.11/link-list-fixture-bad.json new file mode 100644 index 00000000..14e1dcb0 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/link-list-fixture-bad.json @@ -0,0 +1,23 @@ +{ + "_id": "ABC", + "type": "link_list", + "subtype": "more-information", + "alignment": "right", + + "title": "Learn More", + "items": [ + { + "_id": "GHI", + "type": "interstitial_link", + "subtype": "skinny", + + "url": "https://www.washingtonpost.com", + "content": "See more from The Washington Post" + }, + + { + "_id": "XYZ", + "type": "other_type" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/link-list-fixture-good-all-text.json b/tests/fixtures/schema/0.10.11/link-list-fixture-good-all-text.json new file mode 100644 index 00000000..fffc8779 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/link-list-fixture-good-all-text.json @@ -0,0 +1,19 @@ +{ + "_id": "ABC", + "type": "link_list", + "subtype": "more-information", + "alignment": "right", + "title": "Learn More", + "items": [ + { + "_id": "XYY", + "type": "text", + "content": "

This does belong here

" + }, + { + "_id": "XYZ", + "type": "text", + "content": "

This belongs here too

" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/link-list-fixture-good-text.json b/tests/fixtures/schema/0.10.11/link-list-fixture-good-text.json new file mode 100644 index 00000000..b87b1de3 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/link-list-fixture-good-text.json @@ -0,0 +1,21 @@ +{ + "_id": "ABC", + "type": "link_list", + "subtype": "more-information", + "alignment": "right", + "title": "Learn More", + "items": [ + { + "_id": "GHI", + "type": "interstitial_link", + "subtype": "skinny", + "url": "https://www.washingtonpost.com", + "content": "See more from The Washington Post" + }, + { + "_id": "XYZ", + "type": "text", + "content": "

This does belong here

" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/link-list-fixture-good.json b/tests/fixtures/schema/0.10.11/link-list-fixture-good.json new file mode 100644 index 00000000..a6e7955f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/link-list-fixture-good.json @@ -0,0 +1,38 @@ +{ + "_id": "ABC", + "type": "link_list", + "subtype": "more-information", + "alignment": "right", + + "title": "Learn More", + "items": [ + { + "_id": "DEF", + "type": "interstitial_link", + "subtype": "highlight", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?", + "description": { + "type": "text", + "content": "Emboldened by dominant victories in New York, Hillary Clinton and Donald Trump plunged swiftly Wednesday into the next batch of primaries in five states along the Northeast Corridor, where they hope to bury or break their challengers for the Democratic and Republican presidential nominations." + }, + "image": { + "type": "reference", + "referent": { + "type": "image", + "id": "AAAAAFGHIJKLMNOPQRSTUVWXYZ", + "provider": "" + } + } + }, + + { + "_id": "GHI", + "type": "interstitial_link", + "subtype": "skinny", + + "url": "https://www.washingtonpost.com", + "content": "See more from The Washington Post" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/media-fixture-good.json b/tests/fixtures/schema/0.10.11/media-fixture-good.json new file mode 100644 index 00000000..2a6812aa --- /dev/null +++ b/tests/fixtures/schema/0.10.11/media-fixture-good.json @@ -0,0 +1,13 @@ +{ + "_id": "unique ANS id", + "type": "media", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": [ + { + "name": "Ansel Adams", + "role": "Photographer" + } + ], + "url": "https://img.washingtonpost.com/rw/2010-2019/WashingtonPost/2015/06/23/Local/Images/FXSuit__4671435088890.jpg?uuid=y2-J-hngEeW-2BCT7lja0A", + "title": "Tiffany M. Ingham (Maj. Dale Greer/Kentucky Air National Guard)" +} diff --git a/tests/fixtures/schema/0.10.11/named-entity-fixture-bad-missing-id.json b/tests/fixtures/schema/0.10.11/named-entity-fixture-bad-missing-id.json new file mode 100644 index 00000000..d05901b4 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/named-entity-fixture-bad-missing-id.json @@ -0,0 +1,4 @@ +{ + "name": "JPMorgan Chase", + "type": "organization" +} diff --git a/tests/fixtures/schema/0.10.11/named-entity-fixture-good-missing-score.json b/tests/fixtures/schema/0.10.11/named-entity-fixture-good-missing-score.json new file mode 100644 index 00000000..cb71a883 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/named-entity-fixture-good-missing-score.json @@ -0,0 +1,5 @@ +{ + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization" +} diff --git a/tests/fixtures/schema/0.10.11/named-entity-fixture-good.json b/tests/fixtures/schema/0.10.11/named-entity-fixture-good.json new file mode 100644 index 00000000..062ab79b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/named-entity-fixture-good.json @@ -0,0 +1,6 @@ +{ + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization", + "score": 0.9 +} diff --git a/tests/fixtures/schema/0.10.11/numeric-rating-fixture-bad.json b/tests/fixtures/schema/0.10.11/numeric-rating-fixture-bad.json new file mode 100644 index 00000000..ff0cbcd7 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/numeric-rating-fixture-bad.json @@ -0,0 +1,7 @@ +{ + "_id": "ABC4567", + "type": "numeric_rating", + "min": 0, + "max": 5, + "units": "stars" +} diff --git a/tests/fixtures/schema/0.10.11/numeric-rating-fixture-good-only-rating.json b/tests/fixtures/schema/0.10.11/numeric-rating-fixture-good-only-rating.json new file mode 100644 index 00000000..8af19abd --- /dev/null +++ b/tests/fixtures/schema/0.10.11/numeric-rating-fixture-good-only-rating.json @@ -0,0 +1,5 @@ +{ + "_id": "ABC4567", + "type": "numeric_rating", + "numeric_rating": 2.5 +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/numeric-rating-fixture-good.json b/tests/fixtures/schema/0.10.11/numeric-rating-fixture-good.json new file mode 100644 index 00000000..60e855d6 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/numeric-rating-fixture-good.json @@ -0,0 +1,8 @@ +{ + "_id": "ABC4567", + "type": "numeric_rating", + "numeric_rating": 2.5, + "min": 0, + "max": 5, + "units": "stars" +} diff --git a/tests/fixtures/schema/0.10.11/oembed-response-fixture-good.json b/tests/fixtures/schema/0.10.11/oembed-response-fixture-good.json new file mode 100644 index 00000000..ce1364ee --- /dev/null +++ b/tests/fixtures/schema/0.10.11/oembed-response-fixture-good.json @@ -0,0 +1,28 @@ +{ + "_id": "AAAAAAAAAAAAAAAAAAAA", + "type": "oembed_response", + "subtype": "", + "channels": [], + "additional_properties": { + "foo": "bar" + }, + + "raw_oembed": { + "url": "https:\/\/twitter.com\/pathfinderSport\/status\/1234567890", + "author_name":"Pathfinder Sports", + "author_url":"https:\/\/twitter.com\/pathfinderSport", + "html":"\u003Cblockquote class=\"twitter-tweet\"\u003E\u003Cp lang=\"el\" dir=\"ltr\"\u003EΑρσεναλ - Σάντερλαντ: (X) 0-0 τελικό\u003C\/p\u003E— Pathfinder Sports (@pathfinderSport) \u003Ca href=\"https:\/\/twitter.com\/pathfinderSport\/status\/1234567890\"\u003EFebruary 21, 2009\u003C\/a\u003E\u003C\/blockquote\u003E\n\u003Cscript async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"\u003E\u003C\/script\u003E", + "width":550, + "height":null, + "type":"rich", + "cache_age":"3153600000", + "provider_name":"Twitter", + "provider_url":"https:\/\/twitter.com", + "version":"1.0" + }, + + "referent": { + "provider": "https://api.twitter.com/1.1/statuses/oembed.json", + "id": "1234567890" + } +} diff --git a/tests/fixtures/schema/0.10.11/operation-create.json b/tests/fixtures/schema/0.10.11/operation-create.json new file mode 100644 index 00000000..6995bccf --- /dev/null +++ b/tests/fixtures/schema/0.10.11/operation-create.json @@ -0,0 +1,35 @@ +{ + "type": "story_operation", + "operation": "create", + "date": "2015-06-25T09:50:50.52Z", + "story_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "revision_id": "1A", + "branch": "default", + "version": "0.10.11", + "priority": "standard", + "app_name": "ellipsis", + + "story": { + "_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "version": "0.10.11", + "type": "story", + "created_date": "2015-07-02T09:50:10.52Z", + "last_updated_date": "2015-07-02T09:10:50.52Z", + "headlines": { + "basic": "Tiny house, big benefits:\u2009Freedom from a mortgage and worries \u2014 and stuff" + }, + "description": { + "basic": "Tiny house, big benefits:\u2009Freedom from a mortgage and worries \u2014 and stuff" + }, + "content_elements": [ + { + "type": "text", + "content": "MY ONE CENT", + "_id": "D2349ABC88A9A" + } + ], + "revision": { + "revision_id": "1A" + } + } +} diff --git a/tests/fixtures/schema/0.10.11/operation-delete.json b/tests/fixtures/schema/0.10.11/operation-delete.json new file mode 100644 index 00000000..88eaa1c1 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/operation-delete.json @@ -0,0 +1,12 @@ +{ + "type": "story_operation", + "operation": "delete", + "date": "2015-06-25T09:50:50.52Z", + "story_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "revision_id": "2A", + "branch": "default", + "version": "0.10.11", + "priority": "standard", + "app_name": "ellipsis" + +} diff --git a/tests/fixtures/schema/0.10.11/operation-publish-edition.json b/tests/fixtures/schema/0.10.11/operation-publish-edition.json new file mode 100644 index 00000000..4748fb96 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/operation-publish-edition.json @@ -0,0 +1,37 @@ +{ + "type": "story_operation", + "operation": "publish_edition", + "date": "2015-06-25T09:50:50.52Z", + "story_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "revision_id": "2A", + "branch": "default", + "version": "0.10.11", + "priority": "standard", + "app_name": "ellipsis", + "editions": [ "web" ], + "story": { + "_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "version": "0.10.11", + "type": "story", + "created_date": "2015-07-02T09:50:50.52Z", + "last_updated_date": "2015-07-02T09:50:50.52Z", + "headlines": { + "basic": "Tiny house, big benefits:\u2009Freedom from a mortgage and worries \u2014 and stuff" + }, + "description": { + "basic": "Tiny house, big benefits:\u2009Freedom from a mortgage and worries \u2014 and stuff" + }, + "content_elements": [ + { + "type": "text", + + "content": "MY TWO CENTS", + "_id": "D2349ABC88A9A" + } + ], + "revision": { + "revision_id": "2A", + "parent_id": "1A" + } + } +} diff --git a/tests/fixtures/schema/0.10.11/operation-unpublish-edition.json b/tests/fixtures/schema/0.10.11/operation-unpublish-edition.json new file mode 100644 index 00000000..39273aa4 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/operation-unpublish-edition.json @@ -0,0 +1,13 @@ +{ + "type": "story_operation", + "operation": "unpublish_edition", + "date": "2015-06-25T09:50:50.52Z", + "story_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "revision_id": "2A", + "branch": "default", + "version": "0.10.11", + "priority": "standard", + "app_name": "ellipsis", + + "editions": [ "web" ] +} diff --git a/tests/fixtures/schema/0.10.11/operation-update.json b/tests/fixtures/schema/0.10.11/operation-update.json new file mode 100644 index 00000000..95c859e2 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/operation-update.json @@ -0,0 +1,36 @@ +{ + "type": "story_operation", + "operation": "update", + "date": "2015-06-25T09:50:50.52Z", + "story_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "revision_id": "2A", + "branch": "default", + "version": "0.10.11", + "priority": "standard", + "app_name": "ellipsis", + + "story": { + "_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "version": "0.10.11", + "type": "story", + "created_date": "2015-07-02T09:50:50.52Z", + "last_updated_date": "2015-07-02T09:50:50.52Z", + "headlines": { + "basic": "Tiny house, big benefits:\u2009Freedom from a mortgage and worries \u2014 and stuff" + }, + "description": { + "basic": "Tiny house, big benefits:\u2009Freedom from a mortgage and worries \u2014 and stuff" + }, + "content_elements": [ + { + "type": "text", + "content": "MY TWO CENTS", + "_id": "D2349ABC88A9A" + } + ], + "revision": { + "revision_id": "2A", + "parent_id": "1A" + } + } +} diff --git a/tests/fixtures/schema/0.10.11/quote-fixture-bad-citation.json b/tests/fixtures/schema/0.10.11/quote-fixture-bad-citation.json new file mode 100644 index 00000000..33dab640 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/quote-fixture-bad-citation.json @@ -0,0 +1,8 @@ +{ + "type": "quote", + "content_elements": [{ + "type": "text", + "content": "Citation should be a text object" + }], + "citation": "Citation is broken." +} diff --git a/tests/fixtures/schema/0.10.11/quote-fixture-bad-content-elements.json b/tests/fixtures/schema/0.10.11/quote-fixture-bad-content-elements.json new file mode 100644 index 00000000..93f185fd --- /dev/null +++ b/tests/fixtures/schema/0.10.11/quote-fixture-bad-content-elements.json @@ -0,0 +1,7 @@ +{ + "type": "quote", + "citation": { + "type": "text", + "content": "At least the citation is correct!" + } +} diff --git a/tests/fixtures/schema/0.10.11/raw-html-fixture-bad.json b/tests/fixtures/schema/0.10.11/raw-html-fixture-bad.json new file mode 100644 index 00000000..7ef81241 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/raw-html-fixture-bad.json @@ -0,0 +1,3 @@ +{ + "name": "vaughant" +} diff --git a/tests/fixtures/schema/0.10.11/raw-html-fixture-good.json b/tests/fixtures/schema/0.10.11/raw-html-fixture-good.json new file mode 100644 index 00000000..c557b20d --- /dev/null +++ b/tests/fixtures/schema/0.10.11/raw-html-fixture-good.json @@ -0,0 +1,6 @@ +{ + "_id": "09876543210", + "type": "raw_html", + "content": "Here's my html" + +} diff --git a/tests/fixtures/schema/0.10.11/redirect-fixture-bad.json b/tests/fixtures/schema/0.10.11/redirect-fixture-bad.json new file mode 100644 index 00000000..ef38b2af --- /dev/null +++ b/tests/fixtures/schema/0.10.11/redirect-fixture-bad.json @@ -0,0 +1,6 @@ +{ + "_id" : "XYZABC1", + "type" : "redirect", + "version" : "0.10.11", + "canonical_url" : "/canonical-url" +} diff --git a/tests/fixtures/schema/0.10.11/redirect-fixture-good.json b/tests/fixtures/schema/0.10.11/redirect-fixture-good.json new file mode 100644 index 00000000..18008254 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/redirect-fixture-good.json @@ -0,0 +1,7 @@ +{ + "_id" : "XYZABC1", + "type" : "redirect", + "version" : "0.10.11", + "canonical_url" : "/canonical-url", + "redirect_url" : "/redirect-url" +} diff --git a/tests/fixtures/schema/0.10.11/reference-fixture-bad-addl-props.json b/tests/fixtures/schema/0.10.11/reference-fixture-bad-addl-props.json new file mode 100644 index 00000000..29deedf8 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/reference-fixture-bad-addl-props.json @@ -0,0 +1,11 @@ +{ + "type": "reference", + "foo": "bar", + "referent": { + "type": "author", + "version": "0.10.11", + "service": "http://www.credits.com/api", + "provider": "http://www.credits.com/api", + "id": "00001" + } +} diff --git a/tests/fixtures/schema/0.10.11/reference-fixture-bad-array.json b/tests/fixtures/schema/0.10.11/reference-fixture-bad-array.json new file mode 100644 index 00000000..eeabae1c --- /dev/null +++ b/tests/fixtures/schema/0.10.11/reference-fixture-bad-array.json @@ -0,0 +1,8 @@ +[ + { + "arbitrary": "element" + }, + { + "in": "an array" + } +] diff --git a/tests/fixtures/schema/0.10.11/reference-fixture-bad-more-addl-props.json b/tests/fixtures/schema/0.10.11/reference-fixture-bad-more-addl-props.json new file mode 100644 index 00000000..0ade6468 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/reference-fixture-bad-more-addl-props.json @@ -0,0 +1,11 @@ +{ + "type": "reference", + "referent": { + "type": "author", + "version": "0.10.11", + "service": "http://www.credits.com/api", + "provider": "http://www.credits.com/api", + "id": "00001", + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/reference-fixture-good.json b/tests/fixtures/schema/0.10.11/reference-fixture-good.json new file mode 100644 index 00000000..caee737d --- /dev/null +++ b/tests/fixtures/schema/0.10.11/reference-fixture-good.json @@ -0,0 +1,15 @@ +{ + "type": "reference", + + "referent": { + "type": "author", + "service": "http://www.credits.com/api", + "provider": "http://www.credits.com/api", + "id": "00001", + "referent_properties": { + "additional_properties": { + "foo": "bar" + } + } + } +} diff --git a/tests/fixtures/schema/0.10.11/restricted-content-fixture-bad-referent.json b/tests/fixtures/schema/0.10.11/restricted-content-fixture-bad-referent.json new file mode 100644 index 00000000..5e084c40 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/restricted-content-fixture-bad-referent.json @@ -0,0 +1,10 @@ +{ + "_id": "unique ANS id", + "type": "restricted", + "restricted_content": { + }, + "reasons": [{ + "restriction_id": "unique ARC UUID", + "message": "a reason for the content to be restricted" + }] +} diff --git a/tests/fixtures/schema/0.10.11/restricted-content-fixture-good.json b/tests/fixtures/schema/0.10.11/restricted-content-fixture-good.json new file mode 100644 index 00000000..48f31e8c --- /dev/null +++ b/tests/fixtures/schema/0.10.11/restricted-content-fixture-good.json @@ -0,0 +1,16 @@ +{ + "_id": "unique ANS id", + "type": "restricted", + "restricted_content": { + "referent": { + "id": "FFY22CTRZAI6LDMTBLZRP3KYZE", + "type": "gallery", + "provider": "" + }, + "type": "reference" + }, + "reasons": [{ + "restriction_id": "unique ARC UUID", + "message": "a reason for the content to be restricted" + }] +} diff --git a/tests/fixtures/schema/0.10.11/social-fixture-good.json b/tests/fixtures/schema/0.10.11/social-fixture-good.json new file mode 100644 index 00000000..248c86a6 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/social-fixture-good.json @@ -0,0 +1,4 @@ +{ + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/source-bad-extra-properties.json b/tests/fixtures/schema/0.10.11/source-bad-extra-properties.json new file mode 100644 index 00000000..af388f1c --- /dev/null +++ b/tests/fixtures/schema/0.10.11/source-bad-extra-properties.json @@ -0,0 +1,5 @@ +{ + "type": "Wires", + "name": "Reuters", + "foo": "bar" +} diff --git a/tests/fixtures/schema/0.10.11/source-good.json b/tests/fixtures/schema/0.10.11/source-good.json new file mode 100644 index 00000000..8adf6eea --- /dev/null +++ b/tests/fixtures/schema/0.10.11/source-good.json @@ -0,0 +1,9 @@ +{ + "source_type": "Wires", + "name": "Reuters", + "system": "Arc I/O", + "source_id": "ABC-DEF-45G", + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-corrections.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-corrections.json new file mode 100644 index 00000000..7494b5fc --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-corrections.json @@ -0,0 +1,134 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "corrections": [ + "test" + ], + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "byline": "John Q. Reporter", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "related_content": { + "basic": [ + { + "_id": "some other unique ANS id", + "type": "story", + "version": "0.10.11" + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "789", + "type": "image", + "version": "0.10.11", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "credits": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-dropcap.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-dropcap.json new file mode 100644 index 00000000..c92ee4d3 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-dropcap.json @@ -0,0 +1,25 @@ +{ + "type": "story", + "version": "0.10.11", + "headlines": { + "basic": "Dropcap Bad" + }, + "content_elements": [ + { + "_id": "1000002", + "type": "text", + "block_properties":{ + "dropcap": "word" + }, + "content": "Why are Americans, whose homes average about 2,200 square feet, so obsessed with tiny homes? Perhaps they are responding to the benefits tiny-house owners cite: financial and emotional freedom, a greener lifestyle, the satisfaction of building one’s own refuge." + }, + { + "_id": "1000002", + "type": "text", + "block_properties":{ + "dropcap": false + }, + "content": "Why are Americans, whose homes average about 2,200 square feet, so obsessed with tiny homes? Perhaps they are responding to the benefits tiny-house owners cite: financial and emotional freedom, a greener lifestyle, the satisfaction of building one’s own refuge." + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-embargo.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-embargo.json new file mode 100644 index 00000000..f6c6b128 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-embargo.json @@ -0,0 +1,18 @@ +{ + "type": "story", + "version": "0.10.11", + "headlines": { + "basic": "Embargo" + }, + "content_elements": [ + { + "type": "text", + "content": "There is a bad embargo" + } + ], + "content_restrictions": { + "embargo": { + "end_time": false + } + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-extra-properties.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-extra-properties.json new file mode 100644 index 00000000..d7f6ae52 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-extra-properties.json @@ -0,0 +1,206 @@ +{ + "foo": "bar", + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "related_content": { + "basic": [ + { + "_id": "some other unique ANS id", + "type": "story", + "version": "0.10.11" + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "

this is my first paragraph

" + + }, + { + "_id": "456", + "type": "text", + + "content": "

this is my second paragraph

" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.11", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id" : "t1", + "type" : "text", + "text" : "Foo" + + }, + { + "_id" : "t2", + "type": "text", + + "text" : "Bar" + }, + { + "_id" : "l2", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "t4", + "type": "text", + + "text" : "Hi" + }, + { + "_id": "t5", + "type": "text", + + "text" : "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + + }, + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": ["web"] + + }, + { + "_id": "22222229", + "type": "oembed", + "providerUrl": "https://api.twitter.com/1/statuses/oembed.json", + "objectUrl": "https://twitter.com/BradDavis_WFTS/status/664422935130566656", + "channels": ["ios", "android"] + + } + + + ] +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-referenced-distributor-mode.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-referenced-distributor-mode.json new file mode 100644 index 00000000..52caffec --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-referenced-distributor-mode.json @@ -0,0 +1,541 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "channels": ["ios", "android"], + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "Copyright © 2018 Thomson Reuters.", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "content_restrictions": { + "content_code": "green" + }, + "related_content": { + "basic": [ + { + "type": "reference", + "_id": "00001", + "channels": [ + "mobile" + ], + + "referent": { + "type": "story", + "id": "ABCDEFGHIJKLMNO", + "provider": "http://www.story.com/api", + "referent_properties":{ + "alt_headline": "An alternate headline" + } + } + } + ], + "redirect": [{ + "type": "redirect", + "version": "0.10.11", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "redirect_url": "http://www.washingtonpost.com/editors-note/published-too-soon.html" + }] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "tags": [ + { + "_id": "fred", + "text": "Fred", + "slug": "fred", + "description": "For all things Fred", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "writing", + "text": "Writing" + } + ], + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "named_entities": [ + { + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization" + }, + { + "_id": "barack-obama", + "name": "Barack Obama", + "type": "person" + }, + { + "_id": "washington-dc", + "name": "Washington D.C.", + "type": "location" + } + ], + "primary_site": { + "_id": "site_primary", + "type": "site", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news", + "additional_properties": { + "baz": "bag" + } + }, + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.11", + "primary": false, + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.11", + "primary": true, + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id" : "site_1", + "additional_properties": { + "foo": "bar" + } + } + ], + "stock_symbols": [ "IBM", "INTL", "AMZN", "MRSFT" ], + "additional_properties": { + "more": "info" + } + }, + "label": { + "basic": { + "text": "The Kicker", + "url": "https://www.washingtonpost.com/kicker", + "display": true, + "additional_properties": { + "bar": "foo" + } + }, + "another_one": { + "text": "Another One" + } + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "first_publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + + "planning": { + "scheduling": { + "planned_publish_date": "2015-06-24T09:49:00.10Z", + "scheduled_publish_date": "2015-06-24T09:49:00.10Z", + "will_have_gallery": true, + "will_have_graphic": false, + "will_have_image": true, + "will_have_video": false + }, + "story_length": { + "word_count_planned": 2400, + "word_count_actual": 3000, + "inch_count_planned": 6, + "inch_count_actual": 8, + "line_count_planned": 100, + "line_count_actual": 120 + } + }, + + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + + }, + { + "_id": "456", + "type": "text", + + "content": "this is my second paragraph" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.11", + "alignment": "left", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id" : "t1", + "type" : "text", + "content" : "Foo" + + }, + { + "_id" : "t2", + "type": "text", + + "content" : "Bar" + }, + { + "_id" : "l2", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "t4", + "type": "text", + + "content" : "Hi" + }, + { + "_id": "t5", + "type": "text", + + "content" : "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + + }, + { + "_id": "549876543210", + "type": "quote", + "content_elements": [ + { + "type": "text", + "content": "I really like this sample sentence. Maybe we should use it?" + }, + { + "type": "quote", + "content_elements": [ + { + "type": "image", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg" + }, + { + "type": "text", + "content": "Now is the time for all good men to come to the aid of their party." + } + ], + "citation": { + "type": "text", + "content": "Charles E. Weller; The Early History of the Typewriter, p. 21 (1918)" + } + } + ], + "citation": { + "type": "text", + "content": "Me, on Slack, two minutes ago." + } + }, + + { + "_id": "659876643210", + "type": "correction", + "correction_type": "clarification", + "text": "An earlier version of this article attributed the above quote to David Foster Wallace." + }, + + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": ["web"] + + }, + { + "_id": "22222229", + "type": "reference", + "channels": ["ios", "android"], + "alignment": "left", + + "referent": { + "provider": "https://api.twitter.com/1/statuses/oembed.json", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656" + } + + }, + { + "_id": "22222220", + "type": "oembed_response", + "additional_properties": { + "Foo": "Bar" + }, + "raw_oembed": { + "type": "video", + "version": "1.0", + "provider_name": "Vimeo", + "provider_url": "https://vimeo.com/", + "title": "The New Vimeo Player (You Know, For Videos)", + "author_name": "Vimeo Staff", + "author_url": "https://vimeo.com/staff", + "is_plus": "0", + "html": "", + "width": 480, + "height": 270, + "duration": 62, + "description": "It may look (mostly) the same on the surface, but under the hood we totally rebuilt our player. Here’s a quick rundown of some of the coolest new features:\n\n• Lightning fast playback\n• Redesigned Share screen\n• Closed caption and subtitle compatible\n• HTML5 by default\n• Purchase-from-player functionality for embedded Vimeo On Demand trailers\n• More responsive than ever (go ahead, resize it, we dare you!!!)\n\nWe’re really proud of these updates. So proud that we made a spiffy new page to showcase all the reasons why we have the best video player in the galaxy. Check it out here: http://vimeo.com/player\n\nIn short, this is a player that even haters can love.", + "thumbnail_url": "https://i.vimeocdn.com/video/452001751_295x166.jpg", + "thumbnail_width": 295, + "thumbnail_height": 166, + "thumbnail_url_with_play_button": "https://i.vimeocdn.com/filter/overlay?src=https://i.vimeocdn.com/video/452001751_295x166.jpg&src=http://f.vimeocdn.com/p/images/crawler_play.png", + "upload_date": "2013-10-15 14:08:29", + "video_id": 76979871, + "uri": "/videos/76979871" + }, + "referent": { + "provider": "https://vimeo.com/api/oembed.json?url=", + "id": "76979871" + } + }, + { + "_id": "safas9dafs097asd890f", + "type": "interstitial_link", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?" + }, + { + "_id": "safas9dafs097asd8911", + "type": "element_group", + "content_elements": [ + { + "type": "image", + "url": "http://foo.com/foo.jpg", + "caption": "Foo" + }, + { + "type": "image", + "url": "http://bar.com/bar.jpg", + "caption": "Bar" + } + ] + }, + { + "_id": "safas9dafs097asd8911001fs", + "type": "numeric_rating", + "numeric_rating": 4.5, + "min": 0, + "max": 5, + "units": "stars" + }, + { + "_id": "7asd8911001fs4144sajhvt", + "type": "endorsement", + "endorsement": "Recommended" + } + ], + + "corrections": [ + { + "type": "correction", + "correction_type": "clarification", + "text": "What I said before was not exactly true." + }, + { + "type": "correction", + "correction_type": "correction", + "text": "What I said before was false and not true." + } + ], + + "owner": { + "id": "washpost", + "name": "(deprecated)", + "sponsored": false + }, + + "source": { + "source_id": "1234-5678", + "source_type": "(deprecated)", + "name": "(deprecated)", + "system": "Methode", + "edit_url": "http://washpost.methode.com/foo/bar/1234-5678", + "additional_properties": { + "foo": "bar" + } + }, + + "distributor": { + "reference_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + }, + + "syndication": { + "external_distribution": true, + "search": true + }, + + "comments": { + "comments_period": 14, + "allow_comments": true, + "display_comments": true, + "moderation_required": false, + + "additional_properties": { + "favorite_comment": "All work and no play makes Jack a dull boy." + } + }, + + "voice_transcripts": [{ + "_id": "vt-1", + "type": "voice_transcript", + "subtype": "short", + + "options": { + "enabled": true, + "voice": "joanna" + }, + + "options_used": { + "enabled": true, + "voice": "joanna" + }, + + "output": { + "type": "audio", + "version": "0.10.11", + "streams": [{ + "url": "https://arc-content-api.s3.amazonaws.com/polly/test.mp3" + }] + } + }, { + "_id": "vt-2", + "type": "voice_transcript", + "subtype": "full", + + "options": { + "enabled": true + }, + "options_used": { + "enabled": true + }, + "streams": [{ + "bitrate": 96, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-96.mp3" + }, { + "bitrate": 128, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-128.mp3" + }] + }], + + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-referenced-distributor-reference-id.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-referenced-distributor-reference-id.json new file mode 100644 index 00000000..3e641e0e --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-referenced-distributor-reference-id.json @@ -0,0 +1,541 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "channels": ["ios", "android"], + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "Copyright © 2018 Thomson Reuters.", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "content_restrictions": { + "content_code": "green" + }, + "related_content": { + "basic": [ + { + "type": "reference", + "_id": "00001", + "channels": [ + "mobile" + ], + + "referent": { + "type": "story", + "id": "ABCDEFGHIJKLMNO", + "provider": "http://www.story.com/api", + "referent_properties":{ + "alt_headline": "An alternate headline" + } + } + } + ], + "redirect": [{ + "type": "redirect", + "version": "0.10.11", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "redirect_url": "http://www.washingtonpost.com/editors-note/published-too-soon.html" + }] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "tags": [ + { + "_id": "fred", + "text": "Fred", + "slug": "fred", + "description": "For all things Fred", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "writing", + "text": "Writing" + } + ], + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "named_entities": [ + { + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization" + }, + { + "_id": "barack-obama", + "name": "Barack Obama", + "type": "person" + }, + { + "_id": "washington-dc", + "name": "Washington D.C.", + "type": "location" + } + ], + "primary_site": { + "_id": "site_primary", + "type": "site", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news", + "additional_properties": { + "baz": "bag" + } + }, + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.11", + "primary": false, + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.11", + "primary": true, + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id" : "site_1", + "additional_properties": { + "foo": "bar" + } + } + ], + "stock_symbols": [ "IBM", "INTL", "AMZN", "MRSFT" ], + "additional_properties": { + "more": "info" + } + }, + "label": { + "basic": { + "text": "The Kicker", + "url": "https://www.washingtonpost.com/kicker", + "display": true, + "additional_properties": { + "bar": "foo" + } + }, + "another_one": { + "text": "Another One" + } + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "first_publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + + "planning": { + "scheduling": { + "planned_publish_date": "2015-06-24T09:49:00.10Z", + "scheduled_publish_date": "2015-06-24T09:49:00.10Z", + "will_have_gallery": true, + "will_have_graphic": false, + "will_have_image": true, + "will_have_video": false + }, + "story_length": { + "word_count_planned": 2400, + "word_count_actual": 3000, + "inch_count_planned": 6, + "inch_count_actual": 8, + "line_count_planned": 100, + "line_count_actual": 120 + } + }, + + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + + }, + { + "_id": "456", + "type": "text", + + "content": "this is my second paragraph" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.11", + "alignment": "left", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id" : "t1", + "type" : "text", + "content" : "Foo" + + }, + { + "_id" : "t2", + "type": "text", + + "content" : "Bar" + }, + { + "_id" : "l2", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "t4", + "type": "text", + + "content" : "Hi" + }, + { + "_id": "t5", + "type": "text", + + "content" : "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + + }, + { + "_id": "549876543210", + "type": "quote", + "content_elements": [ + { + "type": "text", + "content": "I really like this sample sentence. Maybe we should use it?" + }, + { + "type": "quote", + "content_elements": [ + { + "type": "image", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg" + }, + { + "type": "text", + "content": "Now is the time for all good men to come to the aid of their party." + } + ], + "citation": { + "type": "text", + "content": "Charles E. Weller; The Early History of the Typewriter, p. 21 (1918)" + } + } + ], + "citation": { + "type": "text", + "content": "Me, on Slack, two minutes ago." + } + }, + + { + "_id": "659876643210", + "type": "correction", + "correction_type": "clarification", + "text": "An earlier version of this article attributed the above quote to David Foster Wallace." + }, + + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": ["web"] + + }, + { + "_id": "22222229", + "type": "reference", + "channels": ["ios", "android"], + "alignment": "left", + + "referent": { + "provider": "https://api.twitter.com/1/statuses/oembed.json", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656" + } + + }, + { + "_id": "22222220", + "type": "oembed_response", + "additional_properties": { + "Foo": "Bar" + }, + "raw_oembed": { + "type": "video", + "version": "1.0", + "provider_name": "Vimeo", + "provider_url": "https://vimeo.com/", + "title": "The New Vimeo Player (You Know, For Videos)", + "author_name": "Vimeo Staff", + "author_url": "https://vimeo.com/staff", + "is_plus": "0", + "html": "", + "width": 480, + "height": 270, + "duration": 62, + "description": "It may look (mostly) the same on the surface, but under the hood we totally rebuilt our player. Here’s a quick rundown of some of the coolest new features:\n\n• Lightning fast playback\n• Redesigned Share screen\n• Closed caption and subtitle compatible\n• HTML5 by default\n• Purchase-from-player functionality for embedded Vimeo On Demand trailers\n• More responsive than ever (go ahead, resize it, we dare you!!!)\n\nWe’re really proud of these updates. So proud that we made a spiffy new page to showcase all the reasons why we have the best video player in the galaxy. Check it out here: http://vimeo.com/player\n\nIn short, this is a player that even haters can love.", + "thumbnail_url": "https://i.vimeocdn.com/video/452001751_295x166.jpg", + "thumbnail_width": 295, + "thumbnail_height": 166, + "thumbnail_url_with_play_button": "https://i.vimeocdn.com/filter/overlay?src=https://i.vimeocdn.com/video/452001751_295x166.jpg&src=http://f.vimeocdn.com/p/images/crawler_play.png", + "upload_date": "2013-10-15 14:08:29", + "video_id": 76979871, + "uri": "/videos/76979871" + }, + "referent": { + "provider": "https://vimeo.com/api/oembed.json?url=", + "id": "76979871" + } + }, + { + "_id": "safas9dafs097asd890f", + "type": "interstitial_link", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?" + }, + { + "_id": "safas9dafs097asd8911", + "type": "element_group", + "content_elements": [ + { + "type": "image", + "url": "http://foo.com/foo.jpg", + "caption": "Foo" + }, + { + "type": "image", + "url": "http://bar.com/bar.jpg", + "caption": "Bar" + } + ] + }, + { + "_id": "safas9dafs097asd8911001fs", + "type": "numeric_rating", + "numeric_rating": 4.5, + "min": 0, + "max": 5, + "units": "stars" + }, + { + "_id": "7asd8911001fs4144sajhvt", + "type": "endorsement", + "endorsement": "Recommended" + } + ], + + "corrections": [ + { + "type": "correction", + "correction_type": "clarification", + "text": "What I said before was not exactly true." + }, + { + "type": "correction", + "correction_type": "correction", + "text": "What I said before was false and not true." + } + ], + + "owner": { + "id": "washpost", + "name": "(deprecated)", + "sponsored": false + }, + + "source": { + "source_id": "1234-5678", + "source_type": "(deprecated)", + "name": "(deprecated)", + "system": "Methode", + "edit_url": "http://washpost.methode.com/foo/bar/1234-5678", + "additional_properties": { + "foo": "bar" + } + }, + + "distributor": { + "mode": "reference" + }, + + "syndication": { + "external_distribution": true, + "search": true + }, + + "comments": { + "comments_period": 14, + "allow_comments": true, + "display_comments": true, + "moderation_required": false, + + "additional_properties": { + "favorite_comment": "All work and no play makes Jack a dull boy." + } + }, + + "voice_transcripts": [{ + "_id": "vt-1", + "type": "voice_transcript", + "subtype": "short", + + "options": { + "enabled": true, + "voice": "joanna" + }, + + "options_used": { + "enabled": true, + "voice": "joanna" + }, + + "output": { + "type": "audio", + "version": "0.10.11", + "streams": [{ + "url": "https://arc-content-api.s3.amazonaws.com/polly/test.mp3" + }] + } + }, { + "_id": "vt-2", + "type": "voice_transcript", + "subtype": "full", + + "options": { + "enabled": true + }, + "options_used": { + "enabled": true + }, + "streams": [{ + "bitrate": 96, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-96.mp3" + }, { + "bitrate": 128, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-128.mp3" + }] + }], + + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-sections-addl-properties.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-sections-addl-properties.json new file mode 100644 index 00000000..cba9f674 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-sections-addl-properties.json @@ -0,0 +1,52 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.5.2", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "sections": [ + { + "name": "Business", + "path": "/business", + "other": "data", + "foo": "bar" + }, + { + "title": "Finance", + "path": "/business/finance", + "parent": "/business" + } + ] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + + } + + + ] +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-tag-strings.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-tag-strings.json new file mode 100644 index 00000000..d5a9950f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-tag-strings.json @@ -0,0 +1,55 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.5.2", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "tags": [ + "alpha", "beta", "gamma" + ], + "sections": [ + { + "name": "Business", + "path": "/business", + "other": "data", + "foo": "bar" + }, + { + "title": "Finance", + "path": "/business/finance", + "parent": "/business" + } + ] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + + } + + + ] +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-taxonomy-additional-tasks.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-taxonomy-additional-tasks.json new file mode 100644 index 00000000..2fc730c7 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-taxonomy-additional-tasks.json @@ -0,0 +1,105 @@ +{ + "_id": "unique ANS id", + "version": "0.10.11", + "type": "story", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "channels": ["ios", "android"], + "language": "en", + "taxonomy": { + "associated_tasks": [ + "5b9a7ffce4b0a981ee6a9897", + "this is not a valid task", + "5b92bb3ce08ea96cb2fa8ca4" + ], + "tags": [ + { + "_id": "fred", + "text": "Fred", + "slug": "fred", + "description": "For all things Fred", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "writing", + "text": "Writing" + } + ], + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "named_entities": [ + { + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization" + }, + { + "_id": "barack-obama", + "name": "Barack Obama", + "type": "person" + }, + { + "_id": "washington-dc", + "name": "Washington D.C.", + "type": "location" + } + ], + "primary_site": { + "_id": "site_primary", + "type": "site", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news", + "additional_properties": { + "baz": "bag" + } + }, + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.11", + "primary": false, + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.11", + "primary": true, + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id": "site_1", + "additional_properties": { + "foo": "bar" + } + } + ], + "stock_symbols": [ + "IBM", + "INTL", + "AMZN", + "MRSFT" + ], + "additional_properties": { + "more": "info" + } + }, + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-wrong-type.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-wrong-type.json new file mode 100644 index 00000000..7e823046 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-wrong-type.json @@ -0,0 +1,175 @@ +{ + "_id": "unique ANS id", + "type": "not-a-story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "related_content": { + "basic": [ + { + "_id": "some other unique ANS id", + "type": "story", + "version": "0.10.11" + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "456", + "type": "text", + + "content": "

this is my second paragraph

" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id" : "t1", + "type" : "text", + "text" : "Foo" + + }, + { + "_id" : "t2", + "type": "text", + + "text" : "Bar" + }, + { + "_id" : "l2", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "t4", + "type": "text", + + "text" : "Hi" + }, + { + "_id": "t5", + "type": "text", + + "text" : "Mom" + } + ] + } + ] + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-bad-wrong-version.json b/tests/fixtures/schema/0.10.11/story-fixture-bad-wrong-version.json new file mode 100644 index 00000000..abb9c10c --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-bad-wrong-version.json @@ -0,0 +1,130 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.1.0", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "related_content": { + "basic": [ + { + "_id": "some other unique ANS id", + "type": "story", + "version": "0.10.11" + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "789", + "type": "image", + "version": "0.10.11", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-good-distributor-handout.json b/tests/fixtures/schema/0.10.11/story-fixture-good-distributor-handout.json new file mode 100644 index 00000000..628cf90f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-good-distributor-handout.json @@ -0,0 +1,546 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "channels": ["ios", "android"], + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "Copyright © 2018 Thomson Reuters.", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "content_restrictions": { + "content_code": "green" + }, + "related_content": { + "basic": [ + { + "type": "reference", + "_id": "00001", + "channels": [ + "mobile" + ], + + "referent": { + "type": "story", + "id": "ABCDEFGHIJKLMNO", + "provider": "http://www.story.com/api", + "referent_properties":{ + "alt_headline": "An alternate headline" + } + } + } + ], + "redirect": [{ + "type": "redirect", + "version": "0.10.11", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "redirect_url": "http://www.washingtonpost.com/editors-note/published-too-soon.html" + }] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "tags": [ + { + "_id": "fred", + "text": "Fred", + "slug": "fred", + "description": "For all things Fred", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "writing", + "text": "Writing" + } + ], + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "named_entities": [ + { + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization" + }, + { + "_id": "barack-obama", + "name": "Barack Obama", + "type": "person" + }, + { + "_id": "washington-dc", + "name": "Washington D.C.", + "type": "location" + } + ], + "primary_site": { + "_id": "site_primary", + "type": "site", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news", + "additional_properties": { + "baz": "bag" + } + }, + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.11", + "primary": false, + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.11", + "primary": true, + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id" : "site_1", + "additional_properties": { + "foo": "bar" + } + } + ], + "stock_symbols": [ "IBM", "INTL", "AMZN", "MRSFT" ], + "additional_properties": { + "more": "info" + } + }, + "label": { + "basic": { + "text": "The Kicker", + "url": "https://www.washingtonpost.com/kicker", + "display": true, + "additional_properties": { + "bar": "foo" + } + }, + "another_one": { + "text": "Another One" + } + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "first_publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + + "planning": { + "scheduling": { + "planned_publish_date": "2015-06-24T09:49:00.10Z", + "scheduled_publish_date": "2015-06-24T09:49:00.10Z", + "will_have_gallery": true, + "will_have_graphic": false, + "will_have_image": true, + "will_have_video": false + }, + "story_length": { + "word_count_planned": 2400, + "word_count_actual": 3000, + "inch_count_planned": 6, + "inch_count_actual": 8, + "line_count_planned": 100, + "line_count_actual": 120 + } + }, + + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + + }, + { + "_id": "456", + "type": "text", + + "content": "this is my second paragraph" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.11", + "alignment": "left", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id" : "t1", + "type" : "text", + "content" : "Foo" + + }, + { + "_id" : "t2", + "type": "text", + + "content" : "Bar" + }, + { + "_id" : "l2", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "t4", + "type": "text", + + "content" : "Hi" + }, + { + "_id": "t5", + "type": "text", + + "content" : "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + + }, + { + "_id": "549876543210", + "type": "quote", + "content_elements": [ + { + "type": "text", + "content": "I really like this sample sentence. Maybe we should use it?" + }, + { + "type": "quote", + "content_elements": [ + { + "type": "image", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg" + }, + { + "type": "text", + "content": "Now is the time for all good men to come to the aid of their party." + } + ], + "citation": { + "type": "text", + "content": "Charles E. Weller; The Early History of the Typewriter, p. 21 (1918)" + } + } + ], + "citation": { + "type": "text", + "content": "Me, on Slack, two minutes ago." + } + }, + + { + "_id": "659876643210", + "type": "correction", + "correction_type": "clarification", + "text": "An earlier version of this article attributed the above quote to David Foster Wallace." + }, + + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": ["web"] + + }, + { + "_id": "22222229", + "type": "reference", + "channels": ["ios", "android"], + "alignment": "left", + + "referent": { + "provider": "https://api.twitter.com/1/statuses/oembed.json", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656" + } + + }, + { + "_id": "22222220", + "type": "oembed_response", + "additional_properties": { + "Foo": "Bar" + }, + "raw_oembed": { + "type": "video", + "version": "1.0", + "provider_name": "Vimeo", + "provider_url": "https://vimeo.com/", + "title": "The New Vimeo Player (You Know, For Videos)", + "author_name": "Vimeo Staff", + "author_url": "https://vimeo.com/staff", + "is_plus": "0", + "html": "", + "width": 480, + "height": 270, + "duration": 62, + "description": "It may look (mostly) the same on the surface, but under the hood we totally rebuilt our player. Here’s a quick rundown of some of the coolest new features:\n\n• Lightning fast playback\n• Redesigned Share screen\n• Closed caption and subtitle compatible\n• HTML5 by default\n• Purchase-from-player functionality for embedded Vimeo On Demand trailers\n• More responsive than ever (go ahead, resize it, we dare you!!!)\n\nWe’re really proud of these updates. So proud that we made a spiffy new page to showcase all the reasons why we have the best video player in the galaxy. Check it out here: http://vimeo.com/player\n\nIn short, this is a player that even haters can love.", + "thumbnail_url": "https://i.vimeocdn.com/video/452001751_295x166.jpg", + "thumbnail_width": 295, + "thumbnail_height": 166, + "thumbnail_url_with_play_button": "https://i.vimeocdn.com/filter/overlay?src=https://i.vimeocdn.com/video/452001751_295x166.jpg&src=http://f.vimeocdn.com/p/images/crawler_play.png", + "upload_date": "2013-10-15 14:08:29", + "video_id": 76979871, + "uri": "/videos/76979871" + }, + "referent": { + "provider": "https://vimeo.com/api/oembed.json?url=", + "id": "76979871" + } + }, + { + "_id": "safas9dafs097asd890f", + "type": "interstitial_link", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?" + }, + { + "_id": "safas9dafs097asd8911", + "type": "element_group", + "content_elements": [ + { + "type": "image", + "url": "http://foo.com/foo.jpg", + "caption": "Foo" + }, + { + "type": "image", + "url": "http://bar.com/bar.jpg", + "caption": "Bar" + } + ] + }, + { + "_id": "safas9dafs097asd8911001fs", + "type": "numeric_rating", + "numeric_rating": 4.5, + "min": 0, + "max": 5, + "units": "stars" + }, + { + "_id": "7asd8911001fs4144sajhvt", + "type": "endorsement", + "endorsement": "Recommended" + } + ], + + "corrections": [ + { + "type": "correction", + "correction_type": "clarification", + "text": "What I said before was not exactly true." + }, + { + "type": "correction", + "correction_type": "correction", + "text": "What I said before was false and not true." + } + ], + + "owner": { + "id": "washpost", + "name": "(deprecated)", + "sponsored": false + }, + + "source": { + "source_id": "1234-5678", + "source_type": "(deprecated)", + "name": "(deprecated)", + "system": "Methode", + "edit_url": "http://washpost.methode.com/foo/bar/1234-5678", + "additional_properties": { + "foo": "bar" + } + }, + + "distributor": { + "name": "A Theatre Company", + "category": "handout", + "subcategory": "promotional-material", + "additional_properties": { + "foo": "bar" + } + }, + + "syndication": { + "external_distribution": true, + "search": true + }, + + "comments": { + "comments_period": 14, + "allow_comments": true, + "display_comments": true, + "moderation_required": false, + + "additional_properties": { + "favorite_comment": "All work and no play makes Jack a dull boy." + } + }, + + "voice_transcripts": [{ + "_id": "vt-1", + "type": "voice_transcript", + "subtype": "short", + + "options": { + "enabled": true, + "voice": "joanna" + }, + + "options_used": { + "enabled": true, + "voice": "joanna" + }, + + "output": { + "type": "audio", + "version": "0.10.11", + "streams": [{ + "url": "https://arc-content-api.s3.amazonaws.com/polly/test.mp3" + }] + } + }, { + "_id": "vt-2", + "type": "voice_transcript", + "subtype": "full", + + "options": { + "enabled": true + }, + "options_used": { + "enabled": true + }, + "streams": [{ + "bitrate": 96, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-96.mp3" + }, { + "bitrate": 128, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-128.mp3" + }] + }], + + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-good-distributor.json b/tests/fixtures/schema/0.10.11/story-fixture-good-distributor.json new file mode 100644 index 00000000..b7404882 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-good-distributor.json @@ -0,0 +1,546 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "channels": ["ios", "android"], + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "Copyright © 2018 Thomson Reuters.", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "content_restrictions": { + "content_code": "green" + }, + "related_content": { + "basic": [ + { + "type": "reference", + "_id": "00001", + "channels": [ + "mobile" + ], + + "referent": { + "type": "story", + "id": "ABCDEFGHIJKLMNO", + "provider": "http://www.story.com/api", + "referent_properties":{ + "alt_headline": "An alternate headline" + } + } + } + ], + "redirect": [{ + "type": "redirect", + "version": "0.10.11", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "redirect_url": "http://www.washingtonpost.com/editors-note/published-too-soon.html" + }] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "tags": [ + { + "_id": "fred", + "text": "Fred", + "slug": "fred", + "description": "For all things Fred", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "writing", + "text": "Writing" + } + ], + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "named_entities": [ + { + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization" + }, + { + "_id": "barack-obama", + "name": "Barack Obama", + "type": "person" + }, + { + "_id": "washington-dc", + "name": "Washington D.C.", + "type": "location" + } + ], + "primary_site": { + "_id": "site_primary", + "type": "site", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news", + "additional_properties": { + "baz": "bag" + } + }, + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.11", + "primary": false, + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.11", + "primary": true, + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id" : "site_1", + "additional_properties": { + "foo": "bar" + } + } + ], + "stock_symbols": [ "IBM", "INTL", "AMZN", "MRSFT" ], + "additional_properties": { + "more": "info" + } + }, + "label": { + "basic": { + "text": "The Kicker", + "url": "https://www.washingtonpost.com/kicker", + "display": true, + "additional_properties": { + "bar": "foo" + } + }, + "another_one": { + "text": "Another One" + } + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "first_publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + + "planning": { + "scheduling": { + "planned_publish_date": "2015-06-24T09:49:00.10Z", + "scheduled_publish_date": "2015-06-24T09:49:00.10Z", + "will_have_gallery": true, + "will_have_graphic": false, + "will_have_image": true, + "will_have_video": false + }, + "story_length": { + "word_count_planned": 2400, + "word_count_actual": 3000, + "inch_count_planned": 6, + "inch_count_actual": 8, + "line_count_planned": 100, + "line_count_actual": 120 + } + }, + + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + + }, + { + "_id": "456", + "type": "text", + + "content": "this is my second paragraph" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.11", + "alignment": "left", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id" : "t1", + "type" : "text", + "content" : "Foo" + + }, + { + "_id" : "t2", + "type": "text", + + "content" : "Bar" + }, + { + "_id" : "l2", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "t4", + "type": "text", + + "content" : "Hi" + }, + { + "_id": "t5", + "type": "text", + + "content" : "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + + }, + { + "_id": "549876543210", + "type": "quote", + "content_elements": [ + { + "type": "text", + "content": "I really like this sample sentence. Maybe we should use it?" + }, + { + "type": "quote", + "content_elements": [ + { + "type": "image", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg" + }, + { + "type": "text", + "content": "Now is the time for all good men to come to the aid of their party." + } + ], + "citation": { + "type": "text", + "content": "Charles E. Weller; The Early History of the Typewriter, p. 21 (1918)" + } + } + ], + "citation": { + "type": "text", + "content": "Me, on Slack, two minutes ago." + } + }, + + { + "_id": "659876643210", + "type": "correction", + "correction_type": "clarification", + "text": "An earlier version of this article attributed the above quote to David Foster Wallace." + }, + + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": ["web"] + + }, + { + "_id": "22222229", + "type": "reference", + "channels": ["ios", "android"], + "alignment": "left", + + "referent": { + "provider": "https://api.twitter.com/1/statuses/oembed.json", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656" + } + + }, + { + "_id": "22222220", + "type": "oembed_response", + "additional_properties": { + "Foo": "Bar" + }, + "raw_oembed": { + "type": "video", + "version": "1.0", + "provider_name": "Vimeo", + "provider_url": "https://vimeo.com/", + "title": "The New Vimeo Player (You Know, For Videos)", + "author_name": "Vimeo Staff", + "author_url": "https://vimeo.com/staff", + "is_plus": "0", + "html": "", + "width": 480, + "height": 270, + "duration": 62, + "description": "It may look (mostly) the same on the surface, but under the hood we totally rebuilt our player. Here’s a quick rundown of some of the coolest new features:\n\n• Lightning fast playback\n• Redesigned Share screen\n• Closed caption and subtitle compatible\n• HTML5 by default\n• Purchase-from-player functionality for embedded Vimeo On Demand trailers\n• More responsive than ever (go ahead, resize it, we dare you!!!)\n\nWe’re really proud of these updates. So proud that we made a spiffy new page to showcase all the reasons why we have the best video player in the galaxy. Check it out here: http://vimeo.com/player\n\nIn short, this is a player that even haters can love.", + "thumbnail_url": "https://i.vimeocdn.com/video/452001751_295x166.jpg", + "thumbnail_width": 295, + "thumbnail_height": 166, + "thumbnail_url_with_play_button": "https://i.vimeocdn.com/filter/overlay?src=https://i.vimeocdn.com/video/452001751_295x166.jpg&src=http://f.vimeocdn.com/p/images/crawler_play.png", + "upload_date": "2013-10-15 14:08:29", + "video_id": 76979871, + "uri": "/videos/76979871" + }, + "referent": { + "provider": "https://vimeo.com/api/oembed.json?url=", + "id": "76979871" + } + }, + { + "_id": "safas9dafs097asd890f", + "type": "interstitial_link", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?" + }, + { + "_id": "safas9dafs097asd8911", + "type": "element_group", + "content_elements": [ + { + "type": "image", + "url": "http://foo.com/foo.jpg", + "caption": "Foo" + }, + { + "type": "image", + "url": "http://bar.com/bar.jpg", + "caption": "Bar" + } + ] + }, + { + "_id": "safas9dafs097asd8911001fs", + "type": "numeric_rating", + "numeric_rating": 4.5, + "min": 0, + "max": 5, + "units": "stars" + }, + { + "_id": "7asd8911001fs4144sajhvt", + "type": "endorsement", + "endorsement": "Recommended" + } + ], + + "corrections": [ + { + "type": "correction", + "correction_type": "clarification", + "text": "What I said before was not exactly true." + }, + { + "type": "correction", + "correction_type": "correction", + "text": "What I said before was false and not true." + } + ], + + "owner": { + "id": "washpost", + "name": "(deprecated)", + "sponsored": false + }, + + "source": { + "source_id": "1234-5678", + "source_type": "(deprecated)", + "name": "(deprecated)", + "system": "Methode", + "edit_url": "http://washpost.methode.com/foo/bar/1234-5678", + "additional_properties": { + "foo": "bar" + } + }, + + "distributor": { + "name": "Shutterstock", + "category": "stock", + "subcategory": "stock-shutterstock", + "additional_properties": { + "foo": "bar" + } + }, + + "syndication": { + "external_distribution": true, + "search": true + }, + + "comments": { + "comments_period": 14, + "allow_comments": true, + "display_comments": true, + "moderation_required": false, + + "additional_properties": { + "favorite_comment": "All work and no play makes Jack a dull boy." + } + }, + + "voice_transcripts": [{ + "_id": "vt-1", + "type": "voice_transcript", + "subtype": "short", + + "options": { + "enabled": true, + "voice": "joanna" + }, + + "options_used": { + "enabled": true, + "voice": "joanna" + }, + + "output": { + "type": "audio", + "version": "0.10.11", + "streams": [{ + "url": "https://arc-content-api.s3.amazonaws.com/polly/test.mp3" + }] + } + }, { + "_id": "vt-2", + "type": "voice_transcript", + "subtype": "full", + + "options": { + "enabled": true + }, + "options_used": { + "enabled": true + }, + "streams": [{ + "bitrate": 96, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-96.mp3" + }, { + "bitrate": 128, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-128.mp3" + }] + }], + + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-good-dropcap.json b/tests/fixtures/schema/0.10.11/story-fixture-good-dropcap.json new file mode 100644 index 00000000..7ff3202d --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-good-dropcap.json @@ -0,0 +1,17 @@ +{ + "type": "story", + "version": "0.10.11", + "headlines": { + "basic": "Dropcap Bad" + }, + "content_elements": [ + { + "_id": "1000002", + "type": "text", + "block_properties":{ + "dropcap": "letter" + }, + "content": "Why are Americans, whose homes average about 2,200 square feet, so obsessed with tiny homes? Perhaps they are responding to the benefits tiny-house owners cite: financial and emotional freedom, a greener lifestyle, the satisfaction of building one’s own refuge." + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/story-fixture-good-embargo.json b/tests/fixtures/schema/0.10.11/story-fixture-good-embargo.json new file mode 100644 index 00000000..c6f4a81f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-good-embargo.json @@ -0,0 +1,20 @@ +{ + "type": "story", + "version": "0.10.11", + "headlines": { + "basic": "Embargo" + }, + "content_elements": [ + { + "type": "text", + "content": "There is an embargo" + } + ], + "content_restrictions": { + "embargo": { + "active": true, + "end_time": "2020-11-30T05:00:00Z", + "description": "This is an embargo" + } + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-good-multi-site.json b/tests/fixtures/schema/0.10.11/story-fixture-good-multi-site.json new file mode 100644 index 00000000..3e9b521f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-good-multi-site.json @@ -0,0 +1,89 @@ +{ + "type": "story", + "version": "0.10.11", + + "canonical_website": "latimes", + "canonical_url": "/sports/lakers/yay-lakers-win", + + "website": "tribune", + "website_url": "/sports/bulls/boo-bulls-lose", + + "websites": { + "latimes": { + "website_section": { + "type": "section", + "version": "0.10.11", + "_id": "/sports/lakers", + "_website": "latimes", + "name": "Lakers" + } + }, + + "tribune": { + "website_section": { + "type": "reference", + "referent": { + "type": "section", + "id": "/sports/bulls", + "website": "tribune" + } + } + }, + + "balsun": { + "website_url": "/sports/lakers-defeat-bulls" + } + }, + + + "headlines": { + "basic": "Lakers Defeat Bulls" + }, + + + "content_elements": [ + { + "type": "text", + "content": "The Lakers defeated the Bulls!" + } + ], + + + "taxonomy": { + "primary_section": { + "type": "reference", + "referent": { + "type": "section", + "id": "/sports", + "website": "latimes" + } + }, + "sections": [ + { + "type": "section", + "version": "0.10.11", + "_id": "/sports/bulls", + "_website": "tribune", + "name": "Bulls", + "parent_id": "/sports", + "parent": { + "default": "/sports" + } + }, + { + "type": "section", + "version": "0.10.11", + "_id": "/sports/lakers", + "_website": "latimes", + "name": "Lakers" + }, + { + "type": "section", + "version": "0.10.11", + "_id": "/sports", + "_website": "balsun", + "name": "Sports" + } + ] + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-good-mystery-element.json b/tests/fixtures/schema/0.10.11/story-fixture-good-mystery-element.json new file mode 100644 index 00000000..27ce4ccb --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-good-mystery-element.json @@ -0,0 +1,125 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "related_content": { + "basic": [ + { + "_id": "some other unique ANS id", + "type": "story", + "version": "0.10.11" + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "000", + "type": "ghost", + "content": "I am haunting your ANS with a new content element type! Ooooooooo!" + }, + { + "_id": "123", + "type": "text", + "content": "

this is my first paragraph

" + }, + { + "_id": "456", + "type": "text", + "content": "

this is my second paragraph

" + } + + + ] +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-good-referenced-distributor.json b/tests/fixtures/schema/0.10.11/story-fixture-good-referenced-distributor.json new file mode 100644 index 00000000..033440a7 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-good-referenced-distributor.json @@ -0,0 +1,542 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "channels": ["ios", "android"], + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "Copyright © 2018 Thomson Reuters.", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "content_restrictions": { + "content_code": "green" + }, + "related_content": { + "basic": [ + { + "type": "reference", + "_id": "00001", + "channels": [ + "mobile" + ], + + "referent": { + "type": "story", + "id": "ABCDEFGHIJKLMNO", + "provider": "http://www.story.com/api", + "referent_properties":{ + "alt_headline": "An alternate headline" + } + } + } + ], + "redirect": [{ + "type": "redirect", + "version": "0.10.11", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "redirect_url": "http://www.washingtonpost.com/editors-note/published-too-soon.html" + }] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "tags": [ + { + "_id": "fred", + "text": "Fred", + "slug": "fred", + "description": "For all things Fred", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "writing", + "text": "Writing" + } + ], + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "named_entities": [ + { + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization" + }, + { + "_id": "barack-obama", + "name": "Barack Obama", + "type": "person" + }, + { + "_id": "washington-dc", + "name": "Washington D.C.", + "type": "location" + } + ], + "primary_site": { + "_id": "site_primary", + "type": "site", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news", + "additional_properties": { + "baz": "bag" + } + }, + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.11", + "primary": false, + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.11", + "primary": true, + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id" : "site_1", + "additional_properties": { + "foo": "bar" + } + } + ], + "stock_symbols": [ "IBM", "INTL", "AMZN", "MRSFT" ], + "additional_properties": { + "more": "info" + } + }, + "label": { + "basic": { + "text": "The Kicker", + "url": "https://www.washingtonpost.com/kicker", + "display": true, + "additional_properties": { + "bar": "foo" + } + }, + "another_one": { + "text": "Another One" + } + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "first_publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + + "planning": { + "scheduling": { + "planned_publish_date": "2015-06-24T09:49:00.10Z", + "scheduled_publish_date": "2015-06-24T09:49:00.10Z", + "will_have_gallery": true, + "will_have_graphic": false, + "will_have_image": true, + "will_have_video": false + }, + "story_length": { + "word_count_planned": 2400, + "word_count_actual": 3000, + "inch_count_planned": 6, + "inch_count_actual": 8, + "line_count_planned": 100, + "line_count_actual": 120 + } + }, + + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + + }, + { + "_id": "456", + "type": "text", + + "content": "this is my second paragraph" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.11", + "alignment": "left", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id" : "t1", + "type" : "text", + "content" : "Foo" + + }, + { + "_id" : "t2", + "type": "text", + + "content" : "Bar" + }, + { + "_id" : "l2", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "t4", + "type": "text", + + "content" : "Hi" + }, + { + "_id": "t5", + "type": "text", + + "content" : "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + + }, + { + "_id": "549876543210", + "type": "quote", + "content_elements": [ + { + "type": "text", + "content": "I really like this sample sentence. Maybe we should use it?" + }, + { + "type": "quote", + "content_elements": [ + { + "type": "image", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg" + }, + { + "type": "text", + "content": "Now is the time for all good men to come to the aid of their party." + } + ], + "citation": { + "type": "text", + "content": "Charles E. Weller; The Early History of the Typewriter, p. 21 (1918)" + } + } + ], + "citation": { + "type": "text", + "content": "Me, on Slack, two minutes ago." + } + }, + + { + "_id": "659876643210", + "type": "correction", + "correction_type": "clarification", + "text": "An earlier version of this article attributed the above quote to David Foster Wallace." + }, + + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": ["web"] + + }, + { + "_id": "22222229", + "type": "reference", + "channels": ["ios", "android"], + "alignment": "left", + + "referent": { + "provider": "https://api.twitter.com/1/statuses/oembed.json", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656" + } + + }, + { + "_id": "22222220", + "type": "oembed_response", + "additional_properties": { + "Foo": "Bar" + }, + "raw_oembed": { + "type": "video", + "version": "1.0", + "provider_name": "Vimeo", + "provider_url": "https://vimeo.com/", + "title": "The New Vimeo Player (You Know, For Videos)", + "author_name": "Vimeo Staff", + "author_url": "https://vimeo.com/staff", + "is_plus": "0", + "html": "", + "width": 480, + "height": 270, + "duration": 62, + "description": "It may look (mostly) the same on the surface, but under the hood we totally rebuilt our player. Here’s a quick rundown of some of the coolest new features:\n\n• Lightning fast playback\n• Redesigned Share screen\n• Closed caption and subtitle compatible\n• HTML5 by default\n• Purchase-from-player functionality for embedded Vimeo On Demand trailers\n• More responsive than ever (go ahead, resize it, we dare you!!!)\n\nWe’re really proud of these updates. So proud that we made a spiffy new page to showcase all the reasons why we have the best video player in the galaxy. Check it out here: http://vimeo.com/player\n\nIn short, this is a player that even haters can love.", + "thumbnail_url": "https://i.vimeocdn.com/video/452001751_295x166.jpg", + "thumbnail_width": 295, + "thumbnail_height": 166, + "thumbnail_url_with_play_button": "https://i.vimeocdn.com/filter/overlay?src=https://i.vimeocdn.com/video/452001751_295x166.jpg&src=http://f.vimeocdn.com/p/images/crawler_play.png", + "upload_date": "2013-10-15 14:08:29", + "video_id": 76979871, + "uri": "/videos/76979871" + }, + "referent": { + "provider": "https://vimeo.com/api/oembed.json?url=", + "id": "76979871" + } + }, + { + "_id": "safas9dafs097asd890f", + "type": "interstitial_link", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?" + }, + { + "_id": "safas9dafs097asd8911", + "type": "element_group", + "content_elements": [ + { + "type": "image", + "url": "http://foo.com/foo.jpg", + "caption": "Foo" + }, + { + "type": "image", + "url": "http://bar.com/bar.jpg", + "caption": "Bar" + } + ] + }, + { + "_id": "safas9dafs097asd8911001fs", + "type": "numeric_rating", + "numeric_rating": 4.5, + "min": 0, + "max": 5, + "units": "stars" + }, + { + "_id": "7asd8911001fs4144sajhvt", + "type": "endorsement", + "endorsement": "Recommended" + } + ], + + "corrections": [ + { + "type": "correction", + "correction_type": "clarification", + "text": "What I said before was not exactly true." + }, + { + "type": "correction", + "correction_type": "correction", + "text": "What I said before was false and not true." + } + ], + + "owner": { + "id": "washpost", + "name": "(deprecated)", + "sponsored": false + }, + + "source": { + "source_id": "1234-5678", + "source_type": "(deprecated)", + "name": "(deprecated)", + "system": "Methode", + "edit_url": "http://washpost.methode.com/foo/bar/1234-5678", + "additional_properties": { + "foo": "bar" + } + }, + + "distributor": { + "reference_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ", + "mode": "reference" + }, + + "syndication": { + "external_distribution": true, + "search": true + }, + + "comments": { + "comments_period": 14, + "allow_comments": true, + "display_comments": true, + "moderation_required": false, + + "additional_properties": { + "favorite_comment": "All work and no play makes Jack a dull boy." + } + }, + + "voice_transcripts": [{ + "_id": "vt-1", + "type": "voice_transcript", + "subtype": "short", + + "options": { + "enabled": true, + "voice": "joanna" + }, + + "options_used": { + "enabled": true, + "voice": "joanna" + }, + + "output": { + "type": "audio", + "version": "0.10.11", + "streams": [{ + "url": "https://arc-content-api.s3.amazonaws.com/polly/test.mp3" + }] + } + }, { + "_id": "vt-2", + "type": "voice_transcript", + "subtype": "full", + + "options": { + "enabled": true + }, + "options_used": { + "enabled": true + }, + "streams": [{ + "bitrate": 96, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-96.mp3" + }, { + "bitrate": 128, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-128.mp3" + }] + }], + + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-good-taxonomy.json b/tests/fixtures/schema/0.10.11/story-fixture-good-taxonomy.json new file mode 100644 index 00000000..98c64a89 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-good-taxonomy.json @@ -0,0 +1,111 @@ +{ + "_id": "unique ANS id", + "version": "0.10.11", + "type": "story", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "channels": ["ios", "android"], + "language": "en", + "taxonomy": { + "associated_tasks": [ + "5b9a7ffce4b0a981ee6a9897", + "5b92bfcbe08ea96cb2fa8cab", + "5b92bb3ce08ea96cb2fa8ca4" + ], + "tags": [ + { + "_id": "fred", + "type": "tag", + "subtype": "basic", + "text": "Fred", + "slug": "fred", + "description": "For all things Fred", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "writing", + "subtype": "basic", + "text": "Writing" + }, + { + "text": "Obama" + } + ], + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "named_entities": [ + { + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization" + }, + { + "_id": "barack-obama", + "name": "Barack Obama", + "type": "person" + }, + { + "_id": "washington-dc", + "name": "Washington D.C.", + "type": "location" + } + ], + "primary_site": { + "_id": "site_primary", + "type": "site", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news", + "additional_properties": { + "baz": "bag" + } + }, + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.11", + "primary": false, + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.11", + "primary": true, + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id": "site_1", + "additional_properties": { + "foo": "bar" + } + } + ], + "stock_symbols": [ + "IBM", + "INTL", + "AMZN", + "MRSFT" + ], + "additional_properties": { + "more": "info" + } + }, + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-good.json b/tests/fixtures/schema/0.10.11/story-fixture-good.json new file mode 100644 index 00000000..eaeff5b9 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-good.json @@ -0,0 +1,558 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "channels": ["ios", "android"], + "credits": { + "by": [ + { + "name": "John Q. Reporter", + "byline": "John Q. Reporter", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ] + } + ] + }, + "contributors": { + "created_by" : { + "user_id": "william.davis@washpost.com", + "display_name": "Tyler Davis" + } + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "Copyright © 2018 Thomson Reuters.", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "content_restrictions": { + "content_code": "green" + }, + "related_content": { + "basic": [ + { + "type": "reference", + "_id": "00001", + "channels": [ + "mobile" + ], + + "referent": { + "type": "story", + "id": "ABCDEFGHIJKLMNO", + "provider": "http://www.story.com/api", + "referent_properties":{ + "alt_headline": "An alternate headline" + } + } + } + ], + "redirect": [{ + "type": "redirect", + "version": "0.10.11", + "canonical_url": "/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "redirect_url": "http://www.washingtonpost.com/editors-note/published-too-soon.html" + }] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "tags": [ + { + "_id": "fred", + "text": "Fred", + "slug": "fred", + "description": "For all things Fred", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "writing", + "text": "Writing" + } + ], + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "named_entities": [ + { + "_id": "jpmorgan-chase", + "name": "JPMorgan Chase", + "type": "organization", + "score": 1.0 + }, + { + "_id": "barack-obama", + "name": "Barack Obama", + "type": "person", + "score": 0.8 + }, + { + "_id": "washington-dc", + "name": "Washington D.C.", + "type": "location", + "score": 0.3 + } + ], + "primary_site": { + "_id": "site_primary", + "type": "site", + "version": "0.10.11", + "name": "News", + "description": "General News", + "path": "/news", + "additional_properties": { + "baz": "bag" + } + }, + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.11", + "primary": false, + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.11", + "primary": true, + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id" : "site_1", + "additional_properties": { + "foo": "bar" + } + } + ], + "stock_symbols": [ "IBM", "INTL", "AMZN", "MRSFT" ], + "additional_properties": { + "more": "info" + } + }, + "label": { + "basic": { + "text": "The Kicker", + "url": "https://www.washingtonpost.com/kicker", + "display": true, + "additional_properties": { + "bar": "foo" + } + }, + "another_one": { + "text": "Another One" + } + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "first_publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + + "planning": { + "scheduling": { + "planned_publish_date": "2015-06-24T09:49:00.10Z", + "scheduled_publish_date": "2015-06-24T09:49:00.10Z", + "will_have_gallery": true, + "will_have_graphic": false, + "will_have_image": true, + "will_have_video": false + }, + "story_length": { + "word_count_planned": 2400, + "word_count_actual": 3000, + "inch_count_planned": 6, + "inch_count_actual": 8, + "line_count_planned": 100, + "line_count_actual": 120 + } + }, + + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + + }, + { + "_id": "456", + "type": "text", + + "content": "this is my second paragraph" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.11", + "alignment": "left", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id" : "t1", + "type" : "text", + "content" : "Foo" + + }, + { + "_id" : "t2", + "type": "text", + + "content" : "Bar" + }, + { + "_id" : "l2", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "t4", + "type": "text", + + "content" : "Hi" + }, + { + "_id": "t5", + "type": "text", + + "content" : "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + + }, + { + "_id": "549876543210", + "type": "quote", + "content_elements": [ + { + "type": "text", + "content": "I really like this sample sentence. Maybe we should use it?" + }, + { + "type": "quote", + "content_elements": [ + { + "type": "image", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Underwoodfive.jpg/220px-Underwoodfive.jpg", + "version": "0.10.11" + }, + { + "type": "text", + "content": "Now is the time for all good men to come to the aid of their party." + } + ], + "citation": { + "type": "text", + "content": "Charles E. Weller; The Early History of the Typewriter, p. 21 (1918)" + } + } + ], + "citation": { + "type": "text", + "content": "Me, on Slack, two minutes ago." + } + }, + + { + "_id": "659876643210", + "type": "correction", + "correction_type": "clarification", + "text": "An earlier version of this article attributed the above quote to David Foster Wallace." + }, + + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": ["web"] + + }, + { + "_id": "22222229", + "type": "reference", + "channels": ["ios", "android"], + "alignment": "left", + + "referent": { + "provider": "https://api.twitter.com/1/statuses/oembed.json", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656" + } + + }, + { + "_id": "22222220", + "type": "oembed_response", + "additional_properties": { + "Foo": "Bar" + }, + "raw_oembed": { + "type": "video", + "version": "1.0", + "provider_name": "Vimeo", + "provider_url": "https://vimeo.com/", + "title": "The New Vimeo Player (You Know, For Videos)", + "author_name": "Vimeo Staff", + "author_url": "https://vimeo.com/staff", + "is_plus": "0", + "html": "", + "width": 480, + "height": 270, + "duration": 62, + "description": "It may look (mostly) the same on the surface, but under the hood we totally rebuilt our player. Here’s a quick rundown of some of the coolest new features:\n\n• Lightning fast playback\n• Redesigned Share screen\n• Closed caption and subtitle compatible\n• HTML5 by default\n• Purchase-from-player functionality for embedded Vimeo On Demand trailers\n• More responsive than ever (go ahead, resize it, we dare you!!!)\n\nWe’re really proud of these updates. So proud that we made a spiffy new page to showcase all the reasons why we have the best video player in the galaxy. Check it out here: http://vimeo.com/player\n\nIn short, this is a player that even haters can love.", + "thumbnail_url": "https://i.vimeocdn.com/video/452001751_295x166.jpg", + "thumbnail_width": 295, + "thumbnail_height": 166, + "thumbnail_url_with_play_button": "https://i.vimeocdn.com/filter/overlay?src=https://i.vimeocdn.com/video/452001751_295x166.jpg&src=http://f.vimeocdn.com/p/images/crawler_play.png", + "upload_date": "2013-10-15 14:08:29", + "video_id": 76979871, + "uri": "/videos/76979871" + }, + "referent": { + "provider": "https://vimeo.com/api/oembed.json?url=", + "id": "76979871" + } + }, + { + "_id": "safas9dafs097asd890f", + "type": "interstitial_link", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?" + }, + { + "_id": "safas9dafs097asd8911", + "type": "element_group", + "content_elements": [ + { + "type": "image", + "url": "http://foo.com/foo.jpg", + "caption": "Foo", + "version": "0.10.11" + }, + { + "type": "image", + "url": "http://bar.com/bar.jpg", + "caption": "Bar", + "version": "0.10.11" + } + ] + }, + { + "_id": "safas9dafs097asd8911001fs", + "type": "numeric_rating", + "numeric_rating": 4.5, + "min": 0, + "max": 5, + "units": "stars" + }, + { + "_id": "7asd8911001fs4144sajhvt", + "type": "endorsement", + "endorsement": "Recommended" + } + ], + + "corrections": [ + { + "type": "correction", + "correction_type": "clarification", + "text": "What I said before was not exactly true." + }, + { + "type": "correction", + "correction_type": "correction", + "text": "What I said before was false and not true." + } + ], + + "owner": { + "id": "washpost", + "name": "(deprecated)", + "sponsored": false + }, + + "source": { + "source_id": "1234-5678", + "source_type": "(deprecated)", + "name": "(deprecated)", + "system": "Methode", + "edit_url": "http://washpost.methode.com/foo/bar/1234-5678", + "additional_properties": { + "foo": "bar" + } + }, + + "distributor": { + "name": "Reuters", + "category": "wires", + "subcategory": "wires-reuters", + "additional_properties": { + "foo": "bar" + } + }, + + "syndication": { + "external_distribution": true, + "search": true + }, + + "comments": { + "comments_period": 14, + "allow_comments": true, + "display_comments": true, + "moderation_required": false, + + "additional_properties": { + "favorite_comment": "All work and no play makes Jack a dull boy." + } + }, + + "voice_transcripts": [{ + "_id": "vt-1", + "type": "voice_transcript", + "subtype": "short", + + "options": { + "enabled": true, + "voice": "joanna" + }, + + "options_used": { + "enabled": true, + "voice": "joanna" + }, + + "output": { + "type": "audio", + "version": "0.10.11", + "streams": [{ + "url": "https://arc-content-api.s3.amazonaws.com/polly/test.mp3" + }] + } + }, { + "_id": "vt-2", + "type": "voice_transcript", + "subtype": "full", + + "options": { + "enabled": true + }, + "options_used": { + "enabled": true + }, + "streams": [{ + "bitrate": 96, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-96.mp3" + }, { + "bitrate": 128, + "url": "https://arc-content-api.s3.amazonaws.com/polly/test-full-128.mp3" + }] + }], + + "additional_properties": { + "foo": "bar" + } +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-references.json b/tests/fixtures/schema/0.10.11/story-fixture-references.json new file mode 100644 index 00000000..a43c23aa --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-references.json @@ -0,0 +1,238 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.11", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "reference", + + "referent": { + "type": "author", + "service": "http://www.credits.com/api", + "provider": "http://www.credits.com/api", + "id": "00001" + } + } + ], + "additional reporting by": [ + { + "type": "author", + "version": "0.10.11", + "name": "Greg Engel", + "byline": "Greggo" + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The basic headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "related_content": { + "basic": [ + { + "_id": "some other unique ANS id", + "type": "story", + "version": "0.10.11" + }, + { + "type": "reference", + "referent": { + "id": "1", + "type": "image", + "service": "", + "provider": "" + } + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "name": "Ansel Adams", + "byline": "Ansel Adams", + "type": "author", + "version": "0.10.11" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + }, + "second": { + "type": "reference", + "referent": { + "type": "image", + "id": "1", + "service": "", + "provider": "" + } + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "primary_site": { + "type": "reference", + "referent": { + "id": "news", + "provider": "https://sites.arcpublishing.com/api", + "type": "site" + } + }, + "sites": [ + { + "type": "site", + "name": "Cool Site", + "version": "0.10.11" + }, + { + "type": "reference", + "referent": { + "id": "78", + "provider": "https://sites.arcpublishing.com/api", + "type": "site" + } + } + ] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "

this is my first paragraph

" + + }, + { + "_id": "456", + "type": "text", + + "content": "

this is my second paragraph

" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.11", + + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.11", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id" : "t1", + "type" : "text", + "content" : "Foo" + + }, + { + "_id" : "t2", + "type": "text", + + "content" : "Bar" + }, + { + "_id" : "l2", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "t4", + "type": "text", + + "content" : "Hi" + }, + { + "_id": "t5", + "type": "text", + + "content" : "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + + }, + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": ["web"] + }, + { + "type": "reference", + + "referent": { + "type": "oembed", + "provider": "https://api.twitter.com/1.1/statuses/oembed.json", + "id": "755767310309265408" + } + } + + + ] +} diff --git a/tests/fixtures/schema/0.10.11/story-fixture-tiny-house.json b/tests/fixtures/schema/0.10.11/story-fixture-tiny-house.json new file mode 100644 index 00000000..9278e3ef --- /dev/null +++ b/tests/fixtures/schema/0.10.11/story-fixture-tiny-house.json @@ -0,0 +1,293 @@ +{ + "_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "type": "story", + "version": "0.10.11", + "created_date": "2015-07-02T09:50:50.52Z", + "last_updated_date": "2015-07-02T09:50:50.52Z", + "credits": { + "by": [{ + "_id": "AUTHOR1", + "name": "Nina Patel", + "byline": "Nina Patel", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11", + "slug": "nina-patel" + }] + }, + "vanity_credits": { + "by": [{ + "name": "Nina Patel contributed this story for The Washington Post.", + "byline": "Nina Patel contributed this story for The Washington Post.", + "org": "The Washington Post", + "type": "author", + "version": "0.10.11" + }] + }, + + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "locality": "Washington, D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/lifestyle/magazine/tiny-house-big-benefitsfreedom-from-a-mortgage--and-stuff/2015/06/23/f8f706f0-0acc-11e5-9e39-0db921c47b93_story.html", + "short_url": "http://wapo.st/1Kavaxv", + "headlines": { + "basic": "Tiny house, big benefits:\u2009Freedom from a mortgage and worries \u2014 and stuff" + }, + "description": { + "basic": "Tiny house, big benefits:\u2009Freedom from a mortgage and worries \u2014 and stuff" + }, + "related_content": { + "basic": [ + { + "type": "story", + "_id": "some other unique ANS id", + "version": "0.10.11" + }, + { + "_id": "100000081", + "type": "custom_embed", + "subtype": "my_video_type", + + "embed": { + "id": "12345", + "url": "https://my.custom.video.com/api/embed/", + "config": { + "autoplay": true, + "startPos": 32 + } + } + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { "by": [ + { + "type": "author", + "version": "0.10.11", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ]}, + "url": "https://img.washingtonpost.com/rw/2010-2019/WashingtonPost/2015/06/19/Magazine/Images/6_28%20Tinyhome2_r1.tif?uuid=fXQD2BbLEeWd3OM1NUIQDA", + "caption": "America is having a big love affair with tiny houses.", + "width": 320, + "height": 160 + }, + "embed": { + "_id": "100000082", + "type": "custom_embed", + "subtype": "my_video_type", + + "embed": { + "id": "12345", + "url": "https://my.custom.video.com/api/embed/", + "config": { + "autoplay": true, + "startPos": 32 + } + } + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "loft", + "frequency": 5, + "score": 0.09512891146702013 + }, + { + "keyword": "residence", + "frequency": 5, + "score": 0.0783147282615958 + } + ] + }, + "publish_date": "2015-07-02T09:49:00.10Z", + "display_date": "2015-07-02T09:49:00.10Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "1000002", + "type": "text", + "block_properties":{ + "dropcap": "letter" + }, + "content": "Why are Americans, whose homes average about 2,200 square feet, so obsessed with tiny homes? Perhaps they are responding to the benefits tiny-house owners cite: financial and emotional freedom, a greener lifestyle, the satisfaction of building one’s own refuge." + }, + { + "_id": "1000003", + "type": "text", + "content": "The phrase “ ‘tiny house’ put a name to the movement that was already there,” says Thom Stanton, a tiny-home builder in West Virginia." + }, + { + "_id": "10000035", + "type": "divider", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "1000004", + "type": "text", + "content": "Stanton says two groups are fueling the movement: millennials, because their college loans have put traditional houses out of reach, and retiring baby boomers looking for affordable homes with minimal maintenance. Meanwhile, traditional homeowners are contributing to the trend by building tiny houses on their properties to shelter guests, family members or caregivers, or putting them on vacation land." + }, + { + "_id": "ABC", + "type": "link_list", + "subtype": "more-information", + "alignment": "right", + + "title": "Learn More", + "items": [ + { + "_id": "DEF", + "type": "interstitial_link", + "subtype": "highlight", + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory", + "content": "Can Clinton and Trump ride to big victories in next weeks Acela primary?", + "description": { + "type": "text", + "content": "Emboldened by dominant victories in New York, Hillary Clinton and Donald Trump plunged swiftly Wednesday into the next batch of primaries in five states along the Northeast Corridor, where they hope to bury or break their challengers for the Democratic and Republican presidential nominations." + }, + "image": { + "type": "reference", + "referent": { + "type": "image", + "id": "AAAAAFGHIJKLMNOPQRSTUVWXYZ", + "provider": "" + } + } + }, + + { + "_id": "GHI", + "type": "interstitial_link", + "subtype": "skinny", + + "url": "https://www.washingtonpost.com", + "content": "See more from The Washington Post" + } + ] + }, + + { + "_id": "1000005", + "type": "image", + "version": "0.10.11", + "alignment": "left", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.11", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://img.washingtonpost.com/rw/2010-2019/WashingtonPost/2015/06/19/Magazine/Images/6_28%20Tinyhome2_r1.tif?uuid=fXQD2BbLEeWd3OM1NUIQDA", + "caption": "America is having a big love affair with tiny houses.", + "width": 320, + "height": 160 + }, + { + "_id": "1000006", + "type": "text", + "content": "But there’s one big drawback: Many municipalities haven’t made room literally or legislatively for tiny residences. It’s a challenge to find a place to park a tiny house if you don’t own land. And they often fall into a legal limbo. “Tiny houses exist in sort of a legal gray area, neither explicitly allowed nor expressly forbidden,” says tiny-home owner Jay Austin of Northeast Washington. Though the District recently banned “camping” in tiny-house-like structures, Austin says he has been told the provision is unenforceable." + }, + { + "_id": "10000008", + "type": "custom_embed", + "subtype": "my_video_type", + + "embed": { + "id": "12345", + "url": "https://my.custom.video.com/api/embed/", + "config": { + "referent": { + "type": "video", + "id": "12345", + "provider": "" + }, + "autoplay": true, + "startPos": 32 + } + } + } + ], + "slug": "tiny-house-story", + "revision": { + "revision_id": "1", + "parent_id": "0", + "branch": "default", + "editions": [ "default" ], + "user_id": "engelg", + "published": true, + "additional_properties": { + "foo": "bar" + } + }, + "publishing": { + "has_published_edition": true, + "editions": { + "default": { + "edition_name": "default", + "edition_date": "2017-04-15T15:00:00Z", + "edition_first_publish_date": "2017-04-15T12:00:00Z", + "edition_publish_date": "2017-04-15T12:00:00Z", + "edition_display_date": "2017-04-15T15:00:00Z", + "edition_revision_id": "CAIP33ODLZD5LESQ3CH6MLP6IM", + "edition_published": true, + "additional_properties": { + "foo":"bar" + } + }, + "print": { + "edition_name": "print", + "edition_date": "2017-04-16T15:00:00Z", + "edition_first_publish_date": "2017-04-16T15:00:00Z", + "edition_publish_date": "2017-04-16T15:00:00Z", + "edition_display_date": "2017-04-16T15:00:00Z", + "edition_revision_id": "CAIP33ODLZD5LESQ3CH6MLP6IM", + "edition_published": true + } + }, + "scheduled_operations": { + "publish_edition": [{ + "operation": "publish_edition", + "operation_date": "2017-04-20T15:00:00Z", + "operation_revision_id": "DDDP33ODLZD5LESQ3CH6MLP6IM", + "operation_edition": "default", + "additional_properties": { + "foo": "bar" + } + }], + "unpublish_edition": [{ + "operation": "unpublish_edition", + "operation_date": "2017-04-30T15:00:00Z", + "operation_edition": "default", + "additional_properties": { + "foo": "bar" + } + }] + }, + "additional_properties": { + "foo":"bar" + } + } +} diff --git a/tests/fixtures/schema/0.10.11/table-fixture-bad.json b/tests/fixtures/schema/0.10.11/table-fixture-bad.json new file mode 100644 index 00000000..5c49021d --- /dev/null +++ b/tests/fixtures/schema/0.10.11/table-fixture-bad.json @@ -0,0 +1,66 @@ +{ + "type": "table", + "_id": "0987654321", + "subtype": "special_table", + "channels": [ "web" ], + "additional_properties": { + "goodbye": "birdie" + }, + + "rows": [ + { + "type": "table_row", + "_id": "B", + "subtype": "special_row", + "channels": [ "web" ], + "additional_properties": { + "x": "y" + }, + + "cells": [ + { + "type": "table_cell", + "_id": "B1", + + "subtype": "special_cell", + "channels": [ "phone" ], + "additional_properties": { + "hi": "mom" + }, + + "content_elements": [ + { "_id": "1", "type": "invalid_type", "content": "X = 1, Y = 1" } + ] + + }, + { + "type": "table_cell", + "content_elements": [ + { "_id": "2", "type": "another_invalid_type", "content": "X = 2, Y = 1" } + ] + } + ] + }, + + { + "_id": "C", + "type": "table_row", + "cells": [ + { + "type": "table_cell", + "content_elements": [ + { "_id": "1", "type": "text", "content": "X = 1, Y = 1" } + ] + }, + { + "type": "table_cell", + "content_elements": [ + { "_id": "2", "type": "text", "content": "X = 2, Y = 1" } + ] + } + ] + } + + ] + +} diff --git a/tests/fixtures/schema/0.10.11/table-fixture-good.json b/tests/fixtures/schema/0.10.11/table-fixture-good.json new file mode 100644 index 00000000..9f52f404 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/table-fixture-good.json @@ -0,0 +1,7 @@ +{ + "_id": "0987654321", + "type": "table", + "header": [ { "_id": "a", "type": "text", "content": "Header Y = 1" }, { "_id": "b", "type": "text", "content": "Header Y = 1" } ], + "rows": [ [ { "_id": "1", "type": "text", "content": "X = 1, Y = 1" }, { "_id": "2", "type": "text", "content": "X = 2, Y = 1" } ], + [ { "_id": "3", "type": "text", "content": "X = 2, Y = 1" }, { "_id": "4", "type": "text", "content": "X = 2, Y = 2" } ] ] +} diff --git a/tests/fixtures/schema/0.10.11/tag-fixture-bad-no-text.json b/tests/fixtures/schema/0.10.11/tag-fixture-bad-no-text.json new file mode 100644 index 00000000..e3cb2a6a --- /dev/null +++ b/tests/fixtures/schema/0.10.11/tag-fixture-bad-no-text.json @@ -0,0 +1,4 @@ +{ + "type": "tag", + "subtype": "basic" +} diff --git a/tests/fixtures/schema/0.10.11/tag-fixture-bad-subtype.json b/tests/fixtures/schema/0.10.11/tag-fixture-bad-subtype.json new file mode 100644 index 00000000..e60d4322 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/tag-fixture-bad-subtype.json @@ -0,0 +1,4 @@ +{ + "subtype": null, + "text": "news" +} diff --git a/tests/fixtures/schema/0.10.11/tag-fixture-bad-type.json b/tests/fixtures/schema/0.10.11/tag-fixture-bad-type.json new file mode 100644 index 00000000..16e5eb58 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/tag-fixture-bad-type.json @@ -0,0 +1,5 @@ +{ + "type": "label", + "subtype": "basic", + "text": "news" +} diff --git a/tests/fixtures/schema/0.10.11/tag-fixture-good.json b/tests/fixtures/schema/0.10.11/tag-fixture-good.json new file mode 100644 index 00000000..f69c0106 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/tag-fixture-good.json @@ -0,0 +1,6 @@ +{ + "type": "tag", + "subtype": "basic", + "text": "Washington", + "_id": "washington" +} diff --git a/tests/fixtures/schema/0.10.11/taxonomy-fixture-good.json b/tests/fixtures/schema/0.10.11/taxonomy-fixture-good.json new file mode 100644 index 00000000..0d1b5984 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/taxonomy-fixture-good.json @@ -0,0 +1,23 @@ +{ + "keywords": [ + { + "keyword": "foo" + }, + { + "keyword": "bar", + "score": 0.333, + "frequency": 5 + } + ], + "tags": [ + { + "_id": "YRAXSARSPFFC5O577BS5XIJ5M4", + "text": "apples and bananas", + "slug": "apples-and-bananas", + "description": "Apples & Bananas", + "additional_properties": { + "something": "else" + } + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/text-fixture-bad.json b/tests/fixtures/schema/0.10.11/text-fixture-bad.json new file mode 100644 index 00000000..7ef81241 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/text-fixture-bad.json @@ -0,0 +1,3 @@ +{ + "name": "vaughant" +} diff --git a/tests/fixtures/schema/0.10.11/text-fixture-good-additional-properties.json b/tests/fixtures/schema/0.10.11/text-fixture-good-additional-properties.json new file mode 100644 index 00000000..6ad6fdfd --- /dev/null +++ b/tests/fixtures/schema/0.10.11/text-fixture-good-additional-properties.json @@ -0,0 +1,5 @@ +{ + "type":"text", + "content": "Some text", + "additional_properties": { "foo": "bar" } +} diff --git a/tests/fixtures/schema/0.10.11/text-fixture-good-channels.json b/tests/fixtures/schema/0.10.11/text-fixture-good-channels.json new file mode 100644 index 00000000..a0c00c5f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/text-fixture-good-channels.json @@ -0,0 +1,6 @@ +{ + "_id": "0987654321", + "type": "text", + "content": "Here's my text", + "channels": ["web", "ios", "android"] +} diff --git a/tests/fixtures/schema/0.10.11/text-fixture-good.json b/tests/fixtures/schema/0.10.11/text-fixture-good.json new file mode 100644 index 00000000..af9a5c2b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/text-fixture-good.json @@ -0,0 +1,5 @@ +{ + "_id": "0987654321", + "type": "text", + "content": "Here's my text" +} diff --git a/tests/fixtures/schema/0.10.11/topic-fixture-bad-id-type.json b/tests/fixtures/schema/0.10.11/topic-fixture-bad-id-type.json new file mode 100644 index 00000000..e7cbde95 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/topic-fixture-bad-id-type.json @@ -0,0 +1,6 @@ +{ + "id": 12345, + "name": "This should fail because id is a string, not a number.", + "score": 0.77, + "uid": "tz" +} diff --git a/tests/fixtures/schema/0.10.11/topic-fixture-bad-missing-uid.json b/tests/fixtures/schema/0.10.11/topic-fixture-bad-missing-uid.json new file mode 100644 index 00000000..59637bfb --- /dev/null +++ b/tests/fixtures/schema/0.10.11/topic-fixture-bad-missing-uid.json @@ -0,0 +1,5 @@ +{ + "id": "This should fail because the uid is missing.", + "name": "Defense and Cybersecurity", + "score": 0.77 +} diff --git a/tests/fixtures/schema/0.10.11/topic-fixture-good-missing-name.json b/tests/fixtures/schema/0.10.11/topic-fixture-good-missing-name.json new file mode 100644 index 00000000..9c69190b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/topic-fixture-good-missing-name.json @@ -0,0 +1,5 @@ +{ + "_id": "12345", + "score": 0.77, + "uid": "tz" +} diff --git a/tests/fixtures/schema/0.10.11/topic-fixture-good.json b/tests/fixtures/schema/0.10.11/topic-fixture-good.json new file mode 100644 index 00000000..683066cc --- /dev/null +++ b/tests/fixtures/schema/0.10.11/topic-fixture-good.json @@ -0,0 +1,6 @@ +{ + "_id": "12345", + "name": "Defense and Cybersecurity", + "score": 0.77, + "uid": "tz" +} diff --git a/tests/fixtures/schema/0.10.11/trait-copyrighted-fixture-good.json b/tests/fixtures/schema/0.10.11/trait-copyrighted-fixture-good.json new file mode 100644 index 00000000..47b09b49 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-copyrighted-fixture-good.json @@ -0,0 +1,3 @@ +{ + "copyright": "(c) 2015 The Washington Post, Inc." +} diff --git a/tests/fixtures/schema/0.10.11/trait-credited-fixture-bad-missing-credit.json b/tests/fixtures/schema/0.10.11/trait-credited-fixture-bad-missing-credit.json new file mode 100644 index 00000000..078c1b85 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-credited-fixture-bad-missing-credit.json @@ -0,0 +1,6 @@ +{ + "foo": [ + "definitely", + "not a credit" + ] +} diff --git a/tests/fixtures/schema/0.10.11/trait-credited-fixture-good.json b/tests/fixtures/schema/0.10.11/trait-credited-fixture-good.json new file mode 100644 index 00000000..569c25ed --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-credited-fixture-good.json @@ -0,0 +1,14 @@ +{ + "credits": [ + { + "name": "The Person Getting Author Credit", + "org": "The Washington Post", + "role": "Author" + }, + { + "name": "Someone Else Getting Contributor Credit", + "org": "The Washington Times", + "role": "Contributor" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/trait-dated-fixture-bad-date-format.json b/tests/fixtures/schema/0.10.11/trait-dated-fixture-bad-date-format.json new file mode 100644 index 00000000..a1055e14 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-dated-fixture-bad-date-format.json @@ -0,0 +1,4 @@ +{ + "created_date": "2015/06/25 11:50:50.52Z", + "last_updated_date": "2015-06-25T09:51:50.52Z" +} diff --git a/tests/fixtures/schema/0.10.11/trait-dated-fixture-good.json b/tests/fixtures/schema/0.10.11/trait-dated-fixture-good.json new file mode 100644 index 00000000..e4687ef3 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-dated-fixture-good.json @@ -0,0 +1,4 @@ +{ + "created_date": "2015-06-25T09:50:50.52Z", + "last_updated_date": "2015-06-25T09:51:50.52Z" +} diff --git a/tests/fixtures/schema/0.10.11/trait-id-fixture-bad-missing-id.json b/tests/fixtures/schema/0.10.11/trait-id-fixture-bad-missing-id.json new file mode 100644 index 00000000..3703f675 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-id-fixture-bad-missing-id.json @@ -0,0 +1,3 @@ +{ + "blah": "doesn't contain a id field" +} diff --git a/tests/fixtures/schema/0.10.11/trait-id-fixture-good.json b/tests/fixtures/schema/0.10.11/trait-id-fixture-good.json new file mode 100644 index 00000000..29f8f08a --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-id-fixture-good.json @@ -0,0 +1,3 @@ +{ + "_id": "some globally unique id" +} diff --git a/tests/fixtures/schema/0.10.11/trait-locale-fixture-good.json b/tests/fixtures/schema/0.10.11/trait-locale-fixture-good.json new file mode 100644 index 00000000..e09dff1b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-locale-fixture-good.json @@ -0,0 +1,3 @@ +{ + "language": "ja" +} diff --git a/tests/fixtures/schema/0.10.11/trait-located-fixture-good.json b/tests/fixtures/schema/0.10.11/trait-located-fixture-good.json new file mode 100644 index 00000000..2cd7f331 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-located-fixture-good.json @@ -0,0 +1,15 @@ +{ + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region":"D.C.", + "postal_code": "20002", + "country_name": "USA" + } +} diff --git a/tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-numeric-status.json b/tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-numeric-status.json new file mode 100644 index 00000000..c8a7b47a --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-numeric-status.json @@ -0,0 +1,3 @@ +{ + "status": "pitched1" +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-space-in-status.json b/tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-space-in-status.json new file mode 100644 index 00000000..8d796dde --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-space-in-status.json @@ -0,0 +1,3 @@ +{ + "status": "not watching" +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-uppercase-status.json b/tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-uppercase-status.json new file mode 100644 index 00000000..212e1c28 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-pitch-event-fixture-uppercase-status.json @@ -0,0 +1,3 @@ +{ + "status": "PITCHED" +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/trait-pitches-fixture-good.json b/tests/fixtures/schema/0.10.11/trait-pitches-fixture-good.json new file mode 100644 index 00000000..bca8ac5b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-pitches-fixture-good.json @@ -0,0 +1,40 @@ +{ + "platform": [ + { + "platform_path": "/homepage", + "creation_event": { + "status": "pitched", + "time": "2017-02-27T09:45:00Z", + "user_id": "john.doe", + "note": "This is a great story that would work well on the homepage." + }, + "latest_event": { + "status": "watching", + "time": "2017-02-27T10:30:00Z", + "user_id": "jane.smith", + "note": "Looks interesting, we'll keep an eye on it." + } + } + ], + "publication": [ + { + "publication_id": "5852f14de4b0c123b7d34c5c", + "creation_event": { + "status": "pitched", + "time": "2017-02-27T10:15:00Z", + "user_id": "john.doe", + "note": "Please consider this for tomorrow's paper.", + "edition_id": "5852f14de4b0c123b7d78d2a", + "edition_time": "2017-02-28T06:00:00Z" + }, + "latest_event": { + "status": "booked", + "time": "2017-02-27T10:45:00Z", + "user_id": "jane.smith", + "note": "Will run on A1 tomorrow.", + "edition_id": "5852f14de4b0c123b7d78d2a", + "edition_time": "2017-02-28T06:00:00Z" + } + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/trait-planning-fixture-good.json b/tests/fixtures/schema/0.10.11/trait-planning-fixture-good.json new file mode 100644 index 00000000..8e48021e --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-planning-fixture-good.json @@ -0,0 +1,24 @@ +{ + "budget_line": "allies killed by U.S. missile strike in Syria story 2017-04-13", + "internal_note": "Tweeted", + "websked_sort_date": "2017-02-27T13:50:00Z", + "scheduling": { + "planned_publish_date": "2017-02-27T13:50:00Z", + "will_have_image": true, + "will_have_video": false, + "will_have_graphic": false, + "will_have_gallery": false + }, + "story_length": { + "word_count_planned": 1000, + "word_count_actual": 800, + "inch_count_planned": 30, + "inch_count_actual": 25, + "line_count_planned": 100, + "line_count_actual": 80, + "character_count_planned": 2500, + "character_count_actual": 1500, + "character_encoding": "UTF-8" + }, + "deadline_miss": 45 +} diff --git a/tests/fixtures/schema/0.10.11/trait-promo-item-raw-html-bad.json b/tests/fixtures/schema/0.10.11/trait-promo-item-raw-html-bad.json new file mode 100644 index 00000000..9e95bec2 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-promo-item-raw-html-bad.json @@ -0,0 +1,6 @@ +{ + "basic": { + "type": "raw_html1", + "content": "

HTML content 1

" + } +} diff --git a/tests/fixtures/schema/0.10.11/trait-promo-item-raw-html-goog.json b/tests/fixtures/schema/0.10.11/trait-promo-item-raw-html-goog.json new file mode 100644 index 00000000..aabb597f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-promo-item-raw-html-goog.json @@ -0,0 +1,30 @@ +{ + "basic": { + "type": "raw_html", + "content": "

HTML content 1

" + }, + "bright": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.11", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://img.washingtonpost.com/rw/2010-2019/WashingtonPost/2015/06/19/Magazine/Images/6_28%20Tinyhome2_r1.tif?uuid=fXQD2BbLEeWd3OM1NUIQDA", + "caption": "America is having a big love affair with tiny houses.", + "width": 320, + "height": 160 + }, + "arbitrary_key": { + "type": "raw_html", + "content": "

HTML content 2

" + } +} diff --git a/tests/fixtures/schema/0.10.11/trait-publishing-fixture-bad-mismatched-operations.json b/tests/fixtures/schema/0.10.11/trait-publishing-fixture-bad-mismatched-operations.json new file mode 100644 index 00000000..2b4197d0 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-publishing-fixture-bad-mismatched-operations.json @@ -0,0 +1,10 @@ +{ + "has_published_edition": true, + "scheduled_operations": { + "publish_edition": [{ + "type": "story_operation", + "operation": "delete", + "story_id": "ABC" + }] + } +} diff --git a/tests/fixtures/schema/0.10.11/trait-related-content-bad-attached-redirect-has-multiple-items.json b/tests/fixtures/schema/0.10.11/trait-related-content-bad-attached-redirect-has-multiple-items.json new file mode 100644 index 00000000..d0ec724c --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-related-content-bad-attached-redirect-has-multiple-items.json @@ -0,0 +1,30 @@ +{ + "basic": [ + { + "type": "story", + "version": "0.10.11" + }, + { + "type": "reference", + "referent": { + "type": "story", + "id": "ABCDEFG", + "provider": "" + } + } + ], + "redirect": [ + { + "type": "redirect", + "version": "0.10.11", + "canonical_url": "/here", + "redirect_url": "/there" + }, + { + "type": "redirect", + "version": "0.10.11", + "canonical_url": "/here", + "redirect_url": "/there2" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/trait-related-content-bad-attached-redirect-is-not-redirect.json b/tests/fixtures/schema/0.10.11/trait-related-content-bad-attached-redirect-is-not-redirect.json new file mode 100644 index 00000000..c044cf39 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-related-content-bad-attached-redirect-is-not-redirect.json @@ -0,0 +1,26 @@ +{ + "basic": [ + { + "type": "story", + "version": "0.10.11" + }, + { + "type": "reference", + "referent": { + "type": "story", + "id": "ABCDEFG", + "provider": "" + } + } + ], + "redirect": [ + { + "type": "reference", + "referent": { + "type": "story", + "id": "ABCDEFG", + "provider": "" + } + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/trait-workflow-fixture-bad-code.json b/tests/fixtures/schema/0.10.11/trait-workflow-fixture-bad-code.json new file mode 100644 index 00000000..856eebad --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-workflow-fixture-bad-code.json @@ -0,0 +1,3 @@ +{ + "status_code": 0 +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/trait-workflow-fixture-good.json b/tests/fixtures/schema/0.10.11/trait-workflow-fixture-good.json new file mode 100644 index 00000000..904088a9 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/trait-workflow-fixture-good.json @@ -0,0 +1,4 @@ +{ + "status_code": 1, + "note": "Please copy edit for tonight." +} \ No newline at end of file diff --git a/tests/fixtures/schema/0.10.11/ul-fixture-bad.json b/tests/fixtures/schema/0.10.11/ul-fixture-bad.json new file mode 100644 index 00000000..7ef81241 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/ul-fixture-bad.json @@ -0,0 +1,3 @@ +{ + "name": "vaughant" +} diff --git a/tests/fixtures/schema/0.10.11/ul-fixture-good-nested.json b/tests/fixtures/schema/0.10.11/ul-fixture-good-nested.json new file mode 100644 index 00000000..5d7ac6f8 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/ul-fixture-good-nested.json @@ -0,0 +1,40 @@ +{ + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + + "items": [ + { + "_id": "A", + + "type" : "text", + "content" : "Foo" + }, + { + "_id": "B", + + "type": "text", + "content" : "Bar" + }, + { + "_id": "C", + "type": "list", + + "list_type": "ordered", + "items" : [ + { + "_id": "D", + + "type": "text", + "content" : "Hi" + }, + { + "_id": "E", + + "type": "text", + "content" : "Mom" + } + ] + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/ul-fixture-good.json b/tests/fixtures/schema/0.10.11/ul-fixture-good.json new file mode 100644 index 00000000..18593902 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/ul-fixture-good.json @@ -0,0 +1,22 @@ +{ + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + "items": [ + { + "_id": "1", + "type" : "text", + "content" : "Foo" + }, + { + "_id": "2", + "type": "text", + "content" : "Bar" + }, + { + "_id": "3", + "type": "text", + "content" : "Baz" + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/url-operation-insert-redirect.json b/tests/fixtures/schema/0.10.11/url-operation-insert-redirect.json new file mode 100644 index 00000000..d1fef10b --- /dev/null +++ b/tests/fixtures/schema/0.10.11/url-operation-insert-redirect.json @@ -0,0 +1,12 @@ +{ + "id" : "23423423url", + "date" : "2016-04-02T12:02:00+00:00", + "operation" : "insert-redirect", + "organization_id" : "staging", + "type" : "url-operation", + "version" : "0.10.11", + "original_url" : "/original-url", + "destination_url" : "/destination-url", + "priority": "standard", + "app_name": "ellipsis" +} diff --git a/tests/fixtures/schema/0.10.11/video-fixture-bad-empty-geo-restriction.json b/tests/fixtures/schema/0.10.11/video-fixture-bad-empty-geo-restriction.json new file mode 100644 index 00000000..2072eb21 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/video-fixture-bad-empty-geo-restriction.json @@ -0,0 +1,101 @@ +{ + "_id": "unique ANS id", + "type": "video", + "version": "0.10.11", + "channels": ["ios", "android", "web", "appletv"], + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [{ + "name": "Bruce Harris", + "byline": "Bruce Harris", + "type": "author", + "version": "0.10.11" + }] + }, + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "locality": "Washington, D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "canonical_url": "https://www.youtube.com/watch?v=iZ-nBDcMlWs", + "taxonomy": { + "keywords": [ + { + "keyword": "sailing", + "score": 0.005 + } + ] + }, + "description": { + "basic": "We went out in 25+ knots and massive waves with two 420's and a 470 off Sandringham Yacht Club... The result was a broken camera and some almost broken sailors. We hope you enjoy the carnage and speed. " + }, + "content_restrictions": { + "content_code": "green", + "geo": {} + }, + "duration": 139000, + "transcript": "This is a transcript of all the words said in the video. This can go on for quite some time.", + "rating": "graphic", + "video_type": "clip", + "youtube_content_id": "nKW3wvhnZoE", + "streams": [{ + "height": 360, + "width": 640, + "fileSize": 4443944, + "audioCodec": "", + "videoCodec": "", + "streamType": "ts", + "url": "https://videos.posttv.com/washpost-production/The%20Washington%20Post/20150701/55944729e4b082c8417f4483/55944904e4b0ef3ccc0da042_t_1435781395718_mobile.m3u8", + "bitrate": 600, + "provider": "elastictranscoder" + }, { + "height": 360, + "width": 640, + "fileSize": 2738596, + "audioCodec": "", + "videoCodec": "", + "streamType": "ts", + "url": "https://videos.posttv.com/washpost-production/The%20Washington%20Post/20150701/55944729e4b082c8417f4483/55944904e4b0ef3ccc0da042_t_1435781395718_mobile.m3u8", + "bitrate": 300, + "provider": "elastictranscoder" + } + ], + "promo_image": { + "_id": "unique image id", + "type": "image", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "location": "Washington, D.C.", + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "width": 800, + "height": 640 + }, + "subtitles": { + "confidence": 0.657583939, + "subtitlesUrls": [{ + "format": "DFXP", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.dfxp" + }, { + "format": "RAW_TEXT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.rawtext" + }] + }, + "embed_html": "", + "additional_properties": { + "foo": "bar" + }, + "corrections": [ + { + "type": "correction", + "correction_type": "clarification", + "text": "An earlier version of this video stated that Dewey defeated Truman. Truman defeated Dewey." + } + ] +} diff --git a/tests/fixtures/schema/0.10.11/video-fixture-good-attached-redirect.json b/tests/fixtures/schema/0.10.11/video-fixture-good-attached-redirect.json new file mode 100644 index 00000000..cb27104f --- /dev/null +++ b/tests/fixtures/schema/0.10.11/video-fixture-good-attached-redirect.json @@ -0,0 +1,99 @@ +{ + "_id": "unique ANS id", + "type": "video", + "version": "0.10.11", + + "embed_html": "", + "additional_properties": { + "foo": "bar" + }, + "corrections": [ + { + "type": "correction", + "correction_type": "clarification", + "text": "An earlier version of this video stated that Dewey defeated Truman. Truman defeated Dewey." + } + ] + +} diff --git a/tests/fixtures/schema/0.10.11/video-fixture-nationals.json b/tests/fixtures/schema/0.10.11/video-fixture-nationals.json new file mode 100644 index 00000000..a57ce4d0 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/video-fixture-nationals.json @@ -0,0 +1,167 @@ +{ + "_id": "5592c09fe4b082c8417f3f72", + "type": "video", + "version": "0.10.11", + "created_date": "2015-06-25T09:50:50.52Z", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "locality": "Washington, D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "canonical_url": "http://www.washingtonpost.com/posttv/sports/nationals-hitting-a-stride-wizards-draft-oubre/2015/06/30/38a49c74-1f43-11e5-a135-935065bc30d0_video.html", + "taxonomy": { + "keywords": [ + { + "keyword": "baseball", + "score": 0.18299719127400172 + }, + { + "keyword": "nationals", + "frequency": 5, + "score": 0.09512891146702013 + } + ] + }, + "description": { + "basic": "Post Sports Live discusses the Nationals' successful run despite injuries and whether the Wizards gave up too much to draft Kelly Oubre Jr." + }, + "duration": 1198000, + "transcript": "Lorem ipsum blah blah blah...", + "rating": "all_ages", + "video_type": "clip", + "youtube_content_id": "wWEwUpHvqJg", + "streams": [{ + "height": 720, + "width": 1280, + "filesize": 327819354, + "audioCodec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413917562171-fstwsn_t_1435680963322_1280_720_2000.mp4", + "bitrate": 2000, + "provider": "elastictranscoder" + }, { + "height": 360, + "width": 640, + "filesize": 111252083, + "audio_codec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413917693028-uimk59_t_1435680963322_640_360_600.mp4", + "bitrate": 600, + "provider": "elastictranscoder" + }, { + "height": 360, + "width": 640, + "filesize": 75300016, + "audio_codec": "", + "video_codec": "", + "stream_type": "ts", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435680963733_mobile.m3u8", + "bitrate": 300, + "provider": "elastictranscoder" + }, { + "height": 720, + "width": 1280, + "filesize": 352558468, + "audio_codec": "", + "video_codec": "", + "stream_type": "ts", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435680963733_master.m3u8", + "bitrate": 2000, + "provider": "elastictranscoder" + }, { + "height": 180, + "width": 320, + "filesize": 52552204, + "audio_codec": "", + "video_codec": "", + "stream_type": "ts", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435680963733_mobile.m3u8", + "bitrate": 160, + "provider": "elastictranscoder" + }, { + "height": 180, + "width": 320, + "filesize": 44471331, + "audio_codec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413918388651-bhdhw9_t_1435680963322_320_180_160.mp4", + "bitrate": 160, + "provider": "elastictranscoder" + }, { + "height": 1080, + "width": 1920, + "filesize": 838371405, + "audio_codec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413917648266-520npb_t_1435680963322_1920_1080_5400.mp4", + "bitrate": 5400, + "provider": "elastictranscoder" + }, { + "height": 360, + "width": 640, + "filesize": 124434944, + "audio_codec": "", + "video_codec": "", + "stream_type": "ts", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435680963733_mobile.m3u8", + "bitrate": 600, + "provider": "elastictranscoder" + }, { + "height": 480, + "width": 854, + "filesize": 202124710, + "audio_codec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413917780312-tgh3by_t_1435680963322_854_480_1200.mp4", + "bitrate": 1200, + "provider": "elastictranscoder" + }, { + "height": 1080, + "width": 1920, + "filesize": 838371405, + "audio_codec": "", + "video_codec": "", + "stream_type": "smil", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435681422368.smil", + "bitrate": 5400, + "provider": "elastictranscoder" + }], + "promo_image": { + "_id": "5592c09fe4b082c8417f3f72", + "type": "image", + "version": "0.10.11", + "created_date": "2015-07-01T09:50:50.52Z", + "location": "Washington, D.C.", + "url": "http://s3.amazonaws.com/posttv-thumbnails-prod/thumbnails/5592c09fe4b082c8417f3f72/fullshow_0630.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "width": 1920, + "height": 640 + }, + "subtitles": { + "confidence": 0.75130093, + "subtitlesUrls": [{ + "format": "DFXP", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.dfxp" + }, { + "format": "RAW_TEXT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.rawtext" + }, { + "format": "SRT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.srt" + }, { + "format": "WEB_VTT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.vtt" + }] + } +} diff --git a/tests/fixtures/schema/0.10.11/video-stream-fixture-good.json b/tests/fixtures/schema/0.10.11/video-stream-fixture-good.json new file mode 100644 index 00000000..9ec1a222 --- /dev/null +++ b/tests/fixtures/schema/0.10.11/video-stream-fixture-good.json @@ -0,0 +1,11 @@ +{ + "height": 360, + "width": 640, + "fileSize": 4443944, + "audioCodec": "mpeg-3", + "videoCodec": "mpeg-4", + "streamType": "ts", + "url": "https://videos.posttv.com/washpost-production/The%20Washington%20Post/20150701/55944729e4b082c8417f4483/55944904e4b0ef3ccc0da042_t_1435781395718_mobile.m3u8", + "bitrate": 600, + "provider": "elastictranscoder" +} diff --git a/tests/fixtures/schema/0.10.11/video-subtitles-fixture-good.json b/tests/fixtures/schema/0.10.11/video-subtitles-fixture-good.json new file mode 100644 index 00000000..95c63a1e --- /dev/null +++ b/tests/fixtures/schema/0.10.11/video-subtitles-fixture-good.json @@ -0,0 +1,16 @@ +{ + "confidence": 0.75130093, + "urls": [{ + "format": "DFXP", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.dfxp" + }, { + "format": "RAW_TEXT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.rawtext" + }, { + "format": "SRT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.srt" + }, { + "format": "WEB_VTT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.vtt" + }] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/image-fixture-good-no-height-width.json b/tests/fixtures/transforms/0.10.10/image-fixture-good-no-height-width.json new file mode 100644 index 00000000..82a7f40a --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/image-fixture-good-no-height-width.json @@ -0,0 +1,6 @@ +{ + "_id": "unique ANS id", + "type": "image", + "version": "0.10.10", + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg" +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/image-fixture-good.json b/tests/fixtures/transforms/0.10.10/image-fixture-good.json new file mode 100644 index 00000000..0ef30211 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/image-fixture-good.json @@ -0,0 +1,47 @@ +{ + "_id": "unique ANS id", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "subtitle": "Scalia tried to make the court a conservative stronghold. He failed.", + "width": 800, + "height": 640, + "taxonomy": { + "keywords": [ + { + "keyword": "Supreme Court", + "score": 0.003816102874901 + } + ], + "tags": [] + }, + "additional_properties": { + "foo": "bar" + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-bad-mixed-sub-document-versions.json b/tests/fixtures/transforms/0.10.10/story-fixture-bad-mixed-sub-document-versions.json new file mode 100644 index 00000000..6b6c84fb --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-bad-mixed-sub-document-versions.json @@ -0,0 +1,249 @@ +{ + "version": "0.10.10", + "type": "story", + "related_content": { + "basic": [ + { + "type": "gallery", + "version": "0.10.10", + "content_elements": [ + { + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "location": "Washington, D.C.", + "copyright": "(c) 2015, The Washington Post, Inc", + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "subtitle": "Scalia tried to make the court a conservative stronghold. He failed.", + "width": 800, + "height": 640, + "taxonomy": { + "keywords": [ + { + "keyword": "Supreme Court", + "score": 0 + } + ], + "tags": [] + }, + "additional_properties": { + "foo": "bar" + } + } + ] + } + ] + }, + "content_elements": [ + { + "type": "story", + "version": "0.10.10", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "created_date": "2015-06-24T09:50:50.52Z", + "content_elements": [ + { + "content": "this is my first paragraph", + "type": "text", + "_id": "123" + }, + { + "content": "this is my second paragraph", + "type": "text", + "_id": "456" + }, + { + "height": 640, + "width": 800, + "subtitle": "Never gonna let you down", + "caption": "Never gonna give you up", + "url": "https://tinyurl.com/mqyonhb", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "created_date": "2015-06-25T09:50:50.52Z", + "version": "0.10.10", + "type": "image", + "_id": "789" + }, + { + "items": [ + { + "content": "Foo", + "type": "text", + "_id": "t1" + }, + { + "content": "Bar", + "type": "text", + "_id": "t2" + }, + { + "items": [ + { + "content": "Hi", + "type": "text", + "_id": "t4" + }, + { + "content": "Mom", + "type": "text", + "_id": "t5" + } + ], + "list_type": "ordered", + "type": "list", + "_id": "l2" + } + ], + "list_type": "unordered", + "type": "list", + "_id": "49876543210" + }, + { + "content": "Here's my html", + "type": "blockquote", + "_id": "549876543210" + }, + { + "channels": [ + "web" + ], + "content": "", + "type": "raw_html", + "_id": "649876543210" + }, + { + "type": "reference", + "_id": "22222229", + "channels": [ + "ios", + "android" + ], + "referent": { + "type": "oembed", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656", + "provider": "https://api.twitter.com/1/statuses/oembed.json" + } + } + ], + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "display_date": "2015-06-25T09:50:50.52Z", + "status": "published", + "publish_date": "2015-06-24T09:49:00.10Z", + "taxonomy": { + "keywords": [ + { + "frequency": 2, + "score": 0.77, + "keyword": "Anesthesiologist" + } + ], + "tags": [] + }, + "promo_items": { + "basic": { + "height": 640, + "width": 800, + "subtitle": "Never gonna let you down", + "caption": "Never gonna give you up", + "url": "https://tinyurl.com/mqyonhb", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "created_date": "2015-06-25T09:50:50.52Z", + "version": "0.10.10", + "type": "image", + "_id": "unique ANS id" + } + }, + "related_content": { + "basic": [ + { + "version": "0.10.10", + "type": "story", + "_id": "some other unique ANS id" + } + ] + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "headlines": { + "twitter": "Twitter headline!", + "basic": "The default headline for this story" + }, + "short_url": "http://wapo.st/1Crp6bY", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "copyright": "(c) 2015 The Washington Post, Inc.", + "address": { + "country_name": "USA", + "postal_code": "20002", + "region": "D.C.", + "locality": "Washington", + "extended_address": "West Wing", + "street_address": "1600 Pennsylvania Ave" + }, + "geo": { + "longitude": -77.0164, + "latitude": 38.9047 + }, + "location": "Washington, D.C.", + "language": "en", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "John Q. Reporter", + "image": { + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90", + "created_date": "2015-06-25T09:50:50.52Z", + "version": "0.10.10", + "type": "image", + "_id": "unique ANS id" + }, + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "url": "https://www.twitter.com/Anthony_Faiola", + "site": "twitter" + }, + { + "url": "https://www.facebook.com/anthony.faiola", + "site": "facebook" + } + ], + "byline": "John Q. Reporter", + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "org": "The Washington Post" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-good-mystery-element.json b/tests/fixtures/transforms/0.10.10/story-fixture-good-mystery-element.json new file mode 100644 index 00000000..7127d341 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-good-mystery-element.json @@ -0,0 +1,124 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.10", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "John Q. Reporter", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ], + "byline": "John Q. Reporter", + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "org": "The Washington Post" + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "related_content": { + "basic": [ + { + "_id": "some other unique ANS id", + "type": "story", + "version": "0.10.10" + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "tags": [] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "000", + "type": "ghost", + "content": "I am haunting your ANS with a new content element type! Ooooooooo!" + }, + { + "_id": "123", + "type": "text", + "content": "

this is my first paragraph

" + }, + { + "_id": "456", + "type": "text", + "content": "

this is my second paragraph

" + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-good-old-labels-recursive.json b/tests/fixtures/transforms/0.10.10/story-fixture-good-old-labels-recursive.json new file mode 100644 index 00000000..ee0c07f8 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-good-old-labels-recursive.json @@ -0,0 +1,26 @@ +{ + "type": "story", + "version": "0.10.10", + "content_elements": [ + { + "type": "story", + "version": "0.10.10", + "label": { + "basic": { + "text": "" + }, + "__renamed_invalid_name": { + "text": "Foo" + } + } + } + ], + "label": { + "basic": { + "additional_properties": { + "key": "value" + }, + "text": "" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-good-old-style-label-and-source.json b/tests/fixtures/transforms/0.10.10/story-fixture-good-old-style-label-and-source.json new file mode 100644 index 00000000..25fab2ff --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-good-old-style-label-and-source.json @@ -0,0 +1,25 @@ +{ + "type": "story", + "version": "0.10.10", + "source": { + "source_type": "Wires", + "name": "Reuters", + "system": "Arc I/O", + "source_id": "ABC-DEF-45G", + "additional_properties": { + "more": "data" + } + }, + "label": { + "basic": { + "additional_properties": { + "field": "value", + "why": "is there no text here" + }, + "text": "" + }, + "__renamed_invalid_name": { + "text": "Invalid name for a label." + } + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-good-references-2.json b/tests/fixtures/transforms/0.10.10/story-fixture-good-references-2.json new file mode 100644 index 00000000..82a505c8 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-good-references-2.json @@ -0,0 +1,19 @@ +{ + "type": "story", + "version": "0.10.10", + "content_elements": [ + { + "type": "reference", + "foo": "bar", + "referent": { + "id": "1", + "type": "author", + "three": "four", + "provider": "https://foo.com/authorservice" + }, + "additional_properties": { + "one": "two" + } + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-good-references-3.json b/tests/fixtures/transforms/0.10.10/story-fixture-good-references-3.json new file mode 100644 index 00000000..427f0faa --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-good-references-3.json @@ -0,0 +1,14 @@ +{ + "type": "story", + "version": "0.10.10", + "content_elements": [ + { + "type": "reference", + "referent": { + "id": "1", + "type": "author", + "provider": "https://foo.com/authorservice" + } + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-good-slugs.json b/tests/fixtures/transforms/0.10.10/story-fixture-good-slugs.json new file mode 100644 index 00000000..b1f9b055 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-good-slugs.json @@ -0,0 +1,30 @@ +{ + "type": "story", + "version": "0.10.10", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Thomas Jefferson", + "byline": "Thomas Jefferson", + "additional_properties": { + "slug": "thomas-jefferson" + } + } + ] + }, + "content_elements": [ + { + "type": "story", + "version": "0.10.10", + "additional_properties": { + "slug": "foo" + } + } + ], + "additional_properties": { + "foo": "bar", + "slug": "story-about-tj-life" + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-good-tags.json b/tests/fixtures/transforms/0.10.10/story-fixture-good-tags.json new file mode 100644 index 00000000..b1c7b575 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-good-tags.json @@ -0,0 +1,42 @@ +{ + "type": "story", + "version": "0.10.10", + "taxonomy": { + "tags": [ + { + "_id": "ABC", + "text": "Foo" + }, + { + "text": "Bar", + "additional_properties": { + "tag": "wrong" + } + }, + { + "_id": "DEF", + "text": "Baz", + "additional_properties": { + "tag": "Baz" + } + }, + { + "_id": "GHI", + "text": "Car", + "description": "Not automobiles", + "slug": "car", + "additional_properties": { + "one": "two", + "prop1": "foo", + "slug": "carrr--", + "prop2": "bar", + "additional_properties": { + "one": "two", + "prop1": "baz", + "slug": "carrr--" + } + } + } + ] + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-good.json b/tests/fixtures/transforms/0.10.10/story-fixture-good.json new file mode 100644 index 00000000..55ca7aad --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-good.json @@ -0,0 +1,354 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.10", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "John Q. Reporter", + "image": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "url": "https://img.washingtonpost.com/wp-apps/imrs.php?src=http://wp-eng-static.washingtonpost.com/author_images/faiolaam.jpg?ts=1405950848547&w=90&h=90" + }, + "url": "https://www.washingtonpost.com/people/anthony-faiola", + "social_links": [ + { + "site": "twitter", + "url": "https://www.twitter.com/Anthony_Faiola" + }, + { + "site": "facebook", + "url": "https://www.facebook.com/anthony.faiola" + } + ], + "byline": "John Q. Reporter", + "bio": "Anthony Faiola is The Post's Berlin bureau chief. Faiola joined the Post in 1994, since then reporting for the paper from five continents and serving as bureau chief in Tokyo, Buenos Aires, New York and London.", + "org": "The Washington Post" + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "related_content": { + "basic": [ + { + "_id": "some other unique ANS id", + "type": "story", + "version": "0.10.10" + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.10", + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + }, + "primary": false + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.10", + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id": "site_1", + "additional_properties": { + "foo": "bar" + }, + "primary": false + } + ], + "tags": [ + { + "_id": "tag1", + "text": "tag one", + "description": "The first tag", + "slug": "tag-one", + "additional_properties": { + "foo": "bar" + } + }, + { + "_id": "tag2", + "text": "tag two", + "additional_properties": { + "tag": "tag two" + } + } + ] + }, + "label": { + "basic": { + "text": "The Kicker", + "url": "https://www.washingtonpost.com/kicker", + "display": true, + "additional_properties": { + "bar": "foo" + } + }, + "another_one": { + "text": "Another One" + } + }, + "source": { + "source_id": "1234-5678", + "name": "The Washington Post", + "system": "Methode", + "additional_properties": { + "foo": "bar", + "type": "Original" + } + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "owner": { + "id": "washpost", + "sponsored": false + }, + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + }, + { + "_id": "456", + "type": "text", + "content": "this is my second paragraph" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "sites": [ + { + "_id": "site_1", + "type": "site", + "version": "0.10.10", + "name": "Business", + "description": "For all your business needs", + "path": "/business", + "additional_properties": { + "foo": "bar" + }, + "primary": false + }, + { + "_id": "site_2", + "type": "site", + "version": "0.10.10", + "name": "Manufacturing", + "description": "For all your manufacturing needs", + "path": "/business/manufacturing", + "parent_id": "site_1", + "additional_properties": { + "foo": "bar" + }, + "primary": false + } + ], + "tags": [] + } + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + "items": [ + { + "_id": "t1", + "type": "text", + "content": "Foo" + }, + { + "_id": "t2", + "type": "text", + "content": "Bar" + }, + { + "_id": "l2", + "type": "list", + "list_type": "ordered", + "items": [ + { + "_id": "t4", + "type": "text", + "content": "Hi" + }, + { + "_id": "t5", + "type": "text", + "content": "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + }, + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": [ + "web" + ] + }, + { + "type": "reference", + "_id": "22222229", + "channels": [ + "ios", + "android" + ], + "referent": { + "type": "oembed", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656", + "provider": "https://api.twitter.com/1/statuses/oembed.json" + } + } + ], + "corrections": [ + { + "correction_type": "retraction", + "text": "This document is a fabrication by the author and is false.", + "type": "correction" + }, + { + "correction_type": "clarification", + "text": "An earlier version of this document mis-spelled the name of William Jefferson Clinton.", + "additional_properties": { + "foo": "bar" + }, + "type": "correction" + }, + { + "type": "correction", + "correction_type": "clarification", + "additional_properties": { + "content": "An earlier version of this document mis-spelled the name of William Jefferson Clinton." + }, + "text": "" + }, + { + "type": "correction", + "correction_type": "clarification", + "text": "An earlier version of this document mis-spelled the name of George Walker Bush.", + "additional_properties": { + "foo": "bar", + "content": "An earlier version of this document mis-spelled the name of William Jefferson Clinton." + }, + "alignment": "left", + "channels": [ + "web" + ], + "subtype": "why", + "_id": "correction_4" + } + ], + "comments": { + "comments_period": 14, + "allow_comments": true, + "display_comments": true, + "moderation_required": false, + "additional_properties": { + "favorite_comment": "All work and no play makes Jack a dull boy." + } + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-oembed.json b/tests/fixtures/transforms/0.10.10/story-fixture-oembed.json new file mode 100644 index 00000000..6defab16 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-oembed.json @@ -0,0 +1,37 @@ +{ + "type": "story", + "version": "0.10.10", + "content_elements": [ + { + "type": "reference", + "referent": { + "id": "1234567890", + "provider": "https://api.twitter.com/1/statuses/oembed.json" + }, + "additional_properties": { + "type": "oembed" + } + }, + { + "type": "reference", + "referent": { + "type": "oembed", + "id": "1234567890", + "provider": "https://api.twitter.com/1/statuses/oembed.json" + } + }, + { + "type": "reference", + "_id": "1234", + "subtype": "twitter", + "additional_properties": { + "abraham": "lincoln" + }, + "referent": { + "type": "oembed", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656", + "provider": "https://api.twitter.com/1/statuses/oembed.json" + } + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-planning-status-code-is-string.json b/tests/fixtures/transforms/0.10.10/story-fixture-planning-status-code-is-string.json new file mode 100644 index 00000000..64bb710c --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-planning-status-code-is-string.json @@ -0,0 +1,39 @@ +{ + "type": "story", + "version": "0.10.10", + "content_elements": [ + { + "type": "text", + "content": "Plans are in motion." + } + ], + "headlines": { + "basic": "A simple story with big plans.." + }, + "planning": { + "scheduling": { + "planned_publish_date": "2015-06-24T09:49:00.10Z", + "scheduled_publish_date": "2015-06-24T09:49:00.10Z", + "will_have_gallery": true, + "will_have_graphic": false, + "will_have_image": true, + "will_have_video": false + }, + "story_length": { + "word_count_planned": 2400, + "word_count_actual": 3000, + "inch_count_planned": 6, + "inch_count_actual": 8 + }, + "additional_properties": { + "status": { + "workflow": "2", + "note": "This is a private note." + } + } + }, + "workflow": { + "status_code": 2, + "note": "This is a private note." + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-planning.json b/tests/fixtures/transforms/0.10.10/story-fixture-planning.json new file mode 100644 index 00000000..839dcc6c --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-planning.json @@ -0,0 +1,39 @@ +{ + "type": "story", + "version": "0.10.10", + "content_elements": [ + { + "type": "text", + "content": "Plans are in motion." + } + ], + "headlines": { + "basic": "A simple story with big plans.." + }, + "planning": { + "scheduling": { + "planned_publish_date": "2015-06-24T09:49:00.10Z", + "scheduled_publish_date": "2015-06-24T09:49:00.10Z", + "will_have_gallery": true, + "will_have_graphic": false, + "will_have_image": true, + "will_have_video": false + }, + "story_length": { + "word_count_planned": 2400, + "word_count_actual": 3000, + "inch_count_planned": 6, + "inch_count_actual": 8 + }, + "additional_properties": { + "status": { + "workflow": 2, + "note": "This is a private note." + } + } + }, + "workflow": { + "status_code": 2, + "note": "This is a private note." + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-promo-items-empty.json b/tests/fixtures/transforms/0.10.10/story-fixture-promo-items-empty.json new file mode 100644 index 00000000..c1e46f97 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-promo-items-empty.json @@ -0,0 +1,5 @@ +{ + "type": "story", + "version": "0.10.10", + "promo_items": {} +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-promo-items-no-basic.json b/tests/fixtures/transforms/0.10.10/story-fixture-promo-items-no-basic.json new file mode 100644 index 00000000..3a086c82 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-promo-items-no-basic.json @@ -0,0 +1,11 @@ +{ + "type": "story", + "version": "0.10.10", + "promo_items": { + "secondary": { + "type": "image", + "version": "0.10.10", + "url": "http://www.google.com/logo.png" + } + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-references-with-channel.json b/tests/fixtures/transforms/0.10.10/story-fixture-references-with-channel.json new file mode 100644 index 00000000..9d7c4963 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-references-with-channel.json @@ -0,0 +1,28 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.10", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "language": "en", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "content_elements": [ + { + "_id": "123", + "type": "text", + "channels": [ + "web" + ], + "content": "

this is my first paragraph

" + }, + { + "_id": "456", + "type": "text", + "channels": [ + "post-it-note" + ], + "content": "

this is my second paragraph

" + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-references.json b/tests/fixtures/transforms/0.10.10/story-fixture-references.json new file mode 100644 index 00000000..a2f5cdb7 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-references.json @@ -0,0 +1,191 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.10", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "reference", + "referent": { + "type": "author", + "service": "http://www.credits.com/api", + "provider": "http://www.credits.com/api", + "id": "00001" + } + } + ], + "additional reporting by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Greg Engel", + "byline": "Greg Engel" + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "street_address": "1600 Pennsylvania Ave", + "extended_address": "West Wing", + "locality": "Washington", + "region": "D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The basic headline for this story", + "twitter": "Twitter headline!" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "related_content": { + "basic": [ + { + "_id": "some other unique ANS id", + "type": "story", + "version": "0.10.10" + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "tags": [] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "

this is my first paragraph

" + }, + { + "_id": "456", + "type": "text", + "content": "

this is my second paragraph

" + }, + { + "_id": "789", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://tinyurl.com/mqyonhb", + "caption": "Never gonna give you up", + "subtitle": "Never gonna let you down", + "width": 800, + "height": 640 + }, + { + "_id": "49876543210", + "type": "list", + "list_type": "unordered", + "items": [ + { + "_id": "t1", + "type": "text", + "content": "Foo" + }, + { + "_id": "t2", + "type": "text", + "content": "Bar" + }, + { + "_id": "l2", + "type": "list", + "list_type": "ordered", + "items": [ + { + "_id": "t4", + "type": "text", + "content": "Hi" + }, + { + "_id": "t5", + "type": "text", + "content": "Mom" + } + ] + } + ] + }, + { + "_id": "549876543210", + "type": "blockquote", + "content": "Here's my html" + }, + { + "_id": "649876543210", + "type": "raw_html", + "content": "", + "channels": [ + "web" + ] + }, + { + "type": "reference", + "_id": "22222229", + "channels": [ + "ios", + "android" + ], + "referent": { + "type": "oembed", + "id": "https://twitter.com/BradDavis_WFTS/status/664422935130566656", + "provider": "https://api.twitter.com/1/statuses/oembed.json" + } + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-taxonomy-bugs.json b/tests/fixtures/transforms/0.10.10/story-fixture-taxonomy-bugs.json new file mode 100644 index 00000000..a5ab0945 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-taxonomy-bugs.json @@ -0,0 +1,119 @@ +{ + "_id": "unique ANS id", + "type": "story", + "version": "0.10.10", + "created_date": "2015-06-24T09:50:50.52Z", + "last_updated_date": "2015-06-24T09:50:50.52Z", + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/local/anesthesiologist-trashes-sedated-patient-jury-orders-her-to-pay-500000/2015/06/23/cae05c00-18f3-11e5-ab92-c75ae6ab94b5_story.html", + "short_url": "http://wapo.st/1Crp6bY", + "headlines": { + "basic": "The default headline for this story" + }, + "description": { + "basic": "A Vienna man went in for a colonoscopy and intended to record his doctor" + }, + "taxonomy": { + "keywords": [ + { + "keyword": "Anesthesiologist", + "score": 0.77, + "frequency": 2 + } + ], + "tags": [ + { + "additional_properties": { + "0": "a", + "1": "l", + "2": "p", + "3": "h", + "4": "a" + } + }, + { + "additional_properties": { + "0": "b", + "1": "e", + "2": "t", + "3": "a" + } + }, + { + "additional_properties": { + "0": "g", + "1": "a", + "2": "m", + "3": "m", + "4": "a" + } + } + ], + "sites": [ + { + "type": "site", + "name": "Business", + "path": "/business", + "primary": false + }, + { + "type": "site", + "title": "Finance", + "path": "/business/finance", + "parent": "/business", + "additional_properties": { + "primary": true + }, + "primary": true + }, + { + "type": "reference", + "referent": { + "id": "1", + "type": "site", + "provider": "foo" + }, + "additional_properties": { + "primary": true + } + } + ] + }, + "publish_date": "2015-06-24T09:49:00.10Z", + "status": "published", + "display_date": "2015-06-25T09:50:50.52Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "123", + "type": "text", + "content": "this is my first paragraph" + }, + { + "type": "story", + "_id": "456", + "taxonomy": { + "tags": [ + { + "additional_properties": { + "0": "d", + "1": "e", + "2": "l", + "3": "t", + "4": "a" + } + } + ], + "sites": [ + { + "type": "site", + "name": "Section 451", + "path": "/451", + "primary": false + } + ] + }, + "version": "0.10.10" + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-tiny-house.json b/tests/fixtures/transforms/0.10.10/story-fixture-tiny-house.json new file mode 100644 index 00000000..f03788b8 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-tiny-house.json @@ -0,0 +1,177 @@ +{ + "_id": "f8f706f0-0acc-11e5-9e39-0db921c47b93", + "type": "story", + "version": "0.10.10", + "created_date": "2015-07-02T09:50:50.52Z", + "last_updated_date": "2015-07-02T09:50:50.52Z", + "credits": { + "by": [ + { + "_id": "AUTHOR1", + "type": "author", + "version": "0.10.10", + "name": "Nina Patel", + "byline": "Nina Patel", + "org": "The Washington Post" + } + ] + }, + "language": "en", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "locality": "Washington, D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015 The Washington Post, Inc.", + "canonical_url": "http://www.washingtonpost.com/lifestyle/magazine/tiny-house-big-benefitsfreedom-from-a-mortgage--and-stuff/2015/06/23/f8f706f0-0acc-11e5-9e39-0db921c47b93_story.html", + "short_url": "http://wapo.st/1Kavaxv", + "headlines": { + "basic": "Tiny house, big benefits: Freedom from a mortgage and worries — and stuff" + }, + "description": { + "basic": "Tiny house, big benefits: Freedom from a mortgage and worries — and stuff" + }, + "related_content": { + "basic": [ + { + "type": "story", + "_id": "some other unique ANS id", + "version": "0.10.10" + } + ] + }, + "promo_items": { + "basic": { + "_id": "unique ANS id", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://img.washingtonpost.com/rw/2010-2019/WashingtonPost/2015/06/19/Magazine/Images/6_28%20Tinyhome2_r1.tif?uuid=fXQD2BbLEeWd3OM1NUIQDA", + "caption": "America is having a big love affair with tiny houses.", + "width": 320, + "height": 160 + } + }, + "taxonomy": { + "keywords": [ + { + "keyword": "loft", + "frequency": 5, + "score": 0.054891146702013 + }, + { + "keyword": "residence", + "frequency": 5, + "score": 0.0783147282615958 + } + ], + "tags": [] + }, + "publish_date": "2015-07-02T09:49:00.10Z", + "display_date": "2015-07-02T09:49:00.10Z", + "editor_note": "This URL earlier linked to a post that we’ve unpublished due to its flawed premise.", + "content_elements": [ + { + "_id": "1000000", + "type": "text", + "content": "America is having a big love affair with tiny houses. There are television shows: “Tiny House Nation” and “Tiny House Hunters.” There are movies: “Tiny: A Story About Living Small” and “Small Is Beautiful: A Tiny House Documentary.” Pinterest has more than 900 boards devoted to tiny houses, and design Web site Houzz showcases thousands of tiny- house photos. “Many Houzz readers have been fascinated by the idea of a portable home they can pay off quickly and personalize down to the smallest detail,” says editor Sheila Schmitz. And you know a concept has arrived when “Portlandia” skewers it: Check out the “Microhouse” episode." + }, + { + "_id": "1000002", + "type": "text", + "content": "Why are Americans, whose homes average about 2,200 square feet, so obsessed with tiny homes? Perhaps they are responding to the benefits tiny-house owners cite: financial and emotional freedom, a greener lifestyle, the satisfaction of building one’s own refuge." + }, + { + "_id": "1000003", + "type": "text", + "content": "The phrase “ ‘tiny house’ put a name to the movement that was already there,” says Thom Stanton, a tiny-home builder in West Virginia." + }, + { + "_id": "1000004", + "type": "text", + "content": "Stanton says two groups are fueling the movement: millennials, because their college loans have put traditional houses out of reach, and retiring baby boomers looking for affordable homes with minimal maintenance. Meanwhile, traditional homeowners are contributing to the trend by building tiny houses on their properties to shelter guests, family members or caregivers, or putting them on vacation land." + }, + { + "_id": "1000005", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Ansel Adams", + "byline": "Ansel Adams" + } + ] + }, + "url": "https://img.washingtonpost.com/rw/2010-2019/WashingtonPost/2015/06/19/Magazine/Images/6_28%20Tinyhome2_r1.tif?uuid=fXQD2BbLEeWd3OM1NUIQDA", + "caption": "America is having a big love affair with tiny houses.", + "width": 320, + "height": 160 + }, + { + "_id": "1000006", + "type": "text", + "content": "But there’s one big drawback: Many municipalities haven’t made room literally or legislatively for tiny residences. It’s a challenge to find a place to park a tiny house if you don’t own land. And they often fall into a legal limbo. “Tiny houses exist in sort of a legal gray area, neither explicitly allowed nor expressly forbidden,” says tiny-home owner Jay Austin of Northeast Washington. Though the District recently banned “camping” in tiny-house-like structures, Austin says he has been told the provision is unenforceable." + }, + { + "_id": "0987654321", + "type": "table", + "header": [ + { + "_id": "a", + "type": "text", + "content": "Header Y = 1" + }, + { + "_id": "b", + "type": "text", + "content": "Header Y = 1" + } + ], + "rows": [ + [ + { + "_id": "1", + "type": "text", + "content": "X = 1, Y = 1" + }, + { + "_id": "2", + "type": "text", + "content": "X = 2, Y = 1" + } + ], + [ + { + "_id": "3", + "type": "text", + "content": "X = 2, Y = 1" + }, + { + "_id": "4", + "type": "text", + "content": "X = 2, Y = 2" + } + ] + ] + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/story-fixture-versions.json b/tests/fixtures/transforms/0.10.10/story-fixture-versions.json new file mode 100644 index 00000000..132f2319 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/story-fixture-versions.json @@ -0,0 +1,416 @@ +{ + "_id": "6UFRMHAGUII6NMUD46OYDRR4DM", + "type": "story", + "subtype": "", + "version": "0.10.10", + "created_date": "2016-04-20T02:52:00.000Z", + "last_updated_date": "2016-04-22T02:11:04.000Z", + "language": "en", + "location": "Washington DC", + "address": { + "postal_code": "", + "region": "", + "locality": "", + "street_address": "", + "country_name": "" + }, + "geo": { + "latitude": -1, + "longitude": -1 + }, + "copyright": "(c) 2016, The Washington Post, Inc.", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "John Wagner", + "byline": "John Wagner", + "org": "The Washington Post" + }, + { + "type": "author", + "version": "0.10.10", + "name": "Dan Balz", + "byline": "Dan Balz", + "org": "The Washington Post" + } + ] + }, + "short_url": "http://wapo.st/1TjjBGm", + "canonical_url": "/politics/after-new-york-comes-the-question-what-does-bernie-want/2016/04/20/f50b161c-06a2-11e6-b283-e79d81c63c1b_story.html", + "description": { + "basic": "Facing daunting odds, Sanders must soon decide his next steps as the leader of progressives." + }, + "headlines": { + "mobile": "After New York comes the question: What does Bernie want?", + "basic": "After New York comes the question: What does Bernie want?", + "print": "What's next for Sanders? Much rests on his answer.", + "social": "After New York comes the question: What does Bernie want?" + }, + "promo_items": { + "basic": { + "_id": "R467QZQGRMI6NP7N55S575MXBU", + "type": "image", + "version": "0.10.10" + } + }, + "taxonomy": { + "keywords": [ + { + "score": 0, + "frequency": 0, + "keyword": "bernie sanders" + }, + { + "score": 0, + "frequency": 0, + "keyword": "hillary clinton" + }, + { + "score": 0, + "frequency": 0, + "keyword": "new york primary" + }, + { + "score": 0, + "frequency": 0, + "keyword": "campaign 2012" + } + ], + "tags": [ + { + "text": "", + "_id": "3OCY5PMYTVHP5EAL7GFKUC4MQE", + "additional_properties": { + "tag": "" + } + }, + { + "text": "", + "_id": "NTU4YE3J6JFULCAZWMBO545IEE", + "additional_properties": { + "tag": "" + } + } + ] + }, + "content_elements": [ + { + "_id": "", + "content": "

by John Wagner\n

\n

and Dan Balz\n

\n
", + "type": "raw_html" + }, + { + "_id": "UYJYYITS2RBPFLZVLU6377W5YU", + "content": "STATE COLLEGE, Pa. — Hillary Clinton's victory in the New York primary Tuesday has brought Sen. Bernie Sanders one step closer to a series of difficult decisions that can be summed up in one simple question: What does Bernie want?", + "type": "text" + }, + { + "_id": "4CYWL25TS5E2DLW2LXXZETGQFY", + "content": "How he answers that question will have a direct bearing on how united Democrats will be heading into the fall campaign — and whether Sanders will be able to leverage his success this year into lasting power and influence.", + "type": "text" + }, + { + "_id": "AYO2PFXSMVBFROPRNS25JZ6NCY", + "content": "His campaign for the Democratic presidential nomination has been more successful than almost anyone had predicted. He has generated a sizable and enthusiastic following, including an outpouring among young people and a gusher of small donations that more than matched the mighty Clinton financial network. His bold agenda has pushed Clinton to the left, a testament to the strength of the party's grass-roots progressive wing, which has made him its hero.", + "type": "text" + }, + { + "_id": "UBPWJE7EMBE63MMZBHUZ5S33B4", + "content": "But as Clinton extends her lead in pledged delegates, Sanders must now confront the reality that he has almost no chance of becoming the Democratic nominee. Instead he must decide what he will do with what he has built — starting with how he conducts his campaign over the next two months, how he navigates the party's national convention in July, what role he plays in the general election and, perhaps most important, what happens after the November results have been tallied.", + "type": "text" + }, + { + "_id": "I3SZTCYQ2FHN5N2HXOFRCBBDU4", + "content": "At the heart of many of these questions is another one: Will the self-described democratic socialist, who has run all his past campaigns as an independent, continue calling himself a Democrat after his presidential bid ends? (After this article was published online Wednesday, Sanders's campaign manager said he expects the senator to be a member of the party \"for life.\")", + "type": "text" + }, + { + "_id": "2AK6WV36MJHNPDIQBMGHYPORII", + "content": "Sanders advisers insist that, with the candidate focused on carrying on his campaign through the last of the primaries in June and on to the Philadelphia convention, there have been few discussions about such questions. But his wife, Jane, offered a preview of the candidate's thinking in an interview with The Washington Post just before New Yorkers went to the polls.", + "type": "text" + }, + { + "_id": "NLFJOAYOKFGKRD3SZ2KKDUQ7TM", + "content": "\"If he's president, he wants to keep this movement going,\" she said. \"If he's not president, he'll have to keep this movement going for a lot more reasons, because nobody else wants to accomplish what has ignited the interest of the voters.\"", + "type": "text" + }, + { + "_id": "6NNUSYAMEVBAJLVRBW35DVP4GI", + "content": "Asked what that might look like, she said: \"We'll figure that out, if and when. . . . Honestly, we will continue no matter what. There's enough people that will continue it. We'll keep that vision out there. I mean, he will not sit idly by. There's no doubt about that.\"", + "type": "text" + }, + { + "_id": "MNGT73PMPNCCJKJUZ7DW6INPMM", + "content": "Neil Sroka, communications director of the progressive advocacy group Democracy for America, or DFA — which was founded by former Vermont governor Howard Dean after his 2004 presidential campaign and which has endorsed Sanders — said Sanders has several options. ", + "type": "text" + }, + { + "_id": "3POCBD2FURGWHANGUNSLPHPMRY", + "content": "One would be something like DFA. Another would be a more traditional leadership PAC, while a third would be what Sroka called a \"let a thousand flowers bloom\" approach — working with a variety of existing organizations to further his progressive agenda.", + "type": "text" + }, + { + "_id": "WIDVHMR4KFGQJEO5A4OPZG3L6M", + "content": "Whatever route he chooses, Sanders \"has pole-vaulted himself into a real leadership position in the progressive movement,\" Sroka said. \"This movement now not only has Elizabeth Warren but Bernie Sanders. He's going to be a powerful voice in either the White House or the Senate.\"", + "type": "text" + }, + { + "_id": "TXTP3MCT25E4XC6DCC4HMF5OR4", + "content": "What Sanders decides about the future course of his campaign could be crucial to how quickly the party comes together after what has become an increasingly fractious nominating battle, something the Clinton forces are keenly aware of. Sanders's recent attacks on Clinton have alarmed her supporters. They are now listening closely for a change in his rhetoric — as there was in Clinton's at roughly the same point in 2008 in her contest against then-Sen. Barack Obama.", + "type": "text" + }, + { + "additional_properties": { + "url": "https://www.washingtonpost.com/politics/hillary-clinton-won-new-york-but-her-image-is-underwater/2016/04/19/d1ff2f3c-0620-11e6-b283-e79d81c63c1b_story.html?hpid=hp_rhp-top-table-main_take-1040pm%3Ahomepage%2Fstory" + }, + "referent": { + "id": "2H7S6PAGEAI6NMUD46OYDRR4DM", + "type": "story", + "provider": "" + }, + "type": "reference" + }, + { + "_id": "TYDXBJNP7VBYFJRLJTCSZNL3WY", + "content": "\"In 2008 after Hillary lost North Carolina, she made it clear that our days of attacking Obama were behind us and that we were not to do anything that would make it more difficult for Obama to win a general election,\" said Democratic pollster Geoff Garin, who was then a member of Clinton's campaign team and now serves as an adviser to Priorities USA, the pro-Clinton super PAC. \"She saw the thing through but refrained from criticisms of Obama that would leave a lasting mark. That's really the conversation that should be going on in the Sanders campaign.\"", + "type": "text" + }, + { + "_id": "2FOUH2GD65B5DFM2LLDKCKMHIQ", + "content": "But his campaign showed no immediate signs of relenting in its improbable bid to catch her in the chase for delegates.", + "type": "text" + }, + { + "_id": "EUCBFL3HH5GDPPIBUIZIS7HZUQ", + "content": "After the results from New York were in Tuesday night, Sanders's campaign manager, Jeff Weaver, appeared on MSNBC in front of a map of remaining states and outlined how he thinks the campaign could still close the delegate gap. He also said that if Sanders gets close, he will start actively trying to flip the allegiances of superdelegates, the elected officials and other party insiders who also get to weigh in on the nomination. So far, they have sided overwhelmingly with Clinton.", + "type": "text" + }, + { + "_id": "USJS6U4HPVFODL4NGWEL26KODQ", + "content": "Given that delegates are awarded proportionately in the Democratic contests, Sanders would need to not only win most of the remaining primaries and caucuses but win them by very lopsided margins to catch Clinton. Many of the upcoming contests are also closed to independents, who have bolstered Sanders's numbers in states where he has prevailed.", + "type": "text" + }, + { + "additional_properties": { + "url": "https://www.washingtonpost.com/politics/can-clinton-and-trump-ride-to-big-victories-in-next-weeks-acela-primary/2016/04/20/ea6454fc-064e-11e6-bdcb-0133da18418d_story.html?hpid=hp_rhp-top-table-main_5states-1025a%3Ahomepage%2Fstory" + }, + "referent": { + "id": "5JSFJ7AGJYI6NPOLAEZ5UGCBRU", + "type": "story", + "provider": "" + }, + "type": "reference" + }, + { + "_id": "YHFWEQWR6BEWRGCHAFJDIRCRQA", + "content": "The New York primary made it clear that while Sanders may not have the backing of a majority of Democrats, the affection of his supporters runs deep. In the closing days of the race, he turned out three of the largest crowds of his entire campaign, including an estimated 28,000-plus at a park Sunday afternoon in Brooklyn, where he grew up.", + "type": "text" + }, + { + "_id": "26JIBEE2PJBJFLCIGMZXJ6BT2E", + "content": "He was treated like a rock star as he walked the streets of New York with an entourage of aides, Secret Service agents and the press in tow, including on Monday during a 15-block stroll near the hotel where he stayed near Times Square. ", + "type": "text" + }, + { + "_id": "MGFAPPRXCBGPVB7S5CDMRK6PWE", + "content": "\"Oh, my God,\" a young woman exclaimed upon seeing him. Others could be heard calling friends on their cellphones to say they had run into Sanders. People requested selfies by the dozen. And there were near-constant calls of \"Feel the Bern\" and \"Love you, Bernie\" as he passed by, along with honks of approval from cars on the street.", + "type": "text" + }, + { + "_id": "U665XA2TDJBG3MCKWOS4EPLNQE", + "content": "That kind of enthusiasm is infectious and can make it all the more difficult for a candidate to pivot to a different phase of the campaign. Former Pennsylvania governor Ed Rendell (D), a Clinton supporter, praised Sanders for what he has accomplished, calling it \"an incredible feat\" — but he said the time is coming when Sanders will have to tone done his attacks on Clinton for the good of the party. But Rendell also said he understands how hard that can be.", + "type": "text" + }, + { + "_id": "4LORGMWPVJDTXOAE2T2HHAQ3Q4", + "content": "\"He has candidate-itis, which we all who have run for office have had at one time or another,\" Rendell said. \"You look at the crowds, you think: 'They love me. I'm going to win.' You get the feedback from the crowds and you really think you're going to win.\"", + "type": "text" + }, + { + "_id": "L2CVNMVYDZGOXKWOLXO7DYKRIM", + "content": "When Democrats get to Philadelphia in late July, it is assumed that Sanders has more than earned a prime-time speaking slot. Beyond that, he has also made clear he will seek to influence the shape of the party platform. Aides say the more delegates he takes into the convention, the more leverage he should have to do that.", + "type": "text" + }, + { + "_id": "5PP4SAKCHFCT3MQMCHYLGMPPDY", + "content": "Party leaders want no repeat of the 1980 Democratic convention, when President Jimmy Carter faced a rebellion from Sen. Edward M. Kennedy of Massachusetts. Kennedy engineered a floor fight over the rules and denied Carter a final-night photograph of unity. In contrast, eight years ago, Clinton went to the floor of the convention during the nominating roll call and moved that Obama be nominated by acclamation.", + "type": "text" + }, + { + "_id": "WVGL66DY6ZAMTAZIXFVLRQSIWA", + "content": "Recalling that moment, David Axelrod, who was chief strategist for Obama's campaigns, said of Sanders: \"The question is, will he do the same? Will he, once the result is clear, even if he goes to the convention, will he rally behind the nominee or will he strike a discordant note?\"", + "type": "text" + }, + { + "_id": "7CHKC2NFMFBIHAOFSWBWGZSCPU", + "content": "Earlier this month, during an appearance on CBS's \"Face the Nation,\" Sanders was asked by host John Dickerson whether his aim was similar to Kennedy's.", + "type": "text" + }, + { + "_id": "QOYRSV7GSJEZ5NWUKQEVXBB7SQ", + "content": "Sanders ticked off a series of issues important to him, including making corporations and the wealthy pay their \"fair share\" of taxes, combating poverty, fighting climate change, and rebuilding the nation's \"crumbling infrastructure.\"", + "type": "text" + }, + { + "_id": "7K62U3AEHNCRLD5K6CQYXBFN44", + "content": "\"Those are the issues that we will fight for to get on the platform, whether I am the nominee or whether Secretary Clinton is the nominee,\" Sanders said.", + "type": "text" + }, + { + "_id": "J2PTKNI5RFEU7MJTBFP7UFGKIU", + "content": "Aides have also suggested Sanders's call for a single-payer \"Medicare for all\" health-care system is something he will push at the convention.", + "type": "text" + }, + { + "_id": "OI7Q7FXA5NEP3MMKJUXSP5PM4I", + "content": "He could also try to make an issue of voting rights. During the New York primary, Sanders was outspoken about the state's rule that bars independents from participating in Democratic and Republican primaries. Prior to leaving the state on Tuesday, he called that \"a very unfortunate thing\" and said it was something he wants to work to change. Whether he will go after the power of the superdelegates is another question. ", + "type": "text" + }, + { + "_id": "VEVYZCEGJVCHJGPW2RLBUGZK54", + "content": "Sanders has said repeatedly that he plans to support the Democratic nominee and that a Donald Trump presidency would be \"a disaster\" for the country. Less clear is how hard Sanders will work to support Clinton if she becomes the nominee or how much he will do — and how much he can do — to bring his supporters on board. Many are new to the political process, including younger voters, and few express enthusiasm about Clinton.", + "type": "text" + }, + { + "_id": "G356HRG5CJAHNBGPZAFKGU7EKE", + "content": "As the tone of the primary has become nastier, Sanders has routinely ticked off differences he has with Clinton on policy issues and mocked her refusal to release transcripts of paid speeches she delivered on Wall Street. His supporters routinely boo at the mention of her name, and in a change from earlier in the campaign, Sanders does nothing to discourage them.", + "type": "text" + }, + { + "_id": "5GSWSAOVONEJXGZEEHY4E6NTFA", + "content": "Clinton allies fear the toll all this is taking. \"I think it's clear that the Clinton campaign has work to do in terms of strengthening her image heading into a general election,\" Garin said. \"And having Bernie attacking her and fighting to the bitter end will make that process more difficult.\"", + "type": "text" + }, + { + "_id": "DSYHBW4KONBBPF6P65Q3RHXE5Y", + "content": "In the Post interview, Jane Sanders made it clear that her husband's supporters won't simply fall in line with the Clinton campaign.", + "type": "text" + }, + { + "_id": "MHG2RRR4WRDD3K3JPI65IUXHDQ", + "content": "\"If they have any hope of getting any of Bernie's supporters, it cannot be 'Okay, we got through the primary, now I move to the center,' \" she said. \"That is the history of the Democratic and Republican party. The Republicans go right-wing, then they go more to the center. The Democrats go more liberal, and then they go to the center. So we will keep people, whether Bernie's the nominee or Hillary's the nominee, we will keep people focused on issues that are important.\"\n", + "type": "text" + }, + { + "_id": "LSABPTFX5FD4HIHUD7XA6EOXX4", + "content": "Other Sanders supporters have sounded even more skeptical notes about the willingness of his backers to rally behind a Clinton nomination, regardless of whether Sanders says he is on board.", + "type": "text" + }, + { + "_id": "SNIH7CKDPNGVZD3RWH6TIAEWRQ", + "content": "\"A Democrat other than Bernie is going to have an extremely difficult time winning the general election, because people don't want the status quo,\" said RoseAnn DeMoro, director of National Nurses United, the first national labor union to back Sanders.", + "type": "text" + }, + { + "_id": "6UQCCR5TWBE5VEPXB5FLL5I4VA", + "content": "\"There's Bernie and there's his movement,\" DeMoro said. \"He amplifies the movement, but he's not the movement.\"", + "type": "text" + }, + { + "_id": "ME5SF3YMFNEGPAXMQQTRQO2INI", + "content": "Just who can help broker this is a question Democrats are beginning to ask. One possibility is Warren, the senator from Massachusetts, who until Sanders decided to run was the acknowledged leader of the party's progressive wing. She has refrained from endorsing Clinton or Sanders and as a result could have credibility both with the Clinton team and Sanders's followers.", + "type": "text" + }, + { + "_id": "B6BUJ5Q3C5BEDIHZ6IYN3M7RCU", + "content": "Warren has had occasional conversations with both candidates and recently met with Clinton's campaign chairman, John Podesta, according to a knowledgeable source. ", + "type": "text" + }, + { + "_id": "O53U7JONY5G3NF44HOREZLWOE4", + "content": "Sanders, 74, almost certainly will not run for president again. While he is in generally good health and has shown remarkable stamina on the campaign trail, those around him acknowledge that a White House bid at age 78 seems improbable. Already, he would be the oldest person to enter the Oval Office in U.S. history.", + "type": "text" + }, + { + "_id": "KDLKTRALWNE7BETI7XEGBIPZ6I", + "content": "Associates say he is likely to run for reelection as a senator in two years when his term expires.", + "type": "text" + }, + { + "_id": "NV6XF2VINRDEBO2QEZFH37DGHU", + "content": "His job in the Senate offers Sanders a platform to continue speaking out about issues he cares about, and he remains very popular in his home state of Vermont. That was evidenced by his showing in the state's Democratic presidential primary in March, when he won 86 percent of the vote against Clinton.", + "type": "text" + }, + { + "_id": "2ZRVJW5XJRHP7OAJZ5MQ5YLWRQ", + "content": "Sanders's trip to the Vatican, just days before the primary, was questionable for its political value, but it gave him an opportunity to talk about income inequality on a global scale.", + "type": "text" + }, + { + "_id": "W3XN2J2CT5G77EPPBK2GPLIB6E", + "content": "Upon his return to New York, television cameras followed him to multiple stops at public housing projects in the Bronx, where he highlighted run-down conditions, including out-of-service elevators in high-rises that forced elderly residents to climb the stairs and a shuttered playground that he said robbed children of a place to play and stay out of trouble.", + "type": "text" + }, + { + "_id": "B3BAZQD4LNCJBJR7TIMAKDNHYI", + "content": "As the campaign unfolded, Sanders also became a regular on the late-night talk-show circuit and made more appearances than any other candidate this cycle on the Sunday-morning talk shows. Both afforded opportunities to spread his brand of democratic socialism to wider audiences.", + "type": "text" + }, + { + "_id": "CCJ7XIRIRZH25FWFNNUY46UQVI", + "content": "Sanders has served in the House and Senate as an independent, though he has caucused with the Democrats. Given what he has created this year, party leaders see him as a potentially invaluable asset to help other Democratic candidates raise money and rally young voters. ", + "type": "text" + }, + { + "_id": "T35YFBUFPFAMLH4I37VITWXQDY", + "content": "So far, Sanders has shown little inclination to play a big role on that front. But Sen. Richard J. Durbin (D-Ill.), noting the size of Sanders's following, said, \"Let me tell you, he's got a heck of an email list, and if he decides to use it to help the Democrats take control of the Senate, that creates a better opportunity for his ideas to see the light of day.\"", + "type": "text" + }, + { + "_id": "3ZQPFAQDGRFCLB4V6ECPT5HYII", + "content": "Besides the fundraising operation Sanders has built online, his campaign has also used social media to build a nationwide community of followers that could endure long after the campaign. He now has more than 2 million followers on Twitter, as well as legions of fans on Facebook and other platforms, including Reddit, a favorite of the younger generation.\n", + "type": "text" + }, + { + "_id": "B2TG5XOKERC3TINS55N37D7RJ4", + "content": "That gives Sanders the opportunity to become the leader of the progressive movement and, with others such as Warren, to keep the pressure on Clinton as both nominee and president, if both were to happen. Still, harnessing all those resources into an effective organization is challenging, as Obama found with the organization he built in 2008 and expanded in 2012. \n", + "type": "text" + }, + { + "_id": "F4JPHUF53NCFFMYQEPQ6EQPOV4", + "content": "His movement, now called Organizing for America, has had limited success generating support for the president's legislative goals. But Sanders's success in pushing Clinton to the left during their nomination contest suggests the kind of influence that Sanders and the progressives in the party could wield in the future.", + "type": "text" + }, + { + "_id": "", + "content": "john.wagner@washpost.com\n", + "type": "raw_html" + }, + { + "_id": "", + "content": "dan.balz@washpost.com\n", + "type": "raw_html" + }, + { + "_id": "", + "content": "

Balz reported from Washington. Anne Gearan and Mike DeBonis in Washington contributed to this report.

\n
", + "type": "raw_html" + }, + { + "referent": { + "id": "FFY22CTRZAI6LDMTBLZRP3KYZE", + "type": "gallery", + "provider": "" + }, + "type": "reference" + }, + { + "referent": { + "id": "JUUKNRAGQYI6NP7N55S575MXBU", + "type": "video", + "provider": "" + }, + "type": "reference" + }, + { + "referent": { + "id": "U7GLBNW4GMI6LANOOSI3TOPH34", + "type": "graphic", + "provider": "" + }, + "type": "reference" + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/video-fixture-good-related-content-redirect.json b/tests/fixtures/transforms/0.10.10/video-fixture-good-related-content-redirect.json new file mode 100644 index 00000000..b8d9fdd9 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/video-fixture-good-related-content-redirect.json @@ -0,0 +1,16 @@ +{ + "type": "video", + "version": "0.10.10", + "related_content": { + "basic": [ + { + "type": "story", + "version": "0.10.10", + "headlines": { + "basic": "Dog Bites Man." + }, + "related_content": {} + } + ] + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/video-fixture-good.json b/tests/fixtures/transforms/0.10.10/video-fixture-good.json new file mode 100644 index 00000000..841e868e --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/video-fixture-good.json @@ -0,0 +1,96 @@ +{ + "_id": "unique ANS id", + "type": "video", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "credits": { + "by": [ + { + "type": "author", + "version": "0.10.10", + "name": "Bruce Harris", + "byline": "Bruce Harris" + } + ] + }, + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "locality": "Washington, D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "canonical_url": "https://www.youtube.com/watch?v=iZ-nBDcMlWs", + "taxonomy": { + "keywords": [ + { + "keyword": "sailing", + "score": 0.005 + } + ], + "tags": [] + }, + "description": { + "basic": "We went out in 25+ knots and massive waves with two 420's and a 470 off Sandringham Yacht Club... The result was a broken camera and some almost broken sailors. We hope you enjoy the carnage and speed. " + }, + "duration": 139000, + "transcript": "This is a transcript of all the words said in the video. This can go on for quite some time.", + "rating": "graphic", + "video_type": "clip", + "youtube_content_id": "nKW3wvhnZoE", + "streams": [ + { + "height": 360, + "width": 640, + "fileSize": 4443944, + "audioCodec": "", + "videoCodec": "", + "streamType": "ts", + "url": "https://videos.posttv.com/washpost-production/The%20Washington%20Post/20150701/55944729e4b082c8417f4483/55944904e4b0ef3ccc0da042_t_1435781395718_mobile.m3u8", + "bitrate": 600, + "provider": "elastictranscoder" + }, + { + "height": 360, + "width": 640, + "fileSize": 2738596, + "audioCodec": "", + "videoCodec": "", + "streamType": "ts", + "url": "https://videos.posttv.com/washpost-production/The%20Washington%20Post/20150701/55944729e4b082c8417f4483/55944904e4b0ef3ccc0da042_t_1435781395718_mobile.m3u8", + "bitrate": 300, + "provider": "elastictranscoder" + } + ], + "promo_image": { + "_id": "unique image id", + "type": "image", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "location": "Washington, D.C.", + "url": "https://img.washingtonpost.com/rf/image_908w/2010-2019/WashingtonPost/2012/06/29/Outlook/Advance/Images/511969927-363.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "width": 800, + "height": 640 + }, + "subtitles": { + "confidence": 0.657583939, + "subtitlesUrls": [ + { + "format": "DFXP", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.dfxp" + }, + { + "format": "RAW_TEXT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.rawtext" + } + ] + }, + "additional_properties": { + "foo": "bar" + } +} \ No newline at end of file diff --git a/tests/fixtures/transforms/0.10.10/video-fixture-nationals.json b/tests/fixtures/transforms/0.10.10/video-fixture-nationals.json new file mode 100644 index 00000000..d47a8a89 --- /dev/null +++ b/tests/fixtures/transforms/0.10.10/video-fixture-nationals.json @@ -0,0 +1,184 @@ +{ + "_id": "5592c09fe4b082c8417f3f72", + "type": "video", + "version": "0.10.10", + "created_date": "2015-06-25T09:50:50.52Z", + "location": "Washington, D.C.", + "geo": { + "latitude": 38.9047, + "longitude": -77.0164 + }, + "address": { + "locality": "Washington, D.C.", + "postal_code": "20002", + "country_name": "USA" + }, + "copyright": "(c) 2015, The Washington Post, Inc", + "canonical_url": "http://www.washingtonpost.com/posttv/sports/nationals-hitting-a-stride-wizards-draft-oubre/2015/06/30/38a49c74-1f43-11e5-a135-935065bc30d0_video.html", + "taxonomy": { + "keywords": [ + { + "keyword": "baseball", + "score": 0.1829971912740017 + }, + { + "keyword": "nationals", + "frequency": 5, + "score": 0.09512891146702013 + } + ], + "tags": [] + }, + "description": { + "basic": "Post Sports Live discusses the Nationals' successful run despite injuries and whether the Wizards gave up too much to draft Kelly Oubre Jr." + }, + "duration": 1198000, + "transcript": "Lorem ipsum blah blah blah...", + "rating": "all_ages", + "video_type": "clip", + "youtube_content_id": "wWEwUpHvqJg", + "streams": [ + { + "height": 720, + "width": 1280, + "filesize": 327819354, + "audioCodec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413917562171-fstwsn_t_1435680963322_1280_720_2000.mp4", + "bitrate": 2000, + "provider": "elastictranscoder" + }, + { + "height": 360, + "width": 640, + "filesize": 111252083, + "audio_codec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413917693028-uimk59_t_1435680963322_640_360_600.mp4", + "bitrate": 600, + "provider": "elastictranscoder" + }, + { + "height": 360, + "width": 640, + "filesize": 75300016, + "audio_codec": "", + "video_codec": "", + "stream_type": "ts", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435680963733_mobile.m3u8", + "bitrate": 300, + "provider": "elastictranscoder" + }, + { + "height": 720, + "width": 1280, + "filesize": 352558468, + "audio_codec": "", + "video_codec": "", + "stream_type": "ts", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435680963733_master.m3u8", + "bitrate": 2000, + "provider": "elastictranscoder" + }, + { + "height": 180, + "width": 320, + "filesize": 52552204, + "audio_codec": "", + "video_codec": "", + "stream_type": "ts", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435680963733_mobile.m3u8", + "bitrate": 160, + "provider": "elastictranscoder" + }, + { + "height": 180, + "width": 320, + "filesize": 44471331, + "audio_codec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413918388651-bhdhw9_t_1435680963322_320_180_160.mp4", + "bitrate": 160, + "provider": "elastictranscoder" + }, + { + "height": 1080, + "width": 1920, + "filesize": 838371405, + "audio_codec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413917648266-520npb_t_1435680963322_1920_1080_5400.mp4", + "bitrate": 5400, + "provider": "elastictranscoder" + }, + { + "height": 360, + "width": 640, + "filesize": 124434944, + "audio_codec": "", + "video_codec": "", + "stream_type": "ts", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435680963733_mobile.m3u8", + "bitrate": 600, + "provider": "elastictranscoder" + }, + { + "height": 480, + "width": 854, + "filesize": 202124710, + "audio_codec": "", + "video_codec": "", + "stream_type": "mp4", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_1413917780312-tgh3by_t_1435680963322_854_480_1200.mp4", + "bitrate": 1200, + "provider": "elastictranscoder" + }, + { + "height": 1080, + "width": 1920, + "filesize": 838371405, + "audio_codec": "", + "video_codec": "", + "stream_type": "smil", + "url": "https://videos.posttv.com/washpost-production/Post%20Sports%20Live/The%20Washington%20Post/20150630/5592c09fe4b082c8417f3f72/5592c0a9e4b0ef3ccc0d9b6a_t_1435681422368.smil", + "bitrate": 5400, + "provider": "elastictranscoder" + } + ], + "promo_image": { + "_id": "5592c09fe4b082c8417f3f72", + "type": "image", + "version": "0.10.10", + "created_date": "2015-07-01T09:50:50.52Z", + "location": "Washington, D.C.", + "url": "http://s3.amazonaws.com/posttv-thumbnails-prod/thumbnails/5592c09fe4b082c8417f3f72/fullshow_0630.jpg", + "caption": "US Supreme Court Justice Antonin Scalia testifies before the Senate Judiciary Committee", + "width": 1920, + "height": 640 + }, + "subtitles": { + "confidence": 0.75130093, + "subtitlesUrls": [ + { + "format": "DFXP", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.dfxp" + }, + { + "format": "RAW_TEXT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.rawtext" + }, + { + "format": "SRT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.srt" + }, + { + "format": "WEB_VTT", + "url": "https://closedcaptions.posttv.com/06-30-2015/5592c09fe4b082c8417f3f72_5592c013e4b082c8417f3f71/t_1435683757146.vtt" + } + ] + } +} \ No newline at end of file