|
| 1 | +INPUT = { |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema", |
| 3 | + "$id": "http://example.com/example.json", |
| 4 | + "type": "object", |
| 5 | + "title": "Sample schema", |
| 6 | + "description": "The root schema comprises the entire JSON document.", |
| 7 | + "examples": [{"message": "hello world", "username": "lessa"}], |
| 8 | + "required": ["message", "username"], |
| 9 | + "properties": { |
| 10 | + "message": { |
| 11 | + "$id": "#/properties/message", |
| 12 | + "type": "string", |
| 13 | + "title": "The message", |
| 14 | + "examples": ["hello world"], |
| 15 | + "maxLength": 100, |
| 16 | + }, |
| 17 | + "username": { |
| 18 | + "$id": "#/properties/username", |
| 19 | + "type": "string", |
| 20 | + "title": "The username", |
| 21 | + "examples": ["lessa"], |
| 22 | + "maxLength": 30, |
| 23 | + }, |
| 24 | + }, |
| 25 | +} |
| 26 | + |
| 27 | +OUTPUT = { |
| 28 | + "$schema": "http://json-schema.org/draft-07/schema", |
| 29 | + "$id": "http://example.com/example.json", |
| 30 | + "type": "object", |
| 31 | + "title": "Sample outgoing schema", |
| 32 | + "description": "The root schema comprises the entire JSON document.", |
| 33 | + "examples": [{"statusCode": 200, "body": "response"}], |
| 34 | + "required": ["statusCode", "body"], |
| 35 | + "properties": { |
| 36 | + "statusCode": {"$id": "#/properties/statusCode", "type": "integer", "title": "The statusCode"}, |
| 37 | + "body": {"$id": "#/properties/body", "type": "string", "title": "The response"}, |
| 38 | + }, |
| 39 | +} |
0 commit comments