{
  "description": "This is the interface description of @Semantics.",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://sap.github.io/csn-interop-specification/spec-v1/semantics.schema.json#",
  "title": "Semantics Document",
  "type": "object",
  "definitions": {
    "@Semantics.valueRange": {
      "type": "object",
      "description": "Informs consumers about the value range of a CDS element, allowing to specify minimal and/or maximal values, and indicate whether these are exclusive or inclusive.\nThis value range can be used for client-side validation of user input.",
      "properties": {
        "minimum": {
          "type": "string",
          "description": "Specifies the minimum value."
        },
        "exclusiveMinimum": {
          "type": "boolean",
          "description": "Specifies if the lower boundary should be excluded.\nNot specifying this annotation means that the lower boundary is included.",
          "default": false
        },
        "maximum": {
          "type": "string",
          "description": "Specifies the maximum value."
        },
        "exclusiveMaximum": {
          "type": "boolean",
          "description": "Specifies if the upper boundary should be excluded.\nNot specifying this annotation means that the upper boundary is included.",
          "default": false
        }
      },
      "x-extension-targets": [
        "IntegerType",
        "Int16Type",
        "Integer64Type",
        "UInt8Type",
        "DecimalType",
        "DoubleType"
      ],
      "title": "@Semantics.valueRange"
    },
    "@Semantics.currencyCode": {
      "type": "boolean",
      "const": true,
      "description": "The property contains a currency code.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.currencyCode"
    },
    "@Semantics.amount.currencyCode": {
      "description": "The element contains an amount.\nThe annotation points to an element containing the currency code.",
      "x-ref-to-doc": {
        "title": "Element Reference",
        "ref": "#/definitions/ElementReference"
      },
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.amount.currencyCode",
      "$ref": "#/definitions/ElementReference"
    },
    "@Semantics.unitOfMeasure": {
      "type": "boolean",
      "const": true,
      "description": "The element contains a unit of measure.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.unitOfMeasure"
    },
    "@Semantics.quantity.unitOfMeasure": {
      "description": "The element contains a quantity.\nThe annotation points to an element containing the unit of measure.",
      "x-ref-to-doc": {
        "title": "Element Reference",
        "ref": "#/definitions/ElementReference"
      },
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.quantity.unitOfMeasure",
      "$ref": "#/definitions/ElementReference"
    },
    "@Semantics.calendar.dayOfMonth": {
      "type": "boolean",
      "const": true,
      "description": "The element states the day of month.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.dayOfMonth"
    },
    "@Semantics.calendar.dayOfYear": {
      "type": "boolean",
      "const": true,
      "description": "The element states the day of year.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.dayOfYear"
    },
    "@Semantics.calendar.week": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar week.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.week"
    },
    "@Semantics.calendar.month": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar month.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.month"
    },
    "@Semantics.calendar.quarter": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar quarter.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.quarter"
    },
    "@Semantics.calendar.halfyear": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar halfyear.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.halfyear"
    },
    "@Semantics.calendar.year": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar year.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.year"
    },
    "@Semantics.calendar.yearWeek": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar year week.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.yearWeek"
    },
    "@Semantics.calendar.yearMonth": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar year month.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.yearMonth"
    },
    "@Semantics.calendar.yearQuarter": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar year quarter.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.yearQuarter"
    },
    "@Semantics.calendar.yearHalfyear": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar year halfyear.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.calendar.yearHalfyear"
    },
    "@Semantics.fiscal.yearVariant": {
      "type": "boolean",
      "const": true,
      "description": "The element states the calendar year variant.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.fiscal.yearVariant"
    },
    "@Semantics.fiscal.period": {
      "type": "boolean",
      "const": true,
      "description": "The element states the fiscal period.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.fiscal.period"
    },
    "@Semantics.fiscal.year": {
      "type": "boolean",
      "const": true,
      "description": "The element states the fiscal year.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.fiscal.year"
    },
    "@Semantics.fiscal.yearPeriod": {
      "type": "boolean",
      "const": true,
      "description": "The element states the fiscal year period.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.fiscal.yearPeriod"
    },
    "@Semantics.fiscal.quarter": {
      "type": "boolean",
      "const": true,
      "description": "The element states the fiscal quarter.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.fiscal.quarter"
    },
    "@Semantics.fiscal.yearQuarter": {
      "type": "boolean",
      "const": true,
      "description": "The element states the fiscal year quarter.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.fiscal.yearQuarter"
    },
    "@Semantics.fiscal.week": {
      "type": "boolean",
      "const": true,
      "description": "The element states the fiscal week.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.fiscal.week"
    },
    "@Semantics.fiscal.yearWeek": {
      "type": "boolean",
      "const": true,
      "description": "The element states the fiscal year week.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.fiscal.yearWeek"
    },
    "@Semantics.fiscal.dayOfYear": {
      "type": "boolean",
      "const": true,
      "description": "The element states the fiscal day of year.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.fiscal.dayOfYear"
    },
    "@Semantics.language": {
      "type": "boolean",
      "const": true,
      "description": "The property contains a language code.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.language"
    },
    "@Semantics.time": {
      "type": "boolean",
      "const": true,
      "description": "This annotation is used to indicate a date semantic for the NVARCHAR-based ABAP type TIMS.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.time"
    },
    "@Semantics.text": {
      "type": "boolean",
      "const": true,
      "description": "The property contains a human-readable text.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.text"
    },
    "@Semantics.uuid": {
      "type": "boolean",
      "const": true,
      "description": "Tags a field containing a GUID in RAW16 or CHAR32 format.\n\nIt is RECOMMENDED to explicitly use the `csd.UUID` type.",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.uuid"
    },
    "@Semantics.businessDate.from": {
      "type": "boolean",
      "const": true,
      "description": "The property contains a date which is the lower boundary of a (validity) interval (for time dependent master data).",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.businessDate.from"
    },
    "@Semantics.businessDate.to": {
      "type": "boolean",
      "const": true,
      "description": "The property contains a date which is the upper boundary of a (validity) interval (for time dependent master data).",
      "x-extension-targets": [
        "Type"
      ],
      "title": "@Semantics.businessDate.to"
    },
    "@Semantics.mimeType": {
      "type": "boolean",
      "const": true,
      "description": "The property value is a MIME Type / Media Type, following [RFC 6838](https://datatracker.ietf.org/doc/html/rfc6838).",
      "x-extension-targets": [
        "StringType"
      ],
      "x-introduced-in-version": "1.1.0",
      "title": "@Semantics.mimeType"
    },
    "@Semantics.largeObject.acceptableMimeTypes": {
      "description": "The property value contains a document / file that uses one of the stated MIME Types / Media Types ([RFC 6838](https://datatracker.ietf.org/doc/html/rfc6838)).\nThis annotation can be used if the Media Type is already known at design time and can be described in the metadata model itself.\nIf the Media Type is only known at runtime, the \"@Semantics.largeObject.mimeType\" annotation has to be used instead.",
      "type": "array",
      "items": {
        "type": "string"
      },
      "x-extension-targets": [
        "LargeStringType",
        "LargeBinaryType"
      ],
      "x-introduced-in-version": "1.1.0",
      "title": "@Semantics.largeObject.acceptableMimeTypes"
    },
    "@Semantics.largeObject.mimeType": {
      "description": "The property value contains a document / file that has a defined MIME Type / Media Type ([RFC 6838](https://datatracker.ietf.org/doc/html/rfc6838)).\nThe MIME Type / Media Type is indicated in the element value that the Element Reference points to.\nThe element referenced MUST be of type `cds.String` and SHOULD be annotated with `@Semantics.mimeType: true`.",
      "x-ref-to-doc": {
        "title": "Element Reference",
        "ref": "#/definitions/ElementReference"
      },
      "x-extension-targets": [
        "LargeStringType",
        "LargeBinaryType"
      ],
      "x-introduced-in-version": "1.1.0",
      "title": "@Semantics.largeObject.mimeType",
      "$ref": "#/definitions/ElementReference"
    },
    "@Semantics.largeObject.fileName": {
      "description": "The property value contains a document / file that has a defined file name.\nThe file name is indicated in the element value that the Element Reference points to.\nThe element referenced MUST be of type `cds.String`.",
      "x-ref-to-doc": {
        "title": "Element Reference",
        "ref": "#/definitions/ElementReference"
      },
      "x-extension-targets": [
        "LargeStringType",
        "LargeBinaryType"
      ],
      "x-introduced-in-version": "1.1.0",
      "title": "@Semantics.largeObject.fileName",
      "$ref": "#/definitions/ElementReference"
    }
  }
}