{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://raw.githubusercontent.com/washingtonpost/ans-schema/master/src/main/resources/schema/ans/0.5.7/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"
                },
                "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"
            ]
        }
    ]
}