Skip to content

Commit

Permalink
Added file type support for responses
Browse files Browse the repository at this point in the history
  • Loading branch information
webron committed Jul 30, 2015
1 parent bb23330 commit 9db746f
Showing 1 changed file with 56 additions and 4 deletions.
60 changes: 56 additions & 4 deletions schemas/v2.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,14 @@
"type": "string"
},
"schema": {
"$ref": "#/definitions/schema"
"oneOf": [
{
"$ref": "#/definitions/schema"
},
{
"$ref": "#/definitions/fileSchema"
}
]
},
"headers": {
"$ref": "#/definitions/headers"
Expand Down Expand Up @@ -766,7 +773,9 @@
"$ref": "#/definitions/vendorExtension"
}
},
"required": ["required"],
"required": [
"required"
],
"properties": {
"required": {
"type": "boolean",
Expand Down Expand Up @@ -1011,6 +1020,47 @@
},
"additionalProperties": false
},
"fileSchema": {
"type": "object",
"description": "A deterministic version of a JSON Schema object.",
"patternProperties": {
"^x-": {
"$ref": "#/definitions/vendorExtension"
}
},
"properties": {
"format": {
"type": "string"
},
"title": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/title"
},
"description": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/description"
},
"default": {
"$ref": "http://json-schema.org/draft-04/schema#/properties/default"
},
"required": {
"$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray"
},
"type": {
"type": "string",
"enum": [
"file"
]
},
"readOnly": {
"type": "boolean",
"default": false
},
"externalDocs": {
"$ref": "#/definitions/externalDocs"
},
"example": {}
},
"additionalProperties": false
},
"primitivesItems": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -1489,7 +1539,9 @@
},
"jsonReference": {
"type": "object",
"required": ["$ref"],
"required": [
"$ref"
],
"additionalProperties": false,
"properties": {
"$ref": {
Expand All @@ -1498,4 +1550,4 @@
}
}
}
}
}

0 comments on commit 9db746f

Please sign in to comment.