forked from swagger-api/swagger-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defaults.json.guide.js
159 lines (138 loc) · 4.45 KB
/
defaults.json.guide.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
'use strict';
/** *****************************************************************************
* This is a guide for defaults.json configuration file. Please don't modify this
* file for changing the settings, instead, modify defaults.json.
* If you are using Swagger Editor as a dependency, Swagger Editor will make an
* XHR request to '/config/defaults.json' to get it's settings.
*******************************************************************************/
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "defaults" }]*/
var defaults = {
/*
* Analytics section is used for user tracking configurations. At the moment
* only Google Analytics is supported.
*/
analytics: {
google: {
/*
* Put your Google Analytics ID here
*/
id: 'YOUR_GOOGLE_ANALYTICS_ID'
}
},
/*
* Code generator endpoints s are used for generating servers and client
* Swagger Editor will GET list of server and client generators and POST to
* each `server` and `client` with Swagger document in body to download the
* product of the code generator.
*/
codegen: {
/*
* Menu items are generated based on result of GET request to these
* endpoint
*/
servers: 'http://generator.swagger.io/online/api/gen/servers',
clients: 'http://generator.swagger.io/online/api/gen/clients',
/*
* For each item in menu item, Swagger Editor will make calls to these
* endpoint to download the generated code accordingly
*/
server: 'http://generator.swagger.io/online/api/gen/servers/{language}',
client: 'http://generator.swagger.io/online/api/gen/clients/{language}'
},
/*
* Disables Code Generators
*/
disableCodeGen: true,
/*
* Folder that example files are located
* Note that this string will be used in between two other url segments
* so you always need the trailing and leading slashes
*/
examplesFolder: 'spec-files/',
/*
* Ace editor options. This object will overload existing editor options.
* See all possible options here: http://ace.c9.io/#nav=api&api=ace
*/
editorOptions: {},
/*
* List of example files to show to user to pick from. The URL to fetch each
* example is a combination of `examplesFolder` and file name
*/
exampleFiles: [
'default.yaml',
'heroku-pets.yaml',
'minimal.yaml',
'petstore_simple.yaml',
'petstore_full.yaml',
'basic-auth.yaml',
'security.yaml'
],
/*
* Keywords for auto-complete are generated from a JavaScript object.
* See keyword-map.js for object format
*/
autocompleteExtension: {},
/*
* Use a back-end for storing the document instead of browser local storage
*/
useBackendForStorage: false,
/*
* Change how many milliseconds after the last keypress the editor should
* respond to change.
*/
keyPressDebounceTime: 200,
/*
* The timeout for throttling backend calls
*/
backendThrottle: 200,
/*
* URL of the Back-end for storing swagger document. Editor will PUT and GET
* to this URL to **Save** and **Read** the Swagger document
*/
backendEndpoint: '/editor/spec',
/*
* When using a back-end, editor by default PUTs JSON document for Saving.
* Enable this to use YAML instead
*/
useYamlBackend: false,
/*
* Disables File menu which includes New, Open Example and Import commands
*/
disableFileMenu: false,
/*
* When it's enabled:
* * Editor will append `brandingCssClass` class to body tag
* * Editor will include branding templates at
* app/templates/branding-left.html and
* app/templates/branding-left.html
* to it's header
*/
headerBranding: false,
/*
* Enables Try Operation functionality
*/
enableTryIt: true,
/*
* When `headerBranding` is enabled, this will be appended to body tag
*/
brandingCssClass: '',
/*
* Disables the overlay introduction panel
*/
disableNewUserIntro: false,
/*
* When Editor imports a file from a URL, it will prepend this URL to make
* it possible to import contents that are not allowed to be loaded from a
* different origin. If you're hosting your own editor, please replace this
*/
importProxyUrl: 'https://cors-it.herokuapp.com/?url=',
/*
* Use this base path for resolving JSON Pointers ($ref).
* This value should be a valid URL.
*
* Example: http://example.com/swaggers
*
* More info: https://github.com/swagger-api/swagger-editor/issues/977#issuecomment-232254578
*/
pointerResolutionBasePath: null
};