ルールのJSONスキーマ#

ルールのスキーマ表現を示します。

     {
       "type": "object",
       "required": true,
       "properties": {
         "rules": {
           "type": "array",
           "required": false,
           "items":{
             "type": "object",
             "required": true,
             "properties": {
               "behaviors": {
                 "type": "array",
                 "required": true,
                 "items":{
                   "type": "object",
                   "required": true,
                   "properties": {
                     "name": {
                     "type": "string",
                     "enum": [
                       "origin",
                       "caching",
                       "referer-whitelist",
                       "referer-blacklist",
                       "geo-whitelist",
                       "geo-blacklist",
                       "ip-whitelist",
                       "ip-blacklist",
                       "content-refresh",
                       "cachekey-query-args",
                       "modify-outgoing-request-path",
                       "site-failover",
                       "downstream-caching ",
                     ],
                     "required": true
                   },
                   "type": {
                     "type": "string",
                     "required": false
                    },
                   "params": {
                     "type": "string",
                     "required": false
                     },
                     # Origin does not use value.
                     "value": {
                       "type": "string",
                       "required": false
                     }
                   }
                 }
               },
               "matches": {
                 "type": "array",
                 "required": true,
                 "items": {
                   "type": "object",
                   "required": true,
                   "properties": {
                     "name": {
                     "type": "string",
                     "enum": [
                       "http-method",
                       "url-scheme",
                       "url-path",
                       "url-extension",
                       "url-filename",
                       "header",
                       "url-wildcard"
                       ],
                     "required": true
                     },
                     "value": {
                       "type": "string",
                       "required": true
                     },
                     "negated": {
                       "type": "boolean",
                       "required": false
                     }
                   }
                 }
               }
             }
           }
         }
       }
     }
   

rules

Data Type Cardinality Parent Element Child Element(s)
object 1..n None behaviors, matches

Data Type Cardinality Parent Element Child Element(s)
object 1..n rules name, type, params, value

name

Data Type Cardinality Parent Element Child Element(s)
enum("origin", "caching", "referer-whitelist", "referer-blacklist", "geo-whitelist", "geo-blacklist", "ip-whitelist", "ip-blacklist", "content-refresh", "cachekey-query-args", "modify-outgoing-request-path", "site-failover", "downstream-caching") 1..1 behaviors None

type

Data Type Cardinality Parent Element Child Element(s)
String 0..1 behaviors None

params

Data Type Cardinality Parent Element Child Element(s)
String 0..1 behaviors None

value

Data Type Cardinality Parent Element Child Element(s)
String 0..1 behaviors None

matches

Data Type Cardinality Parent Element Child Element(s)
object 1..n rules name, value, negated

name

Data Type Cardinality Parent Element Child Element(s)
enum( "http-method", "url-scheme", "url-path", "url-extension", "url-filename", "header", "url-wildcard") 1..1 matches None

value

Data Type Cardinality Parent Element Child Element(s)
String 1..1 matches None

negated

Data Type Cardinality Parent Element Child Element(s)
boolean 0..1 matches None