{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "title": "GET Weights.",
  "description": "To get the weight details about the given users.",
  "properties": {
    "aggregation": {
      "type": "object",
      "title": "Aggregation of weight.",
      "description": "List of aggregation data about the weights",
      "properties": {
        "maxWeight": {
          "type": "integer",
          "title": "Max weight.",
          "description": "Maximum weight of the user during the period."
        },
        "minWeight": {
          "type": "integer",
          "title": "Min.",
          "description": "Minimum weight of the user during the period."
        },
        "avgWeight": {
          "type": "integer",
          "title": "Avg.",
          "description": "Avg weight of the user during the period."
        },
        "weightChange": {
          "type": "integer",
          "title": "WeightChange.",
          "description": "weight Change of the user during the period."
        },
        "count": {
          "type": "integer",
          "title": "Count.",
          "description": "Total number of weight data found."
        },
        "startDate": {
          "type": "string",
          "title": "startDate.",
          "description": "Starting Date of the weights returned in the query. If not given in the query."
        },
        "endDate": {
          "type": "string",
          "title": "endDate.",
          "description": "Ending Date of the weights returned in the query. If the date is not given in query."
        },
        "dateOfMaxWeight": {
          "type": "string",
          "title": "date of max weight occured",
          "description": "date of when the max weight occured for the given period of time"
        },
        "dateOfMinWeight": {
          "type": "string",
          "title": "date of min weight occured",
          "description": "date of when the min weight occured for the given period of time"
        }
      },
      "required": [
        "maxWeight",
        "minWeight",
        "avgWeight",
        "weightChange"
      ]
    },
    "weights": {
      "type": "array",
      "title": "Weights schema.",
      "description": "An explanation about the purpose of this instance.",
      "items": {
        "type": "object",
        "title": "2 schema.",
        "description": "An explanation about the purpose of this instance.",
        "properties": {
          "datetime": {
            "type": "string",
            "title": "Datetime schema.",
            "description": "An explanation about the purpose of this instance."
          },
          "weight": {
            "type": "number",
            "title": "Weight schema.",
            "description": "An explanation about the purpose of this instance."
          }
        },
        "required": [
          "datetime",
          "weight"
        ]
      }
    }
  },
  "required": [
    "aggregation",
    "weights"
  ]
}