This repository was archived by the owner on Jun 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathbody-binary.json
More file actions
96 lines (96 loc) · 2.28 KB
/
Copy pathbody-binary.json
File metadata and controls
96 lines (96 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"swagger": "2.0",
"info": {
"description": "Sample for file with json and binary content type.",
"version": "1.0.0",
"title": "Binary with content-type: application/json"
},
"host": "localhost:3000",
"schemes": ["http"],
"produces": ["application/json"],
"paths": {
"/binary/file": {
"post": {
"description": "Uploading json file",
"consumes": ["application/json"],
"operationId": "Upload_File",
"parameters": [
{
"name": "fileParam",
"in": "body",
"schema": {
"type": "object",
"format": "file"
},
"required": true,
"description": "JSON file with payload { \"more\": \"cowbell\" }"
}
],
"responses": {
"200": {
"description": "Cowbell was added."
}
}
}
},
"/binary/octet": {
"put": {
"description": "Uploading binary file",
"consumes": ["application/octet-stream"],
"operationId": "Upload_Binary",
"parameters": [
{
"name": "fileParam",
"in": "body",
"schema": {
"type": "string",
"format": "binary"
},
"required": true,
"description": "Non-empty binary file"
}
],
"responses": {
"200": {
"description": "Binary was added."
}
}
}
},
"/binary/error": {
"get": {
"description": "Get binary error stream",
"produces": ["application/octet-stream", "application/json"],
"operationId": "Download_ErrorStream",
"responses": {
"200": {
"description": "Binary was added.",
"schema": {
"type": "file"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Error": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}