{
  "description": "This is the interface description of @API.",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://sap.github.io/csn-interop-specification/spec-v1/api.schema.json#",
  "title": "API Document",
  "type": "object",
  "definitions": {
    "@API.element": {
      "type": "object",
      "description": "Specifies the release state of an element which is part of an API.",
      "properties": {
        "releaseState": {
          "$ref": "#/definitions/@API.element.releaseState"
        },
        "successor": {
          "description": "Defines the name of a released successor element/association which replaces an element/association with release state #DEPRECATED or #DECOMMISSIONED.",
          "x-ref-to-doc": {
            "title": "Element Reference",
            "ref": "#/definitions/ElementReference"
          },
          "$ref": "#/definitions/ElementReference"
        },
        "decommissioningPlannedForYearMonth": {
          "description": "The annotation describes the planned decommissioning date of the annotated element. Use ISO format for YearMonth: YYYY-MM (e.g. 2024-08)",
          "type": "string"
        }
      },
      "x-extension-targets": [
        "Type",
        "Entity"
      ],
      "title": "@API.element"
    },
    "@API.element.releaseState": {
      "type": "object",
      "description": "The annotation describes the release state of the annotated element.",
      "properties": {
        "#": {
          "type": "string",
          "description": "Provide the value in `{ \"#\": \"<value>\" }` enum notation.",
          "oneOf": [
            {
              "const": "DEPRECATED",
              "description": "Formerly released element/association is not to be used anymore.\nAt runtime, the element/association must work as before.\nTogether with this value a successors of the element/association should be defined using annotation @API.element.successor."
            },
            {
              "const": "DECOMMISSIONED",
              "description": "Formerly released element/association not to be used anymore.\nAt runtime, the element/association returns null values.\nTogether with this value a successors of the element/association should be defined using annotation @API.element.successor."
            }
          ]
        }
      },
      "x-extension-targets": [
        "Type",
        "Entity"
      ],
      "title": "@API.element.releaseState"
    }
  }
}