Skip to content

Collections Schema

Michael Spalti edited this page Feb 28, 2017 · 2 revisions

Types for Collection

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "integer"
      },
      "createdAt": {
        "type": "string"
      },
      "updatedAt": {
        "type": "string"
      },
      "ItemContentId": {
        "type": "integer"
      },
      "CollectionId": {
        "type": "integer"
      },
      "ItemContent": {
        "type": "object",
        "properties": {
          "getContentObject": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "icon": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "icon"
            ]
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "getContentObject",
          "id",
          "name",
          "icon",
          "createdAt",
          "updatedAt"
        ]
      }
    },
    "required": [
      "id",
      "createdAt",
      "updatedAt",
      "ItemContentId",
      "CollectionId",
      "ItemContent"
    ]
  }
}

Collections in Area

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "integer"
      },
      "title": {
        "type": "string"
      },
      "image": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "browseType": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "dates": {
        "type": "string"
      },
      "items": {
        "type": "string"
      },
      "ctype": {
        "type": "string"
      },
      "repoType": {
        "type": "string"
      },
      "restricted": {
        "type": "integer"
      },
      "published": {
        "type": "integer"
      },
      "createdAt": {
        "type": "string"
      },
      "updatedAt": {
        "type": "string"
      },
      "AreaId": {
        "type": "integer"
      },
      "CollectionId": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "title",
      "image",
      "url",
      "browseType",
      "description",
      "dates",
      "items",
      "ctype",
      "repoType",
      "restricted",
      "published",
      "createdAt",
      "updatedAt",
      "AreaId",
      "CollectionId"
    ]
  }
}

Collection by ID

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "collection": {
      "type": "object",
      "properties": {
        "getCollectionObject": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer"
            },
            "title": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "browseType": {
              "type": "string"
            },
            "image": {
              "type": "string"
            },
            "desc": {
              "type": "string"
            },
            "dates": {
              "type": "string"
            },
            "items": {
              "type": "string"
            },
            "ctype": {
              "type": "string"
            },
            "repoType": {
              "type": "string"
            },
            "restricted": {
              "type": "boolean"
            },
            "published": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "title",
            "url",
            "browseType",
            "image",
            "desc",
            "dates",
            "items",
            "ctype",
            "repoType",
            "restricted",
            "published"
          ]
        },
        "id": {
          "type": "integer"
        },
        "title": {
          "type": "string"
        },
        "image": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "browseType": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "dates": {
          "type": "string"
        },
        "items": {
          "type": "string"
        },
        "ctype": {
          "type": "string"
        },
        "repoType": {
          "type": "string"
        },
        "restricted": {
          "type": "boolean"
        },
        "published": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        }
      },
      "required": [
        "getCollectionObject",
        "id",
        "title",
        "image",
        "url",
        "browseType",
        "description",
        "dates",
        "items",
        "ctype",
        "repoType",
        "restricted",
        "published",
        "createdAt",
        "updatedAt"
      ]
    },
    "categories": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "createdAt": {
          "type": "string"
        },
        "updatedAt": {
          "type": "string"
        },
        "CategoryId": {
          "type": "integer"
        },
        "CollectionId": {
          "type": "integer"
        },
        "Category": {
          "type": "object",
          "properties": {
            "getCollectionObject": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "secondaryUrl": {
                  "type": "string"
                },
                "desc": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title",
                "url",
                "secondaryUrl",
                "desc"
              ]
            },
            "id": {
              "type": "integer"
            },
            "title": {
              "type": "string"
            },
            "linkLabel": {
              "type": "null"
            },
            "url": {
              "type": "string"
            },
            "secondaryUrl": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "areaId": {
              "type": "string"
            },
            "createdAt": {
              "type": "string"
            },
            "updatedAt": {
              "type": "string"
            }
          },
          "required": [
            "getCollectionObject",
            "id",
            "title",
            "linkLabel",
            "url",
            "secondaryUrl",
            "description",
            "areaId",
            "createdAt",
            "updatedAt"
          ]
        }
      },
      "required": [
        "id",
        "createdAt",
        "updatedAt",
        "CategoryId",
        "CollectionId",
        "Category"
      ]
    },
    "itemTypes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "ItemContentId": {
            "type": "integer"
          },
          "CollectionId": {
            "type": "integer"
          },
          "ItemContent": {
            "type": "object",
            "properties": {
              "getContentObject": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "icon": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "icon"
                ]
              },
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "icon": {
                "type": "string"
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              }
            },
            "required": [
              "getContentObject",
              "id",
              "name",
              "icon",
              "createdAt",
              "updatedAt"
            ]
          }
        },
        "required": [
          "id",
          "createdAt",
          "updatedAt",
          "ItemContentId",
          "CollectionId",
          "ItemContent"
        ]
      }
    }
  },
  "required": [
    "collection",
    "categories",
    "itemTypes"
  ]
}

