-
Notifications
You must be signed in to change notification settings - Fork 9.1k
/
Copy pathdefaults.js
99 lines (91 loc) · 2.12 KB
/
defaults.js
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
97
98
99
/**
* @prettier
*/
import ApisPreset from "core/presets/apis"
const defaultOptions = Object.freeze({
dom_id: null,
domNode: null,
spec: {},
url: "",
urls: null,
configUrl: null,
layout: "BaseLayout",
docExpansion: "list",
maxDisplayedTags: -1,
filter: false,
validatorUrl: "https://validator.swagger.io/validator",
oauth2RedirectUrl: undefined,
persistAuthorization: false,
configs: {},
displayOperationId: false,
displayRequestDuration: false,
deepLinking: false,
tryItOutEnabled: false,
requestInterceptor: (request) => {
request.curlOptions = []
return request
},
responseInterceptor: (a) => a,
showMutatedRequest: true,
defaultModelRendering: "example",
defaultModelExpandDepth: 1,
defaultModelsExpandDepth: 1,
showExtensions: false,
showCommonExtensions: false,
withCredentials: false,
requestSnippetsEnabled: false,
requestSnippets: {
generators: {
curl_bash: {
title: "cURL (bash)",
syntax: "bash",
},
curl_powershell: {
title: "cURL (PowerShell)",
syntax: "powershell",
},
curl_cmd: {
title: "cURL (CMD)",
syntax: "bash",
},
},
defaultExpanded: true,
languages: null, // e.g. only show curl bash = ["curl_bash"]
},
supportedSubmitMethods: [
"get",
"put",
"post",
"delete",
"options",
"head",
"patch",
"trace",
],
queryConfigEnabled: false,
// Initial set of plugins ( TODO rename this, or refactor - we don't need presets _and_ plugins. Its just there for performance.
// Instead, we can compile the first plugin ( it can be a collection of plugins ), then batch the rest.
presets: [ApisPreset],
// Plugins; ( loaded after presets )
plugins: [],
initialState: {},
// Inline Plugin
fn: {},
components: {},
syntaxHighlight: {
activated: true,
theme: "agate",
},
operationsSorter: null,
tagsSorter: null,
onComplete: null,
modelPropertyMacro: null,
parameterMacro: null,
fileUploadMediaTypes: [
"application/octet-stream",
"image/",
"audio/",
"video/",
],
})
export default defaultOptions