|
1 | | -{ |
| 1 | +REQUEST_SCHEMA = { |
2 | 2 | "$schema": "http://json-schema.org/draft-04/schema#", |
3 | 3 | "description": "A JSON RPC 2.0 request", |
4 | 4 | "oneOf": [ |
5 | | - { |
6 | | - "description": "An individual request", |
7 | | - "$ref": "#/definitions/request" |
8 | | - }, |
| 5 | + {"description": "An individual request", "$ref": "#/definitions/request"}, |
9 | 6 | { |
10 | 7 | "description": "An array of requests", |
11 | 8 | "type": "array", |
12 | | - "items": { "$ref": "#/definitions/request" }, |
13 | | - "minItems": 1 |
14 | | - } |
| 9 | + "items": {"$ref": "#/definitions/request"}, |
| 10 | + "minItems": 1, |
| 11 | + }, |
15 | 12 | ], |
16 | 13 | "definitions": { |
17 | 14 | "request": { |
18 | 15 | "type": "object", |
19 | | - "required": [ "jsonrpc", "method" ], |
| 16 | + "required": ["jsonrpc", "method"], |
20 | 17 | "properties": { |
21 | | - "jsonrpc": { "enum": [ "2.0" ] }, |
22 | | - "method": { |
23 | | - "type": "string" |
24 | | - }, |
| 18 | + "jsonrpc": {"enum": ["2.0"]}, |
| 19 | + "method": {"type": "string"}, |
25 | 20 | "id": { |
26 | | - "type": [ "string", "number", "null" ], |
| 21 | + "type": ["string", "number", "null"], |
27 | 22 | "note": [ |
28 | 23 | "While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1", |
29 | | - "While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2" |
30 | | - ] |
| 24 | + "While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2", |
| 25 | + ], |
31 | 26 | }, |
32 | | - "params": { |
33 | | - "type": [ "array", "object" ] |
34 | | - } |
| 27 | + "params": {"type": ["array", "object"]}, |
35 | 28 | }, |
36 | | - "additionalProperties": false |
| 29 | + "additionalProperties": False, |
37 | 30 | } |
38 | | - } |
| 31 | + }, |
39 | 32 | } |
0 commit comments