{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/evolving-resolutive-process-notation/versions/1.0.json",
  "title": "evolving resolutive process notation",
  "x-lintel": {
    "source": "https://www.schemastore.org/evolving-resolutive-process-notation-1.0.json",
    "sourceSha256": "275a748f43666b32d2fa4aa9246e81ee31c463d966f84aeac222a7de6d4752bb",
    "fileMatch": [
      "*.erpn.yml",
      "*.erpn.yaml",
      "*.erpn.toml",
      "*.erpn.json"
    ],
    "parsers": [
      "json",
      "toml",
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "type": {
      "type": "object",
      "required": [
        "name",
        "version"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Standard name"
        },
        "version": {
          "$ref": "#/$defs/semver"
        }
      },
      "additionalProperties": true
    },
    "content": {
      "$ref": "#/$defs/contentObject"
    }
  },
  "$defs": {
    "contentObject": {
      "type": "object",
      "properties": {
        "link": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Where to gather info. If exists, other properties are ignored"
        },
        "name": {
          "type": "string"
        },
        "version": {
          "$ref": "#/$defs/semver"
        },
        "essence": {
          "type": "object",
          "description": "Main description",
          "properties": {
            "contradiction": {
              "type": "object",
              "description": "Why we have to create this object",
              "properties": {
                "fundamental": {
                  "type": "object",
                  "description": "Construction of contradiction",
                  "properties": {
                    "thesis": {
                      "type": "string",
                      "description": "What we have in reality"
                    },
                    "antithesis": {
                      "type": "string",
                      "description": "Why reality is not enough"
                    }
                  },
                  "additionalProperties": true
                },
                "space": {
                  "type": "object",
                  "description": "Where is the problem and where can we act",
                  "properties": {
                    "space": {
                      "type": "string"
                    },
                    "limitations": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "actors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": true
                },
                "tradeoff": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Limits to make path curved for solving problem"
                },
                "resources": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "What we have before solving problem"
                }
              },
              "additionalProperties": true
            },
            "synthesis": {
              "type": "object",
              "description": "How to solve main problem",
              "properties": {
                "fundamental": {
                  "type": "string",
                  "description": "Common solution for contradiction"
                },
                "resources": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "What we need to realize solution"
                },
                "advantages": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "What else we will get from solution beside problem solving"
                }
              },
              "additionalProperties": true
            },
            "realization": {
              "type": "object",
              "description": "How main object was solved",
              "properties": {
                "input": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/commonObject"
                  },
                  "description": "What we have to get from outer space for sustainable functionality"
                },
                "output": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/commonObject"
                  },
                  "description": "What we produce"
                },
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/commonObject"
                  },
                  "description": "Our manipulated objects"
                },
                "value": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/commonObject"
                  },
                  "description": "What we produce for main purpose or valuable to outer external world"
                },
                "commonDescription": {
                  "type": "string",
                  "description": "How it works"
                }
              },
              "additionalProperties": true
            }
          },
          "additionalProperties": true
        },
        "timing": {
          "type": "object",
          "description": "Time gap of object activity with authors and source of changing",
          "properties": {
            "start": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "end": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time"
            },
            "impactPercent": {
              "$ref": "#/$defs/percent",
              "description": "How much this version affects reality versus old ones"
            },
            "authors": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/person"
              },
              "description": "Who did it"
            },
            "source": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "What is the reason of changing"
            }
          },
          "additionalProperties": true
        },
        "content": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/contentObject"
          },
          "description": "Sub level objects"
        },
        "history": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/contentObject"
          },
          "description": "Old versions of object with only changed properties"
        }
      },
      "description": "Main object for notation"
    },
    "commonObject": {
      "type": "object",
      "description": "Common object for various reality flashes",
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/propertyType"
        },
        "describe": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "semver": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+\\.\\d+$",
      "description": "Semantic version - major.minor.patch"
    },
    "propertyType": {
      "type": "string",
      "description": "Type describes possible operations on property"
    },
    "percent": {
      "type": "number",
      "minimum": 0,
      "maximum": 100,
      "description": "Percent value"
    },
    "person": {
      "type": "object",
      "description": "Person description",
      "properties": {
        "name": {
          "type": "string"
        },
        "impactPercent": {
          "$ref": "#/$defs/percent"
        },
        "position": {
          "type": "string",
          "description": "Role in organization"
        },
        "comment": {
          "type": "string"
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
