{
    "definitions": {
        "collection": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "definitions": {
                "created_at": {
                    "description": "when collection was created",
                    "example": "2012-01-01T12:00:00Z",
                    "format": "date-time",
                    "type": [
                        "string"
                    ]
                },
                "id": {
                    "description": "unique identifier of collection",
                    "example": "01234567-89ab-cdef-0123-456789abcdef",
                    "format": "uuid",
                    "type": [
                        "string"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/collection/definitions/id"
                },
                "name": {
                    "description": "Name of the collection",
                    "example": "My Collection",
                    "type": [
                        "string"
                    ]
                },
                "updated_at": {
                    "description": "when collection was updated",
                    "example": "2012-01-01T12:00:00Z",
                    "format": "date-time",
                    "type": [
                        "string",
                        "null"
                    ]
                }
            },
            "description": "Collections are buckets for storing your resources in",
            "links": [
                {
                    "description": "Create a new collection.",
                    "href": "/collections",
                    "method": "POST",
                    "rel": "create",
                    "schema": {
                        "properties": {
                            "name": {
                                "$ref": "#/definitions/collection/definitions/name"
                            }
                        },
                        "required": [
                            "name"
                        ],
                        "type": [
                            "object"
                        ]
                    },
                    "title": "Create"
                },
                {
                    "description": "Delete an existing collection.",
                    "href": "/collections/{(%23%2Fdefinitions%2Fcollection%2Fdefinitions%2Fidentity)}",
                    "method": "DELETE",
                    "rel": "destroy",
                    "title": "Delete"
                },
                {
                    "description": "Info for existing collection.",
                    "href": "/collections/{(%23%2Fdefinitions%2Fcollection%2Fdefinitions%2Fidentity)}",
                    "method": "GET",
                    "rel": "self",
                    "title": "Info"
                },
                {
                    "description": "List existing collections.",
                    "href": "/collections",
                    "method": "GET",
                    "rel": "instances",
                    "title": "List"
                },
                {
                    "description": "Update an existing collection.",
                    "href": "/collections/{(%23%2Fdefinitions%2Fcollection%2Fdefinitions%2Fidentity)}",
                    "method": "PATCH",
                    "rel": "update",
                    "schema": {
                        "properties": {
                            "name": {
                                "$ref": "#/definitions/collection/definitions/name"
                            }
                        },
                        "type": [
                            "object"
                        ]
                    },
                    "title": "Update"
                }
            ],
            "properties": {
                "created_at": {
                    "$ref": "#/definitions/collection/definitions/created_at"
                },
                "id": {
                    "$ref": "#/definitions/collection/definitions/id"
                },
                "name": {
                    "$ref": "#/definitions/collection/definitions/name"
                },
                "updated_at": {
                    "$ref": "#/definitions/collection/definitions/updated_at"
                }
            },
            "title": "Collections",
            "type": [
                "object"
            ]
        },
        "resource": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "definitions": {
                "created_at": {
                    "description": "when resource was created",
                    "example": "2012-01-01T12:00:00Z",
                    "format": "date-time",
                    "type": [
                        "string"
                    ]
                },
                "domain": {
                    "description": "Extracted domain from URL",
                    "example": "somedomain.com",
                    "readOnly": true,
                    "type": [
                        "string"
                    ]
                },
                "id": {
                    "description": "unique identifier of resource",
                    "example": "01234567-89ab-cdef-0123-456789abcdef",
                    "format": "uuid",
                    "type": [
                        "string"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/resource/definitions/id"
                },
                "tags": {
                    "description": "Tags",
                    "items": {
                        "type": [
                            "object"
                        ]
                    },
                    "type": [
                        "array"
                    ]
                },
                "title": {
                    "description": "title of resource",
                    "example": "A title",
                    "type": [
                        "string"
                    ]
                },
                "updated_at": {
                    "description": "when resource was updated",
                    "example": "2012-01-01T12:00:00Z",
                    "format": "date-time",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "url": {
                    "description": "URL of the resource",
                    "example": "http://www.somedomain.com",
                    "type": [
                        "string"
                    ]
                }
            },
            "description": "FIXME",
            "links": [
                {
                    "description": "Delete an existing resource.",
                    "href": "/resources/{(%23%2Fdefinitions%2Fresource%2Fdefinitions%2Fidentity)}",
                    "method": "DELETE",
                    "rel": "destroy",
                    "title": "Delete"
                },
                {
                    "description": "Info for existing resource.",
                    "href": "/resources/{(%23%2Fdefinitions%2Fresource%2Fdefinitions%2Fidentity)}",
                    "method": "GET",
                    "rel": "self",
                    "title": "Info"
                },
                {
                    "description": "Update an existing resource.",
                    "href": "/resources/{(%23%2Fdefinitions%2Fresource%2Fdefinitions%2Fidentity)}",
                    "method": "PATCH",
                    "rel": "update",
                    "schema": {
                        "properties": {},
                        "type": [
                            "object"
                        ]
                    },
                    "title": "Update"
                },
                {
                    "description": "List resources in a collection.",
                    "href": "/collections/{(%23%2Fdefinitions%2Fcollection%2Fdefinitions%2Fidentity)}/resources",
                    "method": "GET",
                    "rel": "instances",
                    "title": "Collection resources"
                },
                {
                    "description": "Add a new resource in a collection.",
                    "href": "/collections/{(%23%2Fdefinitions%2Fcollection%2Fdefinitions%2Fidentity)}/resources",
                    "method": "POST",
                    "rel": "create",
                    "schema": {
                        "properties": {
                            "tags": {
                                "$ref": "#/definitions/resource/definitions/tags"
                            },
                            "title": {
                                "$ref": "#/definitions/resource/definitions/title"
                            },
                            "url": {
                                "$ref": "#/definitions/resource/definitions/url"
                            }
                        },
                        "required": [
                            "url"
                        ],
                        "type": [
                            "object"
                        ]
                    },
                    "title": "Create resource"
                }
            ],
            "properties": {
                "created_at": {
                    "$ref": "#/definitions/resource/definitions/created_at"
                },
                "domain": {
                    "$ref": "#/definitions/resource/definitions/domain"
                },
                "id": {
                    "$ref": "#/definitions/resource/definitions/id"
                },
                "tags": {
                    "$ref": "#/definitions/resource/definitions/tags"
                },
                "title": {
                    "$ref": "#/definitions/resource/definitions/title"
                },
                "updated_at": {
                    "$ref": "#/definitions/resource/definitions/updated_at"
                },
                "url": {
                    "$ref": "#/definitions/resource/definitions/url"
                }
            },
            "title": "Resource",
            "type": [
                "object"
            ]
        },
        "tag": {
            "$schema": "http://json-schema.org/draft-04/schema",
            "definitions": {
                "id": {
                    "description": "unique identifier of tag",
                    "example": "01234567-89ab-cdef-0123-456789abcdef",
                    "format": "uuid",
                    "type": [
                        "string"
                    ]
                },
                "identity": {
                    "$ref": "#/definitions/tag/definitions/id"
                },
                "name": {
                    "description": "Name of the tag",
                    "example": "A Tag",
                    "type": [
                        "string"
                    ]
                },
                "slug": {
                    "description": "Generated slug of the tag",
                    "example": "a-tag",
                    "type": [
                        "string"
                    ]
                }
            },
            "description": "FIXME",
            "links": [
                {
                    "description": "Create a new tag.",
                    "href": "/tags",
                    "method": "POST",
                    "rel": "create",
                    "schema": {
                        "properties": {},
                        "required": [
                            "name"
                        ],
                        "type": [
                            "object"
                        ]
                    },
                    "title": "Create"
                },
                {
                    "description": "Delete an existing tag.",
                    "href": "/tags/{(%23%2Fdefinitions%2Ftag%2Fdefinitions%2Fidentity)}",
                    "method": "DELETE",
                    "rel": "destroy",
                    "title": "Delete"
                },
                {
                    "description": "Info for existing tag.",
                    "href": "/tags/{(%23%2Fdefinitions%2Ftag%2Fdefinitions%2Fidentity)}",
                    "method": "GET",
                    "rel": "self",
                    "title": "Info"
                },
                {
                    "description": "List existing tags.",
                    "href": "/tags",
                    "method": "GET",
                    "rel": "instances",
                    "title": "List"
                },
                {
                    "description": "Update an existing tag.",
                    "href": "/tags/{(%23%2Fdefinitions%2Ftag%2Fdefinitions%2Fidentity)}",
                    "method": "PATCH",
                    "rel": "update",
                    "schema": {
                        "properties": {},
                        "type": [
                            "object"
                        ]
                    },
                    "title": "Update"
                },
                {
                    "description": "Tags in collection.",
                    "href": "/collections/{(%23%2Fdefinitions%2Fcollection%2Fdefinitions%2Fidentity)}/tags",
                    "method": "GET",
                    "rel": "instances",
                    "title": "Lists"
                }
            ],
            "properties": {
                "id": {
                    "$ref": "#/definitions/tag/definitions/id"
                },
                "name": {
                    "$ref": "#/definitions/tag/definitions/name"
                },
                "slug": {
                    "$ref": "#/definitions/tag/definitions/slug"
                }
            },
            "title": "Tag",
            "type": [
                "object"
            ]
        }
    },
    "description": "Stash API.",
    "links": [
        {
            "href": "https://api.stash.com",
            "rel": "self"
        }
    ],
    "properties": {
        "collection": {
            "$ref": "#/definitions/collection"
        },
        "resource": {
            "$ref": "#/definitions/resource"
        },
        "tag": {
            "$ref": "#/definitions/tag"
        }
    },
    "title": "Stash API",
    "type": [
        "object"
    ]
}