one-data-model / language

(Old repo:) Simple Definition Format (SDF) for One Data Model definitions
7 stars 4 forks source link

Expansion / Processing of $ref #81

Open asoloway64 opened 5 years ago

asoloway64 commented 5 years ago

When creating reusable properties, how would $ref be expanded / processed.

General: How would $ref be expanded / processed in all usages.

mjkoster commented 4 years ago

We resolved to create another ODM reserved word, odmRef https://github.com/one-data-model/language/issues/83

e.g.

{
  "odmProperty" : {
    "rChannel": { "odmRef": "#/odmData/colorChannelData" },
    "gChannel": { "odmRef": "#/odmData/colorChannelData" },
    "bChannel": { "odmRef": "#/odmData/colorChannelData" }
  },
  "odmData": {
    "colorChannelData": {
      "type": "number",
      "minumum": 0,
      "maximum": 256
    }
  }
}