Schemas for Furnishing AI requests

JSON Schemas for API v4 requests

FurnishingAI.furnish.v4


{
  "description": "Request parameter validation for the API method FurnishingAI.furnish.v4 (JSON Schema draft-07)",
  "type": "object",
  "properties": {
    "furniture": {
      "type": "array",
      "minItems": 0,
      "items": { "$ref": "#/definitions/furniture_item" }
    },
    "space": { "$ref": "space_v4.json#/definitions/space" },
    "usage": { "$ref": "#/definitions/usage" },
    "maxResults": {
      "type": "number",
      "multipleOf": 1.0,
      "default": 1,
      "minimum": 1,
      "maximum": 10
    },
    "debug": { "type": "boolean" }
  },
  "required": ["furniture", "space", "usage"],
  "additionalProperties": false,
  "definitions": {
    "usage": {
      "enum": [
        "bedroom",
        "dining",
        "dining_living",
        "homeOffice",
        "living",
        "openWorkspace",
        "enclosedWorkspace",
        "privateOffice",
        "meetingRoom",
        "lounge"
      ]
    },
    "furniture_item": {
      "type": "object",
      "properties": {
        "type": { "$ref": "#/definitions/furniture_item_types" },
        "targetCount": {"$ref": "#/definitions/integer>=0" },
        "position": { "$ref": "#/definitions/point_3d" },
        "rotation": { "type": "number" },
        "shape": { "$ref": "shapes.json#/definitions/shape" },
        "shapes": { "$ref": "shapes.json#/definitions/shapes" }
      },
      "required": ["type"],
      "oneOf": [
        { "required": [ "shape" ] },
        { "required": [ "shapes" ] }
      ],
      "dependencies": {
        "position": {
          "required": ["shape"],
          "_message": "Shape is required if position is given."
        }
      },
      "additionalProperties": false
    },
    "furniture_item_types": {
      "enum": [
        "armchair",
        "sofa",
        "coffeeTable",
        "rug",
        "floorLamp",
        "singleBed",
        "doubleBed",
        "nightstand",
        "tableLamp",
        "wardrobe",
        "diningChair",
        "diningTable",
        "ceilingLight",
        "shelf",
        "sideboard",
        "tv",
        "taskChair",
        "desk",
        "pedestal",
        "conferenceChair",
        "conferenceTable",
        "other"
      ]
    },
    "integer>=0": {
      "type": "number",
      "multipleOf": 1.0,
      "minimum":0
    },
    "point_3d": {
      "type": "array",
      "items": { "type": "number" },
      "minItems": 3,
      "maxItems": 3
    }
  }
}

FurnishingAI.generateGroups.v4


{
  "description": "Request parameter validation for the API method FurnishingAI.generateGroups.v4 (JSON Schema draft-07)",
  "type": "object",
  "properties": {
    "groupType": {
      "enum": [
        "dining",
        "relaxing",
        "sleeping",
        "storing",
        "working",
        "meeting",
        "exec",
        "wardrobe"
      ]
    },
    "furniture": {
      "type": "array",
      "minItems": 0,
      "items": {
        "$ref": "furnish_params_v4.json#/definitions/furniture_item"
      }
    },
    "boundingBox": {
      "type": "object",
      "properties": {
        "x": {
          "type":"number",
          "exclusiveMinimum": 0
        },
        "y": {
          "type":"number",
          "exclusiveMinimum": 0
        },
        "z": {
          "type":"number",
          "exclusiveMinimum": 0
        }
      }
    },
    "maxResults": {
      "type": "number",
      "multipleOf": 1.0,
      "default": 1,
      "minimum": 1,
      "maximum": 40
    },
    "debug": {
      "type": "boolean"
    }
  },
  "required": [
    "groupType", "boundingBox"
  ],
  "additionalProperties": false
}

FurnishingAI.generateDeskGrid