All Collections

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "getCollectionObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "browseType": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "desc": {
            "type": "string"
          },
          "dates": {
            "type": "string"
          },
          "items": {
            "type": "string"
          },
          "ctype": {
            "type": "string"
          },
          "repoType": {
            "type": "string"
          },
          "restricted": {
            "type": "boolean"
          },
          "published": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "title",
          "url",
          "browseType",
          "image",
          "desc",
          "dates",
          "items",
          "ctype",
          "repoType",
          "restricted",
          "published"
        ]
      },
      "id": {
        "type": "integer"
      },
      "title": {
        "type": "string"
      },
      "image": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "browseType": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "dates": {
        "type": "string"
      },
      "items": {
        "type": "string"
      },
      "ctype": {
        "type": "string"
      },
      "repoType": {
        "type": "string"
      },
      "restricted": {
        "type": "boolean"
      },
      "published": {
        "type": "boolean"
      },
      "createdAt": {
        "type": "string"
      },
      "updatedAt": {
        "type": "string"
      }
    },
    "required": [
      "getCollectionObject",
      "id",
      "title",
      "image",
      "url",
      "browseType",
      "description",
      "dates",
      "items",
      "ctype",
      "repoType",
      "restricted",
      "published",
      "createdAt",
      "updatedAt"
    ]
  }
}

Collections by Subject and Area

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "integer"
      },
      "createdAt": {
        "type": "string"
      },
      "updatedAt": {
        "type": "string"
      },
      "TagId": {
        "type": "integer"
      },
      "CollectionId": {
        "type": "integer"
      },
      "name": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "title": {
        "type": "string"
      },
      "image": {
        "type": "string"
      },
      "browseType": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "dates": {
        "type": "string"
      },
      "items": {
        "type": "string"
      },
      "ctype": {
        "type": "string"
      },
      "repoType": {
        "type": "string"
      },
      "restricted": {
        "type": "integer"
      },
      "published": {
        "type": "integer"
      },
      "AreaId": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "createdAt",
      "updatedAt",
      "TagId",
      "CollectionId",
      "name",
      "url",
      "title",
      "image",
      "browseType",
      "description",
      "dates",
      "items",
      "ctype",
      "repoType",
      "restricted",
      "published",
      "AreaId"
    ]
  }
}

Collections by Subject

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "integer"
      },
      "createdAt": {
        "type": "string"
      },
      "updatedAt": {
        "type": "string"
      },
      "TagId": {
        "type": "integer"
      },
      "CollectionId": {
        "type": "integer"
      },
      "name": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "title": {
        "type": "string"
      },
      "image": {
        "type": "string"
      },
      "browseType": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "dates": {
        "type": "string"
      },
      "items": {
        "type": "string"
      },
      "ctype": {
        "type": "string"
      },
      "repoType": {
        "type": "string"
      },
      "restricted": {
        "type": "integer"
      },
      "published": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "createdAt",
      "updatedAt",
      "TagId",
      "CollectionId",
      "name",
      "url",
      "title",
      "image",
      "browseType",
      "description",
      "dates",
      "items",
      "ctype",
      "repoType",
      "restricted",
      "published"
    ]
  }
}

Collections by Category (Collection Group)

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "integer"
      },
      "title": {
        "type": "string"
      },
      "image": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "browseType": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "dates": {
        "type": "string"
      },
      "items": {
        "type": "string"
      },
      "ctype": {
        "type": "string"
      },
      "repoType": {
        "type": "string"
      },
      "restricted": {
        "type": "integer"
      },
      "published": {
        "type": "integer"
      },
      "createdAt": {
        "type": "string"
      },
      "updatedAt": {
        "type": "string"
      },
      "CategoryId": {
        "type": "integer"
      },
      "CollectionId": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "title",
      "image",
      "url",
      "browseType",
      "description",
      "dates",
      "items",
      "ctype",
      "repoType",
      "restricted",
      "published",
      "createdAt",
      "updatedAt",
      "CategoryId",
      "CollectionId"
    ]
  }
}

Tags in Area

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "Tag": {
        "type": "object",
        "properties": {
          "getContentObject": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "url"
            ]
          },
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "getContentObject",
          "id",
          "name",
          "url",
          "createdAt",
          "updatedAt"
        ]
      }
    },
    "required": [
      "Tag"
    ]
  }
}