{
  "MaterialResponse": {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "example": "Materials retrieved successfully."
      },
      "data": {
        "type": "object",
        "additionalProperties": {
          "type": "array",
          "items": {
            "$ref": "#/Material"
          }
        }
      }
    },
    "required": ["message", "data"]
  },

  "Material": {
    "type": "object",
    "properties": {
      "name": { "type": "string" },
      "types": {
        "type": "array",
        "items": { "type": "string" }
      },
      "grammage": { "type": "number" },
      "front": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "params": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string" },
                "scalarValue": { "type": "number" },
                "colorValue": { "type": "string" }
              },
              "required": ["id", "scalarValue", "colorValue"]
            }
          }
        },
        "required": ["id", "params"]
      },
      "back": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "params": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string" },
                "scalarValue": { "type": "number" },
                "colorValue": { "type": "string" }
              },
              "required": ["id", "scalarValue", "colorValue"]
            }
          }
        },
        "required": ["id", "params"]
      },
      "cuttingSide": { "type": "string" },
      "description": { "type": ["string", "null"] },
      "thickness": { "type": "number" }
    }
  }
}