{
  "description": "Request parameter validation for the API method FurnishingAI.generateDeskGrid (JSON Schema draft-07)",
  "type": "object",
  "properties": {
    "boundingBox": {
      "type": "object",
      "properties": {
        "x": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "y": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "z": {
          "type": "number",
          "exclusiveMinimum": 0
        }
      }
    },
    "furniture": {
      "type": "array",
      "minItems": 0,
      "items": {
        "$ref": "furnish_params_v4.json#/definitions/furniture_item"
      }
    },
    "obstacles": {
      "type": "array",
      "minItems": 0,
      "default": [],
      "items": {
        "$ref": "shapes.json#/definitions/polygon-extrusion_shape"
      }
    },
    "chairSpacing": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "corridorWidth": {
      "type": "number",
      "default": 0
    },
    "maxIslandLength": {
      "type": "number",
      "default": 0
    },
    "spreadSpacing": {
      "type": "boolean",
      "default": false
    },
    "startEdgeFacing": {
      "type": "boolean",
      "default": false
    },
    "startRows": {
      "enum": ["x", "-x", "z", "-z"],
      "default": "-z"
    },
    "tableGap": {
      "type": "number",
      "inclusiveMinimum": 0,
      "default": 0.05
    },
    "debug": {
      "type": "boolean"
    }
  },
  "required": [
    "boundingBox", "chairSpacing", "furniture"
  ],
  "additionalProperties": false
}

Referenced schema: space (v4)


{
  "description": "Space definition for FurnishingAI v4 (JSON Schema draft-07)",
  "definitions": {
    "space": {
      "type": "object",
      "properties": {
        "geometry": { "$ref": "#/definitions/geometry" },
        "geometryOpenings": {
          "type": "array",
          "items": { "$ref": "#/definitions/opening" },
          "default": []
        },
        "edgeTypes": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "enum": ["wall", "wall:facade", "wall:core", "gap", "railing"]
            }
          }
        },
        "properties": {
          "type": "object",
          "properties": {
            "height": {
              "type": "number",
              "minimum": 0
            }
          }
        }
      },
      "required": ["geometry"],
      "additionalProperties": false
    },
    "geometry": {
      "type": "object",
      "properties": {
        "type": { "enum": ["Polygon"] },
        "coordinates": {
          "type": "array",
          "items": { "$ref": "#/definitions/ring" }
        }
      },
      "required": ["type", "coordinates"],
      "additionalProperties": false
    },
    "ring": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "number",
          "minItems": 2,
          "maxItems": 2
        }
      }
    },
    "opening": {
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "window",
            "door",
            "gap"
          ]
        },
        "edgeIdx": {
          "type": "array",
          "items": {
            "type": "number",
            "multipleOf": 1.0,
            "minimum": 0
          },
          "minItems": 2,
          "maxItems": 2
        },
        "pos": {
          "type": "number",
          "minimum": 0
        },
        "y": {
          "type": "number",
          "minimum": 0
        },
        "l": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "h": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "circulationWidth": {
          "type": "number",
          "minimum": 0
        },
        "onFacade": {
          "type": "boolean"
        },
        "id": {
        }
      },
      "required": [
        "type",
        "edgeIdx",
        "pos",
        "y",
        "l",
        "h"
      ],
      "additionalProperties": false
    }
  }
}

Referenced schema: shapes


