Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 2.80 KB | None | 0 0
  1. {
  2.   "$schema": "http://json-schema.org/draft-07/schema#",
  3.   "$id": "http://example.com/product.schema.json",
  4.   "title": "Line",
  5.   "description": "Defines the details and mathematical values of a line",
  6.   "type": "object",
  7.  
  8.   "properties": {
  9.     "line_id": {
  10.       "type": "string"
  11.     },
  12.     "type": {
  13.       "type": "object",
  14.       "properties": {
  15.         "name": {
  16.           "type": "string",
  17.           "minLength": 1
  18.         },
  19.         "id": {
  20.           "type": "number",
  21.           "minimum": 0
  22.         }
  23.       },
  24.       "required": ["name", "id"],
  25.       "additionalProperties": false
  26.     },
  27.     "model": {
  28.       "description": "Info on the specific line",
  29.       "type": "object",
  30.       "properties": {
  31.         "breaking_strain": {
  32.           "type": "object",
  33.           "properties": {
  34.             "metric": {
  35.               "type": "number"
  36.             },
  37.             "imperial": {
  38.               "type": "number"
  39.             }
  40.           },
  41.           "anyOf": [
  42.             {
  43.               "required": ["metric"]
  44.             },
  45.             {
  46.               "required": ["imperial"]
  47.             }
  48.           ]
  49.         },
  50.         "colour": {
  51.           "type": "string",
  52.           "minLength": 1
  53.         },
  54.         "name": {
  55.           "type": "string",
  56.           "minLength": 1
  57.         },
  58.         "brand": {
  59.           "type": "string",
  60.           "minLength": 1
  61.         }
  62.       },
  63.       "required": ["breaking_strain", "name", "brand"],
  64.       "additionalProperties": false
  65.     },
  66.     "calibration": {
  67.       "type": "object",
  68.       "properties": {
  69.         "effective_diameter": {
  70.           "type": "number",
  71.           "exclusiveMinimum": 0
  72.         },
  73.         "components": {
  74.           "type": "object",
  75.           "properties": {
  76.             "length": {
  77.               "type": "number",
  78.               "exclusoveMinimum": 0
  79.             },
  80.             "reel_id": {
  81.               "type": "string"
  82.             },
  83.             "stated_diameter": {
  84.               "type": "number"
  85.             },
  86.             "backing": {
  87.               "type": "object",
  88.               "properties": {
  89.                 "length": {
  90.                   "type": "number"
  91.                 },
  92.                 "effective_diameter": {
  93.                   "type": "number"
  94.                 },
  95.                 "line_id": {
  96.                   "type": "number"
  97.                 }
  98.               },
  99.               "required": ["length", "effective_diameter", "line_id"],
  100.               "additionalProperties": false
  101.             }
  102.           },
  103.           "required": ["length", "reel_id", "stated_diameter"],
  104.           "additionalProperties": false
  105.         }
  106.       },
  107.       "required": ["effective_diameter", "components"]
  108.     }
  109.   },
  110.   "required": ["type", "model", "calibration"],
  111.   "additionalProperties": false
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement