Skip to content

0.8.1 Release Notes

Gregory Engel edited this page Nov 23, 2018 · 1 revision

ANS 0.8.1

ANS 0.8.1 adds a few small enhancements to the schema.

Raw HTML in Promo Items

The raw_html content element is now available in promo_items.

{
  "_id": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
  "type": "story",
  "version": "0.8.1",

  "promo_items": {
    "basic": {
      "type": "raw_html",
      "version": "0.8.1",
      "content": "<iframe src=\"http://www.washingtonpost.com\"></iframe>"
    }
  }
}

Schema: https://github.com/washingtonpost/ans-schema/blob/master/src/main/resources/schema/ans/0.8.1/traits/trait_promo_items.json

Vanity Credits

Documents in ANS may now have two sets of credits specified. The regular credits field contains credits which may be suitable for both direct rendering and distribution. A new vanity_credits field has been added. When this field is present, it contains the preferred way to render credits in environments than are directly consuming ANS. When converting to other formats, or exporting data into feeds or databases, vanity_credits should not be used.

For example, vanity credits may be present on embedded images, to indicate that the image's native credit should be ignored and this credit used instead, while preserving the original credit.

{
  "type": "story",
  "version": "0.8.0",

  "content_elements": [
    {
      "type": "reference",
      "referent": {
        "type": "image",
        "id": "DEFGHIJJLMNOPQRSTUVWYZABC",
        "provider": "",
        "referent_properties": {       
          "vanity_credits": {
            "photographer": []
          }
        }
      }
    },
    {
      "type": "image",
      "version": "0.8.1",
      "id": "DEFGHIJKLMNOPQRSTUVWXYZABC",
      "url": "https://www.washingtonpost.com/resizer/41Is4oWM__v_BG6mQephMLSA5JI=/1484x0/arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/BLIH7BHNYYI6RC2HXUEXL7LBTE.jpg",
      "credits": {
        "photographer": [{
          "type": "author",
          "version": "0.8.1",
          "byline": "Jim Lo Scalzo/AFP/Getty Images"
        }]
      },
      "vanity_credits": {
        "photographer": []
      }
    }
  ] 
}

Schema: https://github.com/washingtonpost/ans-schema/blob/master/src/main/resources/schema/ans/0.8.1/traits/trait_vanity_credits.json