{
  "description": "Common shape definitions for the API methods in FurnishingAI (JSON Schema draft-07)",
  "definitions": {
    "shape": {
      "type": "object",
      "properties": {
        "type": { "enum": [ "box", "cylinder", "l-extrusion", "polygon-extrusion" ] }
      },
      "required": [ "type" ],
      "allOf": [
        {
          "if": { "properties": { "type": { "const": "box" } } },
          "then": {"$ref": "#/definitions/box_shape"},
          "else": true
        },
        {
          "if": { "properties": { "type": { "const": "cylinder" } } },
          "then": { "$ref": "#/definitions/cylinder_shape" },
          "else": true
        },
        {
          "if": { "properties": { "type":{ "const": "l-extrusion" } } },
          "then": { "$ref": "#/definitions/l-extrusion_shape" },
          "else": true
        },
        {
          "if": { "properties": { "type": { "const": "polygon-extrusion" } } },
          "then": { "$ref": "#/definitions/polygon-extrusion_shape" },
          "else": true
        }
      ]
    },
    "shapes": {
      "type": "array",
      "minItems": 1,
      "items": { "$ref": "#definitions/shape" }
    },
    "box_shape": {
      "type": "object",
      "properties": {
        "type": { "const": "box" },
        "a": { "$ref": "#/definitions/float>0" },
        "b": { "$ref": "#/definitions/float>0" },
        "h": { "$ref": "#/definitions/float>0" },
        "wallAlignment": { "$ref": "#/definitions/wall_alignment" },
        "customData": { "type": "object" }
      },
      "required" : [ "type", "a", "b", "h" ],
      "additionalProperties": false
    },
    "cylinder_shape": {
      "type": "object",
      "properties": {
        "type": { "const": "cylinder" },
        "r": { "$ref": "#/definitions/float>0" },
        "h": { "$ref": "#/definitions/float>0" },
        "wallAlignment": { "$ref": "#/definitions/wall_alignment" },
        "customData": { "type": "object" }
      },
      "required" : [ "type", "r", "h" ],
      "additionalProperties": false
    },
    "l-extrusion_shape": {
      "type": "object",
      "properties": {
        "type": { "const": "l-extrusion" },
        "a": { "$ref": "#/definitions/float>0" },
        "b": { "$ref": "#/definitions/float>0" },
        "c": { "$ref": "#/definitions/float>0" },
        "d": { "$ref": "#/definitions/float>0" },
        "h": { "$ref": "#/definitions/float>0" },
        "wallAlignment": { "$ref": "#/definitions/wall_alignment" },
        "customData": { "type": "object" }
      },
      "required" : [ "type", "a", "b", "c", "d", "h" ],
      "additionalProperties": false
    },
    "polygon-extrusion_shape": {
      "type": "object",
      "properties": {
        "type": { "const": "polygon-extrusion" },
        "points": {
          "type": "array",
          "items": { "$ref": "#/definitions/point_2d" },
          "minItems": 3
        },
        "h": { "$ref": "#/definitions/float>0" },
        "wallAlignment": { "$ref": "#/definitions/wall_alignment" },
        "customData": { "type": "object" }
      },
      "required" : [ "type", "points", "h" ],
      "additionalProperties": false
    },
    "point_2d": {
      "type": "array",
      "items": { "type": "number" },
      "minItems": 2,
      "maxItems": 2
    },
    "float>0": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "wall_alignment": {
      "enum": [ "none", "x-axis", "z-axis", "corner", "side" ]
    }
  }
}

JSON Schemas for API v3 requests

FurnishingAI.furnish


