{
  "$schema" : "https://json-schema.org/draft/2020-12/schema",
  "$id" : "https://purl.imsglobal.org/spec/ob/v3p0/obtc/v1p0/schema/json/ob_v3p0_obtc_v1p0_result-jsonschema1.json",
  "title" : "JSON-LD Schema adaptation for the Result class, enabling JSON-LD value compaction features to the formal JSON Schema (https://www.w3.org/TR/json-ld11/#representing-singular-values-as-arrays). \nNOTE: Only use this schema when working with JSON-LD payloads.\nPlease refer to https://purl.imsglobal.org/spec/ob/v3p0/obtc/v1p0/schema/json/ob_v3p0_obtc_v1p0_result-jsonschema1.json for the formal JSON Schema definition.",
  "description" : "Describes a result that was achieved.",
  "type" : "object",
  "properties" : {
    "type" : {
      "oneOf" : [ {
        "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Result'.",
        "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).",
        "oneOf" : [ {
          "type" : "string"
        }, {
          "type" : "object",
          "additionalProperties" : {
            "type" : "string"
          },
          "propertyNames" : {
            "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
          }
        } ]
      }, {
        "type" : "array",
        "minItems" : 1,
        "items" : {
          "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Result'.",
          "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).",
          "oneOf" : [ {
            "type" : "string"
          }, {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "propertyNames" : {
              "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
            }
          } ]
        }
      } ]
    },
    "achievedLevel" : {
      "description" : "If the result represents an achieved rubric criterion level (e.g. Mastered), the value is the `id` of the RubricCriterionLevel in linked ResultDescription.",
      "$comment" : "Origin: URI (DerivedType); A `NormalizedString` that respresents a Uniform Resource Identifier (URI).",
      "oneOf" : [ {
        "type" : "string"
      }, {
        "type" : "object",
        "additionalProperties" : {
          "type" : "string"
        },
        "propertyNames" : {
          "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
        }
      } ]
    },
    "alignment" : {
      "oneOf" : [ {
        "$ref" : "#/$defs/Alignment"
      }, {
        "type" : "array",
        "items" : {
          "$ref" : "#/$defs/Alignment"
        }
      } ]
    },
    "resultDescription" : {
      "description" : "An achievement can have many result descriptions describing possible results. The value of `resultDescription` is the `id` of the result description linked to this result. The linked result description must be in the achievement that is being asserted.",
      "$comment" : "Origin: URI (DerivedType); A `NormalizedString` that respresents a Uniform Resource Identifier (URI).",
      "oneOf" : [ {
        "type" : "string"
      }, {
        "type" : "object",
        "additionalProperties" : {
          "type" : "string"
        },
        "propertyNames" : {
          "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
        }
      } ]
    },
    "status" : {
      "description" : "The status of the achievement. Required if `resultType` of the linked ResultDescription is Status.",
      "$comment" : "Origin: ResultStatusType (Enumeration); Defined vocabulary to convey the status of an achievement.",
      "type" : "string",
      "enum" : [ "Completed", "Enrolled", "Failed", "InProgress", "OnHold", "Provisional", "Withdrew" ]
    },
    "value" : {
      "description" : "A string representing the result of the performance, or demonstration, of the achievement. For example, 'A' if the recipient received an A grade in class.",
      "$comment" : "Origin: String (PrimitiveType); Character strings.",
      "oneOf" : [ {
        "type" : "string"
      }, {
        "type" : "object",
        "additionalProperties" : {
          "type" : "string"
        },
        "propertyNames" : {
          "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
        }
      } ]
    },
    "resultDate" : {
      "description" : "The date the result was achieved or recorded.",
      "$comment" : "Origin: DateTimeZ (DerivedType); A `DateTime` with the trailing timezone specifier included, e.g. `2021-09-07T02:09:59+02:00`",
      "type" : "string",
      "format" : "date-time"
    }
  },
  "required" : [ "type", "resultDescription", "resultDate" ],
  "additionalProperties" : false,
  "$defs" : {
    "Alignment" : {
      "description" : "Describes an alignment between an achievement and a node in an educational framework.",
      "type" : "object",
      "properties" : {
        "type" : {
          "oneOf" : [ {
            "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Alignment'.",
            "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).",
            "oneOf" : [ {
              "type" : "string"
            }, {
              "type" : "object",
              "additionalProperties" : {
                "type" : "string"
              },
              "propertyNames" : {
                "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
              }
            } ]
          }, {
            "type" : "array",
            "minItems" : 1,
            "items" : {
              "description" : "The value of the type property MUST be an unordered set. One of the items MUST be the IRI 'Alignment'.",
              "$comment" : "Origin: IRI (DerivedType); A `NormalizedString` that represents an Internationalized Resource Identifier (IRI), which extends the ASCII characters subset of the Uniform Resource Identifier (URI).",
              "oneOf" : [ {
                "type" : "string"
              }, {
                "type" : "object",
                "additionalProperties" : {
                  "type" : "string"
                },
                "propertyNames" : {
                  "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
                }
              } ]
            }
          } ]
        },
        "targetCode" : {
          "description" : "If applicable, a locally unique string identifier that identifies the alignment target within its framework and/or targetUrl.",
          "$comment" : "Origin: String (PrimitiveType); Character strings.",
          "oneOf" : [ {
            "type" : "string"
          }, {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "propertyNames" : {
              "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
            }
          } ]
        },
        "targetDescription" : {
          "description" : "Short description of the alignment target.",
          "$comment" : "Origin: String (PrimitiveType); Character strings.",
          "oneOf" : [ {
            "type" : "string"
          }, {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "propertyNames" : {
              "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
            }
          } ]
        },
        "targetName" : {
          "description" : "Name of the alignment.",
          "$comment" : "Origin: String (PrimitiveType); Character strings.",
          "oneOf" : [ {
            "type" : "string"
          }, {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "propertyNames" : {
              "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
            }
          } ]
        },
        "targetFramework" : {
          "description" : "Name of the framework the alignment target.",
          "$comment" : "Origin: String (PrimitiveType); Character strings.",
          "oneOf" : [ {
            "type" : "string"
          }, {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "propertyNames" : {
              "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
            }
          } ]
        },
        "targetType" : {
          "description" : "The type of the alignment target node.",
          "$comment" : "Origin: AlignmentTargetType (EnumExt); The type of the alignment target node in the target framework.",
          "oneOf" : [ {
            "type" : "string",
            "enum" : [ "ceasn:Competency", "ceterms:Credential", "CFItem", "CFRubric", "CFRubricCriterion", "CFRubricCriterionLevel", "CTDL" ]
          }, {
            "type" : "string",
            "pattern" : "(ext:)[a-z|A-Z|0-9|.|-|_]+"
          } ]
        },
        "targetUrl" : {
          "description" : "URL linking to the official description of the alignment target, for example an individual standard within an educational framework.",
          "$comment" : "Origin: URL (DerivedType); A `URI` that represents a Uniform Resource Locator (URL).",
          "oneOf" : [ {
            "type" : "string"
          }, {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "propertyNames" : {
              "pattern" : "^[a-z]{2}(-[A-Z]{2})?$"
            }
          } ]
        }
      },
      "required" : [ "type", "targetName", "targetUrl" ],
      "additionalProperties" : false
    }
  }
}