{
  "$schema" : "https://json-schema.org/draft/2019-09/schema#",
  "$id" : "https://purl.imsglobal.org/spec/orgradebook/v1p2/schema/json/orgradebook_v1p2_singlescorescale-jsonschema1.json",
  "title" : "JSON Schema for the SingleScoreScale class.",
  "description" : "This is the container for a single scoreScale instance for a message payload.",
  "type" : "object",
  "properties" : {
    "scoreScale" : {
      "$ref" : "#/$defs/ScoreScale"
    }
  },
  "required" : [ "scoreScale" ],
  "additionalProperties" : false,
  "$defs" : {
    "ScoreScale" : {
      "description" : "The container for the definition Score Scale mapping i.e. the relationship between two score scales.",
      "type" : "object",
      "properties" : {
        "title" : {
          "description" : "The human readable title for the score scale mapping.",
          "$comment" : "Origin: NormalizedString (PrimitiveType)",
          "type" : "string"
        },
        "type" : {
          "description" : "The type of score scale mapping. At present there is no predefined vocabulary. This should be used by an organization to differentiate between the score scales that it produces.",
          "$comment" : "Origin: NormalizedString (PrimitiveType)",
          "type" : "string"
        },
        "course" : {
          "$ref" : "#/$defs/CourseGUIDRef"
        },
        "class" : {
          "$ref" : "#/$defs/ClassGUIDRef"
        },
        "scoreScaleValue" : {
          "type" : "array",
          "minItems" : 1,
          "items" : {
            "$ref" : "#/$defs/ScoreScaleValue"
          }
        },
        "sourcedId" : {
          "description" : "The sourcedId of the object. All objects MUST be identified by a Source Identifier. This is a GUID System ID for an object. This is the GUID that SYSTEMS will refer to when making API calls, or when needing to identify an object. It is RECOMMENDED that systems are able to map whichever local ids (e.g. database key fields) they use to SourcedId. The sourcedId of an object is considered an addressable property of an entity and as such will not be treated as Personally Identifiable Information (PII) by certified products. Therefore, as a part of certification, vendors will be required to declare that they will notify customers via documentation or other formal and documented agreement that sourcedIds should never contain PII in general, but particularly users. This means that if a customer includes a student name in an enrollment.sourcedId, it will not fall to any certified product to protect the enrollment.sourcedId as PII, or even the userSourcedId field in the enrollment record.",
          "$comment" : "Origin: GUID (DerivedType); The data-type for establishing a Globally Unique Identifier (GUID). There is no predefined structure for the GUID.",
          "type" : "string"
        },
        "status" : {
          "description" : "All objects MUST BE either 'active' or 'tobedeleted'. Something which is flagged 'tobedeleted' is to be considered safe to delete. Systems can delete records that are flagged as such if they wish, but they are not under any compulsion to do so. In v1.1 the enumeration value of 'inactive' was removed and so for backwards compatibility all such marked objects should be interpreted as 'tobedeleted'.",
          "$comment" : "Origin: BaseStatusEnum (Enumeration); The set of permitted values for the type of status of a record. ",
          "type" : "string",
          "enum" : [ "active", "tobedeleted" ]
        },
        "dateLastModified" : {
          "description" : "All objects MUST be annotated with the dateTime upon which they were last modified. This enables requesters to query for just the latest objects. DateTimes MUST be expressed in W3C profile of [ISO 8601] and MUST contain the UTC timezone.",
          "$comment" : "Origin: DateTime (PrimitiveType)",
          "type" : "string",
          "format" : "date-time"
        },
        "metadata" : {
          "$ref" : "#/$defs/Metadata"
        }
      },
      "required" : [ "title", "type", "class", "scoreScaleValue", "sourcedId", "status", "dateLastModified" ],
      "additionalProperties" : false
    },
    "CourseGUIDRef" : {
      "description" : "This is the container for reference to a OneRoster 'Course' object that has an allocated sourcedId (GUID).",
      "type" : "object",
      "properties" : {
        "type" : {
          "description" : "The type of object being referenced i.e. a 'course'.",
          "$comment" : "Origin: CourseGUIDRefTypeEnum (Enumeration); This is the fixed enumeration for a GUIDRef that points to an 'Course'. ",
          "type" : "string",
          "enum" : [ "course" ]
        },
        "href" : {
          "description" : "The URI for the type of object being referenced.",
          "$comment" : "Origin: AnyURI (PrimitiveType)",
          "type" : "string"
        },
        "sourcedId" : {
          "description" : "The globally unique identifier of the object being referenced.",
          "$comment" : "Origin: GUID (DerivedType); The data-type for establishing a Globally Unique Identifier (GUID). There is no predefined structure for the GUID.",
          "type" : "string"
        }
      },
      "required" : [ "type", "href", "sourcedId" ],
      "additionalProperties" : false
    },
    "ClassGUIDRef" : {
      "description" : "This is the container for reference to a OneRoster 'Class' object that has an allocated sourcedId (GUID).",
      "type" : "object",
      "properties" : {
        "type" : {
          "description" : "The type of object being referenced i.e. a 'class'.",
          "$comment" : "Origin: ClassGUIDRefTypeEnum (Enumeration); This is the fixed enumeration for a GUIDRef that points to an 'Class'. ",
          "type" : "string",
          "enum" : [ "class" ]
        },
        "href" : {
          "description" : "The URI for the type of object being referenced.",
          "$comment" : "Origin: AnyURI (PrimitiveType)",
          "type" : "string"
        },
        "sourcedId" : {
          "description" : "The globally unique identifier of the object being referenced.",
          "$comment" : "Origin: GUID (DerivedType); The data-type for establishing a Globally Unique Identifier (GUID). There is no predefined structure for the GUID.",
          "type" : "string"
        }
      },
      "required" : [ "type", "href", "sourcedId" ],
      "additionalProperties" : false
    },
    "ScoreScaleValue" : {
      "description" : "A specific mapping of values between two score scales. The left hand side (LHS) value is the reference point. Examples of this mapping are: '7' maps to 'A', '7'-'10' maps to 'A', etc.",
      "type" : "object",
      "properties" : {
        "itemValueLHS" : {
          "description" : "The left hand side value of the mapping relationship. The format is either a single value ('x') or a range ('x' - 'y'). In the case of a single value this is considered to be the inclusive lower value for the implied range. When a range is specified (lower-to-upper) the values are inclusive.",
          "$comment" : "Origin: NormalizedString (PrimitiveType)",
          "type" : "string"
        },
        "itemValueRHS" : {
          "description" : "The right hand side value of the mapping relationship  i.e. the equivalent value to the reference point defined in the LHS.",
          "$comment" : "Origin: NormalizedString (PrimitiveType)",
          "type" : "string"
        }
      },
      "required" : [ "itemValueLHS", "itemValueRHS" ],
      "additionalProperties" : false
    },
    "Metadata" : {
      "description" : "The container for the proprietary extensions.",
      "type" : "object",
      "properties" : { },
      "required" : [ ],
      "additionalProperties" : true
    }
  }
}