{
  "description": "Request parameter validation for the API method FurnishingAI.furnish (JSON Schema draft-07)",
  "type": "object",
  "properties": {
    "template": { "$ref": "#/definitions/furniture_template" },
    "furniture": {
      "type": "array",
      "minItems": 0,
      "items": { "$ref": "#/definitions/furniture_item" }
    },
    "room": { "$ref": "space_v3.json#/definitions/space" },
    "maxResults": {
      "type": "number",
      "multipleOf": 1.0,
      "default": 1,
      "minimum": 1,
      "maximum": 10
    },
    "debug": { "type": "boolean" }
  },
  "required": ["room"],
  "anyOf": [
    {"required": ["template"]},
    {"required": ["furniture"]}
  ],
  "additionalProperties": false,
  "definitions": {
    "furniture_template": {
      "type": "object",
      "properties": {
        "name": { "enum": [
            "bedroom",
            "dining",
            "dining_living",
            "home_office",
            "living",
            "meet",
            "executive_office",
            "common",
            "work"
          ]
        },
        "exclude": {
          "type": "array",
          "items": { "$ref": "#/definitions/furniture_item_types" }
        }
      },
      "required": ["name"],
      "additionalProperties": false
    },
    "furniture_item": {
      "type": "object",
      "properties": {
        "type": { "$ref": "#/definitions/furniture_item_types" },
        "targetCount": {"$ref": "#/definitions/integer>=0" },
        "position": { "$ref": "#/definitions/point_3d" },
        "rotation": { "type": "number" },
        "shape": { "$ref": "shapes.json#/definitions/shape" },
        "shapes": { "$ref": "shapes.json#/definitions/shapes" }
      },
      "required": ["type"],
      "dependencies": {
        "position": {
          "required": ["shape"],
          "_message": "Shape is required if position is given."
        }
      },
      "additionalProperties": false
    },
    "furniture_item_types": {
      "enum": [
        "armchair",
        "bed",
        "bed_lamp",
        "carpet",
        "coffee_table",
        "dining_chair",
        "dining_table",
        "drawer_unit",
        "exec_chair",
        "exec_table",
        "free_standing_lamp",
        "meeting_chair",
        "meeting_table",
        "nightstand",
        "other",
        "pendant_lamp",
        "shelf",
        "sideboard",
        "sofa",
        "task_chair",
        "task_table",
        "tv",
        "wardrobe"
      ]
    },
    "integer>=0": {
      "type": "number",
      "multipleOf": 1.0,
      "minimum":0
    },
    "point_3d": {
      "type": "array",
      "items": { "type": "number" },
      "minItems": 3,
      "maxItems": 3
    }
  }
}

FurnishingAI.generateGroups


{
  "description": "Request parameter validation for the API method FurnishingAI.generateGroups (JSON Schema draft-07)",
  "type": "object",
  "properties": {
    "groupType": {
      "enum": [
        "dining",
        "relaxing",
        "sleeping",
        "storing",
        "working",
        "meeting",
        "exec",
        "wardrobe"
      ]
    },
    "furniture": {
      "type": "array",
      "minItems": 0,
      "items": {
        "$ref": "furnish_params_v3.json#/definitions/furniture_item"
      }
    },
    "boundingBox": {
      "type": "object",
      "properties": {
        "x": {
          "type":"number",
          "exclusiveMinimum": 0
        },
        "y": {
          "type":"number",
          "exclusiveMinimum": 0
        },
        "z": {
          "type":"number",
          "exclusiveMinimum": 0
        }
      }
    },
    "maxResults": {
      "type": "number",
      "multipleOf": 1.0,
      "default": 1,
      "minimum": 1,
      "maximum": 40
    },
    "fallBackToDefaults": {
      "type": "boolean",
      "default": false
    },
    "debug": {
      "type": "boolean"
    }
  },
  "required": [
    "groupType", "boundingBox"
  ],
  "additionalProperties": false
}

Referenced schema: space (v3)


{
  "description": "Space definition for FurnishingAI (JSON Schema draft-07)",
  "definitions": {
    "space": {
      "type": "object",
      "properties": {
        "boundary": { "$ref": "#/definitions/ring" },
        "holes": {
          "type": "array",
          "items": { "$ref": "#/definitions/ring" },
          "default": []
        }
      },
      "required": ["boundary"],
      "additionalProperties": false
    },
    "ring": {
      "type": "object",
      "properties": {
        "shape": { "$ref": "shapes.json#/definitions/polygon-extrusion_shape" },
        "edgeTypes": {
          "type": "array",
          "items": {
            "enum": ["wall", "wall:facade", "wall:core", "gap", "railing"]
          }
        },
        "openings": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": { "enum": ["window", "door", "gap"] },
              "pos": { "type": "number", "minimum": 0 },
              "y": { "type": "number", "minimum": 0 },
              "l": { "type": "number", "exclusiveMinimum": 0 },
              "h": { "type": "number", "exclusiveMinimum": 0 },
              "circulationWidth": { "type": "number", "minimum": 0},
              "onFacade": { "type": "boolean" }
            },
            "required": ["type", "pos", "y", "l", "h"],
            "additionalProperties": false
          },
          "minItems": 0
        }
      },
      "required": ["shape"],
      "additionalProperties": false
    }
  }
}