github.com/jbking/gohan@v0.0.0-20151217002006-b41ccf1c2a96/etc/schema/core.json (about) 1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "allOf": [ 4 { 5 "$ref": "http://json-schema.org/draft-04/schema#" 6 } 7 ], 8 "definitions": { 9 "resource": { 10 "description": "Resource definition", 11 "properties": { 12 "description": { 13 "default": "", 14 "description": "Description", 15 "title": "description", 16 "type": "string" 17 }, 18 "id": { 19 "description": "id", 20 "title": "id", 21 "type": "string" 22 }, 23 "parent": { 24 "default": "", 25 "description": "Parent of this schema", 26 "title": "parent", 27 "type": "string" 28 }, 29 "plural": { 30 "description": "Plural of this schema", 31 "title": "Plural", 32 "type": "string" 33 }, 34 "prefix": { 35 "default": "", 36 "description": "Prefix", 37 "title": "prefix", 38 "type": "string" 39 }, 40 "schema": { 41 "$ref": "#" 42 }, 43 "title": { 44 "description": "Label of this schema", 45 "title": "title", 46 "type": "string" 47 }, 48 "actions": { 49 "description": "Resource Actions", 50 "patternProperties": { 51 ".*": { 52 "properties": { 53 "input": { 54 "$ref": "#" 55 }, 56 "output": { 57 "$ref": "#" 58 } 59 }, 60 "type": "object" 61 } 62 }, 63 "title": "Actions", 64 "type": "object" 65 } 66 }, 67 "required": [ 68 "id", 69 "title", 70 "schema", 71 "plural", 72 "prefix" 73 ], 74 "title": "gohan resource", 75 "type": "object" 76 }, 77 "statement": { 78 "action": { 79 "type": "string" 80 }, 81 "condition": { 82 "items": { 83 "type": "string" 84 }, 85 "type": "array" 86 }, 87 "description": "policy statement for describing policy for API", 88 "effect": { 89 "enum": [ 90 "allow", 91 "deny" 92 ], 93 "type": "string" 94 }, 95 "id": { 96 "description": "id", 97 "title": "id", 98 "type": "string" 99 }, 100 "principal": { 101 "type": "string" 102 }, 103 "resource": { 104 "permission": [ 105 "create", 106 "update" 107 ], 108 "properties": { 109 "path": { 110 "type": "string" 111 }, 112 "properties": { 113 "items": { 114 "type": "string" 115 }, 116 "type": "array" 117 } 118 }, 119 "type": "object" 120 }, 121 "title": "policy statement" 122 }, 123 "stringArray": { 124 "items": { 125 "type": "string" 126 }, 127 "type": "array" 128 } 129 }, 130 "description": "A representation of a gohan resources", 131 "properties": { 132 "description": { 133 "type": "string" 134 }, 135 "policy": { 136 "items": { 137 "$ref": "#/definitions/statement" 138 }, 139 "type": "array" 140 }, 141 "resources": { 142 "items": { 143 "$ref": "#/definitions/resource" 144 }, 145 "type": "array" 146 }, 147 "title": { 148 "type": "string" 149 } 150 }, 151 "type": "object" 152 }