| 1 | [ |
| 2 | { |
| 3 | "description": "medium schema from jsck benchmark (https://github.com/pandastrike/jsck)", |
| 4 | "schema": { |
| 5 | "description": "A moderately complex schema with some nesting and value constraints", |
| 6 | "type": "object", |
| 7 | "additionalProperties": false, |
| 8 | "required": ["api_server", "transport", "storage", "chain"], |
| 9 | "properties": { |
| 10 | "api_server": { |
| 11 | "description": "Settings for the HTTP API server", |
| 12 | "type": "object", |
| 13 | "additionalProperties": false, |
| 14 | "required": ["url", "host", "port"], |
| 15 | "properties": { |
| 16 | "url": { |
| 17 | "type": "string", |
| 18 | "format": "uri" |
| 19 | }, |
| 20 | "host": { |
| 21 | "type": "string" |
| 22 | }, |
| 23 | "port": { |
| 24 | "type": "integer", |
| 25 | "minimum": 1000 |
| 26 | } |
| 27 | } |
| 28 | }, |
| 29 | "transport": { |
| 30 | "description": "Settings for the Redis tranport", |
| 31 | "additionalProperties": false, |
| 32 | "required": ["server"], |
| 33 | "properties": { |
| 34 | "server": { |
| 35 | "type": "string" |
| 36 | }, |
| 37 | "options": { |
| 38 | "type": "object" |
| 39 | }, |
| 40 | "queues": { |
| 41 | "properties": { |
| 42 | "blocking_timeout": { |
| 43 | "type": "integer", |
| 44 | "minimum": 0 |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | } |
| 49 | }, |
| 50 | "storage": { |
| 51 | "description": "Settings for the PostgreSQL storage", |
| 52 | "required": ["server", "database", "user"], |
| 53 | "properties": { |
| 54 | "server": { |
| 55 | "type": "string" |
| 56 | }, |
| 57 | "database": { |
| 58 | "type": "string" |
| 59 | }, |
| 60 | "user": { |
| 61 | "type": "string" |
| 62 | }, |
| 63 | "options": { |
| 64 | "type": "object" |
| 65 | } |
| 66 | } |
| 67 | }, |
| 68 | "chain": { |
| 69 | "description": "Settings for the Chain.com client", |
| 70 | "required": ["api_key_id", "api_key_secret"], |
| 71 | "properties": { |
| 72 | "api_key_id": { |
| 73 | "type": "string" |
| 74 | }, |
| 75 | "api_key_secret": { |
| 76 | "type": "string" |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | }, |
| 82 | "tests": [ |
| 83 | { |
| 84 | "description": "valid object from jsck benchmark", |
| 85 | "data": { |
| 86 | "api_server": { |
| 87 | "url": "http://example.com:8998", |
| 88 | "host": "example.com", |
| 89 | "port": 8998 |
| 90 | }, |
| 91 | "transport": { |
| 92 | "server": "127.0.0.1:6381", |
| 93 | "queues": { |
| 94 | "blocking_timeout": 0 |
| 95 | } |
| 96 | }, |
| 97 | "storage": { |
| 98 | "server": "127.0.0.1:5432", |
| 99 | "database": "thingy-test", |
| 100 | "user": "thingy-test", |
| 101 | "password": "password" |
| 102 | }, |
| 103 | "chain": { |
| 104 | "api_key_id": "cafebabe", |
| 105 | "api_key_secret": "babecafe" |
| 106 | } |
| 107 | }, |
| 108 | "valid": true |
| 109 | }, |
| 110 | { |
| 111 | "description": "not object", |
| 112 | "data": 1, |
| 113 | "valid": false |
| 114 | } |
| 115 | ] |
| 116 | } |
| 117 | ] |