grim/resticide

32bc94f303e2
Give the --help output some tlc, also added a --version argument
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"headers": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"body": {
"type": "string"
},
"form-data": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"value": {
"oneOf": [{
"type": "string"
}, {
"type": "null"
}]
},
"json": {
"oneOf": [{
"$ref": "#/definitions/json"
}, {
"type": "null"
}]
},
"filename": {
"oneOf": [{
"type": "string"
}, {
"type": "null"
}]
}
},
"anyOf": [{
"required": ["value"]
}, {
"required": ["json"]
}, {
"required": ["filename"]
}]
}
},
"x-www-form-urlencoded": {
"type": "object",
"additionalProperties": {"type": "string"}
},
"binary": {
"type": "string"
},
"json": {
"type": "object",
"additionalProperties": true
},
"json-schema": {
"type": "object",
"additionalProperties": true
},
"file": {
"type": "object",
"additionalProperties": false,
"properties": {
"filename": {"type": "string"},
"md5": {"type": "string"},
"sha256": {"type": "string"}
},
"anyOf": [{
"required": ["md5"]
}, {
"required": ["sha256"]
}]
},
"response": {
"type": "object",
"properties": {
"statuscode": {"type": "integer"},
"headers": {
"oneOf": [{
"$ref": "#/definitions/headers"
}, {
"type": "null"
}]
},
"body": {"$ref": "#/definitions/body"},
"json-schema": {
"oneOf": [{
"$ref": "#/definitions/json-schema"
}, {
"type": "null"
}]
},
"file": {
"oneOf": [{
"$ref": "#/definitions/file"
}, {
"type": "null"
}]
}
},
"anyOf": [{
"required": ["statuscode", "body"]
}, {
"required": ["statuscode", "json-schema"]
}, {
"required": ["statuscode"]
}],
"additionalProperties": false
},
"request": {
"type": "object",
"properties": {
"path": {"type": "string"},
"query": {"type": ["object", "null", "string"]},
"headers": {
"oneOf": [{
"$ref": "#/definitions/headers"
}, {
"type": "null"
}]
},
"method": {
"type": "string",
"default": "GET"
},
"body": {
"oneOf": [{
"$ref": "#/definitions/body"
}, {
"type": "null"
}]
},
"binary": {
"oneOf": [{
"$ref": "#/definitions/binary"
}, {
"type": "null"
}]
},
"form-data": {
"oneOf": [{
"$ref": "#/definitions/form-data"
}, {
"type": "null"
}]
},
"x-www-form-urlencoded": {
"oneOf": [{
"$ref": "#/definitions/x-www-form-urlencoded"
}, {
"type": "null"
}]
},
"json": {
"oneOf": [{
"$ref": "#/definitions/json"
}, {
"type": "null"
}]
},
"response": {"$ref": "#/definitions/response"}
},
"anyOf": [{
}, {
"required": ["path", "response", "body"]
}, {
"required": ["path", "response", "binary"]
}, {
"required": ["path", "response", "form-data"]
}, {
"required": ["path", "response", "x-www-form-urlencoded"]
}, {
"required": ["path", "response", "json"]
}, {
"required": ["path", "response"]
}],
"additionalProperties": false
},
"requests": {
"type": "array",
"items": {"$ref": "#/definitions/request"}
}
},
"type": "object",
"additionalProperties": false,
"properties": {
"name": {"type": "string"},
"request": {
"oneOf": [{
"$ref": "#/definitions/request"
}, {
"type": "null"
}]
},
"requests": {
"oneOf": [{
"$ref": "#/definitions/requests"
}, {
"type": "null"
}]
}
},
"anyOf": [{
"required": ["name", "request"]
}, {
"required": ["name", "requests"]
}]
}