{
  "$schema" : "https://json-schema.org/draft/2019-09/schema#",
  "$id" : "https://purl.imsglobal.org/spec/orresources/v1p2/schema/json/orresources_v1p2_resourceset-jsonschema1.json",
  "title" : "JSON Schema for the ResourceSet class.",
  "description" : "The container for a collection of resource records. The order is not significant. This may be empty. The service provider may not have any resources or cannot identfiy any resources that fit the specified filter constraints.",
  "type" : "object",
  "properties" : {
    "resources" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/$defs/Resource"
      }
    }
  },
  "required" : [ ],
  "additionalProperties" : false,
  "$defs" : {
    "Resource" : {
      "description" : "A resource is a description of learning content that is related to a course and/or a class and/or a user. This identifies a resource that is used by a teacher, learner, etc. as part of the learning experience.  A resource MUST be associated to a course and/or a class.",
      "type" : "object",
      "properties" : {
        "title" : {
          "description" : "A human readable title/label for the resource.",
          "$comment" : "Origin: NormalizedString (PrimitiveType)",
          "type" : "string"
        },
        "roles" : {
          "type" : "array",
          "items" : {
            "description" : "The set of roles, types of users, who are expected to make use of the resource.",
            "$comment" : "Origin: RoleEnumExt (Union); The data-type for the 'role' characteristic used to identify the type of user for whom the resources are targetted. This is an extensible enumerated vocabulary. Extending the vocabulary makes use of a naming convention.",
            "oneOf" : [ {
              "type" : "string",
              "enum" : [ "administrator", "aide", "guardian", "parent", "proctor", "relative", "student", "teacher" ]
            }, {
              "type" : "string",
              "pattern" : "(ext:)[a-zA-Z0-9\\.\\-_]+"
            } ]
          }
        },
        "importance" : {
          "description" : "This is an indicator of the significance of the resource i.e. primary or secondary.",
          "$comment" : "Origin: ImportanceEnum (Enumeration); The permitted vocabulary for the 'importance' value of a resource.",
          "type" : "string",
          "enum" : [ "primary", "secondary" ]
        },
        "vendorResourceId" : {
          "description" : "This is a unique identifier for the resource allocated by the vendor.",
          "$comment" : "Origin: Identifier (DerivedType); The data-type for a unique identifier (but not a GUID). The format/structure of such an identifier is undefined.",
          "type" : "string"
        },
        "vendorId" : {
          "description" : "Identifier for the vendor who created the resource. This will be assigned by 1EdTech as part of Conformance Certification.",
          "$comment" : "Origin: Identifier (DerivedType); The data-type for a unique identifier (but not a GUID). The format/structure of such an identifier is undefined.",
          "type" : "string"
        },
        "applicationId" : {
          "description" : "Identifier for the application associated with the resource. The nature, and how this identifier is assigned is not defined by this specification.",
          "$comment" : "Origin: Identifier (DerivedType); The data-type for a unique identifier (but not a GUID). The format/structure of such an identifier is undefined.",
          "type" : "string"
        },
        "sourcedId" : {
          "description" : "All Objects MUST be identified by a Source Identifier. This is a GUID i.e. a unique system interoperability  identifier 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 identifiers (e.g. database key fields) they use to the corresponding 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). This is the data-type used for a 'sourcedId'. 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. NOTE: 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 permitted vocabulary for the status value 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" : [ "vendorResourceId", "sourcedId", "status", "dateLastModified" ],
      "additionalProperties" : false
    },
    "Metadata" : {
      "description" : "This is the container for the data model extensions that may be assigned to the associated class of objects.",
      "type" : "object",
      "properties" : { },
      "required" : [ ],
      "additionalProperties" : true
    }
  }
}