UC2 Schemas
Collection Items Schema
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://etryon-h2020.eu/schema/uc2/collection_items.json",
"type": "object",
"title": "The root schema",
"description": "The root schema comprises the entire JSON document.",
"default": {},
"examples": [
{
"name": "My cool outfit",
"created": "1519211809934",
"status": "pending",
"src": {
"garment_id": "7611366000042",
"user_media": "https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/photo%user%enK0PQ8YY0hXDICJm1MKfjYTTvu1%filename.jpg"
},
"output": "https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/output%user%enK0PQ8YY0hXDICJm1MKfjYTTvu1%filename.jpg",
"type": "photo"
}
],
"required": [
"name",
"created",
"status",
"src",
"output",
"type"
],
"properties": {
"name": {
"$id": "#/properties/name",
"default": "",
"description": "A user generated title for the collection item",
"examples": [
"My cool outfit"
],
"title": "The name property",
"type": "string"
},
"created": {
"$id": "#/properties/created",
"default": "",
"description": "Timestamp in milliseconds, created when submitting a collection item",
"examples": [
"1519211809934"
],
"title": "The created property",
"type": "string"
},
"status": {
"$id": "#/properties/status",
"default": "pending",
"description": "The status of a collection item. Default is 'pending'. Changes to 'ready' when output file is submitted.",
"examples": [
"pending",
"ready"
],
"title": "The status property",
"type": "string"
},
"src": {
"$id": "#/properties/src",
"default": {},
"description": "The source object features a garment unique id (EAN code) and the url to Firebast Storage where a user submitted media item resides.",
"examples": [
{
"garment_id": "7611366000042",
"user_media": "https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/photo%user%enK0PQ8YY0hXDICJm1MKfjYTTvu1%filename.jpg"
}
],
"required": [
"garment_id",
"user_media"
],
"title": "The src object",
"type": "object",
"properties": {
"garment_id": {
"$id": "#/properties/src/properties/garment_id",
"default": "",
"description": "ODLO unique garment id (EAN code)",
"examples": [
"7611366000042"
],
"title": "The garment_id property",
"type": "string"
},
"user_media": {
"$id": "#/properties/src/properties/user_media",
"default": "",
"description": "A url that points to Google Firebase Storage, where a media item submitted by the user is stored",
"examples": [
"https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/photo%user%enK0PQ8YY0hXDICJm1MKfjYTTvu1%filename.jpg"
],
"title": "The user_media property",
"type": "string"
}
}
},
"output": {
"$id": "#/properties/output",
"default": "",
"description": "A url that points to Google Firebase Storage, where the resulting image or video created by the service is stored.",
"examples": [
"https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/output%user%enK0PQ8YY0hXDICJm1MKfjYTTvu1%filename.jpg"
],
"title": "The output property",
"type": "string"
},
"type": {
"$id": "#/properties/type",
"default": "photo",
"description": "The type of a collection item. Can either be photo or video",
"examples": [
"photo",
"video"
],
"title": "The type property",
"type": "string"
}
}
}
Garment Suggestions Schema
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://etryon-h2020.eu/schema/uc2/garment_suggestions.json",
"type": "object",
"title": "The root schema",
"description": "The root schema comprises the entire JSON document.",
"default": {},
"examples": [
{
"user_id": "435",
"garment_ids": [
"43223432",
"53246342342",
"43635745234"
]
}
],
"required": [
"user_id",
"garment_ids"
],
"properties": {
"user_id": {
"$id": "#/properties/user_id",
"default": "",
"description": "The user Id",
"examples": [
"435"
],
"title": "The user_id property",
"type": "string"
},
"garment_ids": {
"$id": "#/properties/garment_ids",
"default": [],
"description": "An array that features ids for the garment suggestions of each user.",
"examples": [
[
"43223432",
"53246342342"
]
],
"title": "The garment_ids array",
"type": "array",
"additionalItems": false,
"items": {
"$id": "#/properties/garment_ids/items",
"anyOf": [
{
"$id": "#/properties/garment_ids/items/anyOf/0",
"default": "",
"description": "A garment id",
"examples": [
"43223432",
"53246342342"
],
"title": "The first anyOf property",
"type": "string"
}
]
}
}
}
}
Garments Schema
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://etryon-h2020.eu/schema/uc2/garments.json",
"type": "object",
"title": "The root schema",
"description": "The root schema comprises the entire JSON document.",
"default": {},
"examples": [
{
"title": "REVOLUTION LIGHT langärmeliges Baselayer Shirt",
"eshop_link": "https://www.odlo.com/7611366000042.html",
"uid": "7611366000042",
"group_id": "391772",
"material": "100% Polyester",
"product_type": {
"full_type": "Men>Sporting Activity>Running & Trail",
"extracted_type_0": "Men",
"extracted_type_1": "Sporting Activity",
"extracted_type_2": "Running & Trail"
},
"price": "64.95",
"additional_information": {
"custom_label_0": "",
"custom_label_1": "Warm",
"custom_label_2": "",
"custom_label_3": "oekotex"
},
"gender": "male",
"size": "M",
"color": "directoire blue",
"photo": "https://click.cptrack.de/?rd=true&k=rXK5MERxr0OxIUPXDyoj7-2y22xETFU22pNdMFGuQXDUbYjHA_BLt09OLT8cF4k6v9egB14mTsTo9GB4eBPQwQ~~&rdlink=https%3A%2F%2Fwww.odlo.com%2Fon%2Fdemandware.static%2F-%2FSites-odlo-master-catalog%2Fdefault%2Fdw3895ef55%2Fimages%2Flarge%2F211874.jpg",
"src": {
"file": "https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/garment%shared%filename.bw"
}
}
],
"required": [
"title",
"eshop_link",
"uid",
"group_id",
"material",
"product_type",
"price",
"additional_information",
"gender",
"size",
"color",
"photo",
"src"
],
"properties": {
"title": {
"$id": "#/properties/title",
"default": "",
"description": "The garment entry title",
"examples": [
"REVOLUTION LIGHT langärmeliges Baselayer Shirt"
],
"title": "The title property",
"type": "string"
},
"eshop_link": {
"$id": "#/properties/eshop_link",
"default": "",
"description": "A URL that links to the specific garment in the ODLO e-shop",
"examples": [
"https://www.odlo.com/7611366000042.html"
],
"title": "The eshop_link property",
"type": "string"
},
"uid": {
"$id": "#/properties/uid",
"default": "",
"description": "Each garment has a unique ID (EAN code)",
"examples": [
"7611366000042"
],
"title": "The uid property",
"type": "string"
},
"group_id": {
"$id": "#/properties/group_id",
"default": "",
"description": "Each garment irregardless of size and color, has a unique id which is the group id property.",
"examples": [
"391772"
],
"title": "The group_id property",
"type": "string"
},
"material": {
"$id": "#/properties/material",
"default": "",
"description": "The garment material",
"examples": [
"100% Polyester"
],
"title": "The material property",
"type": "string"
},
"product_type": {
"$id": "#/properties/product_type",
"default": {},
"description": "This is provided by ODLO as a full type. We further break it down into 3 distinct types, for advanced filtering.",
"examples": [
{
"full_type": "Men>Sporting Activity>Running & Trail",
"extracted_type_0": "Men",
"extracted_type_1": "Sporting Activity",
"extracted_type_2": "Running & Trail"
}
],
"required": [
"full_type",
"extracted_type_0",
"extracted_type_1",
"extracted_type_2"
],
"title": "The product_type object",
"type": "object",
"properties": {
"full_type": {
"$id": "#/properties/product_type/properties/full_type",
"default": "",
"description": "the full type property of a garment. It is a long string consisted of some tags",
"examples": [
"Men>Sporting Activity>Running & Trail"
],
"title": "The full_type property",
"type": "string"
},
"extracted_type_0": {
"$id": "#/properties/product_type/properties/extracted_type_0",
"default": "",
"description": "The first type term extracted from full type string",
"examples": [
"Men"
],
"title": "The extracted_type_0 property",
"type": "string"
},
"extracted_type_1": {
"$id": "#/properties/product_type/properties/extracted_type_1",
"default": "",
"description": "The seconds type term extracted from full type string",
"examples": [
"Sporting Activity"
],
"title": "The extracted_type_1 property",
"type": "string"
},
"extracted_type_2": {
"$id": "#/properties/product_type/properties/extracted_type_2",
"default": "",
"description": "The third type term extracted from full type string",
"examples": [
"Running & Trail"
],
"title": "The extracted_type_2 property",
"type": "string"
}
}
},
"price": {
"$id": "#/properties/price",
"default": "",
"description": "The garment price",
"examples": [
"64.95"
],
"title": "The price property",
"type": "string"
},
"additional_information": {
"$id": "#/properties/additional_information",
"default": {},
"description": "This object consists of four different fields that contain information that further describe the garment",
"examples": [
{
"custom_label_0": "",
"custom_label_1": "Warm",
"custom_label_2": "",
"custom_label_3": "oekotex"
}
],
"required": [
"custom_label_0",
"custom_label_1",
"custom_label_2",
"custom_label_3"
],
"title": "The additional_information object",
"type": "object",
"properties": {
"custom_label_0": {
"$id": "#/properties/additional_information/properties/custom_label_0",
"default": "",
"description": "The first field that further describes the garment item",
"examples": [
""
],
"title": "The custom_label_0 property",
"type": "string"
},
"custom_label_1": {
"$id": "#/properties/additional_information/properties/custom_label_1",
"default": "",
"description": "The second field that further describes the garment item",
"examples": [
"Warm"
],
"title": "The custom_label_1 property",
"type": "string"
},
"custom_label_2": {
"$id": "#/properties/additional_information/properties/custom_label_2",
"default": "",
"description": "The third field that further describes the garment item",
"examples": [
""
],
"title": "The custom_label_2 property",
"type": "string"
},
"custom_label_3": {
"$id": "#/properties/additional_information/properties/custom_label_3",
"default": "",
"description": "The fourth field that further describes the garment item",
"examples": [
"oekotex"
],
"title": "The custom_label_3 property",
"type": "string"
}
}
},
"gender": {
"$id": "#/properties/gender",
"default": "",
"description": "This is male or female, for the fit to tailor male or female bodies",
"examples": [
"male",
"female"
],
"title": "The gender property",
"type": "string"
},
"size": {
"$id": "#/properties/size",
"default": "",
"description": "The garment size property 'Small' to 'XXL'",
"examples": [
"S",
"M",
"L",
"XL",
"XXL"
],
"title": "The size property",
"type": "string"
},
"color": {
"$id": "#/properties/color",
"default": "",
"description": "The garment color",
"examples": [
"directoire blue"
],
"title": "The color property",
"type": "string"
},
"photo": {
"$id": "#/properties/photo",
"default": "",
"description": "A URL of the garment photo. The photo is hosted on ODLO server",
"examples": [
"https://click.cptrack.de/?rd=true&k=rXK5MERxr0OxIUPXDyoj7-2y22xETFU22pNdMFGuQXDUbYjHA_BLt09OLT8cF4k6v9egB14mTsTo9GB4eBPQwQ~~&rdlink=https%3A%2F%2Fwww.odlo.com%2Fon%2Fdemandware.static%2F-%2FSites-odlo-master-catalog%2Fdefault%2Fdw3895ef55%2Fimages%2Flarge%2F211874.jpg"
],
"title": "The photo property",
"type": "string"
},
"src": {
"$id": "#/properties/src",
"default": {},
"description": "This object contains the Browzwear file along with other files that might be needed in the future",
"examples": [
{
"file": "https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/garment%shared%filename.bw"
}
],
"required": [
"file"
],
"title": "The src object",
"type": "object",
"properties": {
"file": {
"$id": "#/properties/src/properties/file",
"default": "",
"description": "A URL pointing to the file that is saved in Firebase Storage",
"examples": [
"https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/garment%shared%filename.bw"
],
"title": "The file property",
"type": "string"
}
}
}
}
}
User Info Schema
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://etryon-h2020.eu/schema/uc2/user_info.json",
"type": "object",
"title": "The root schema",
"description": "The root schema comprises the entire JSON document.",
"default": {},
"examples": [
{
"gender": "male",
"size": "L",
"avatar": "https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/avatar%user%enK0PQ8YY0hXDICJm1MKfjYTTvu1%filename.fbx"
}
],
"required": [
"gender",
"size",
"avatar"
],
"properties": {
"gender": {
"$id": "#/properties/gender",
"default": "",
"description": "User set gender, to be used on filtering garments",
"examples": [
"male",
"female"
],
"title": "The gender property",
"type": "string"
},
"size": {
"$id": "#/properties/size",
"default": "",
"description": "User size, to be used when selecting a garment",
"examples": [
"S",
"M",
"L",
"XL",
"XXL"
],
"title": "The size property",
"type": "string"
},
"avatar": {
"$id": "#/properties/avatar",
"default": "",
"description": "User avatar file in the form of a URL, from QC API, it is saved in Firebase Storage",
"examples": [
"https://firebasestorage.googleapis.com/v0/b/etryon-h2020.appspot.com/o/avatar%user%enK0PQ8YY0hXDICJm1MKfjYTTvu1%filename.fbx"
],
"title": "The avatar property",
"type": "string"
}
}
}