forked from swagger-api/swagger-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
28 lines (22 loc) · 792 Bytes
/
index.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
import SwaggerUI from 'swagger-ui'
import 'swagger-ui/dist/swagger-ui.css'; // Important to import the Swagger UI styles
const spec = require('./swagger-config.yaml');
const ui = SwaggerUI({
spec,
dom_id: "#swagger",
/*docExpansion: "full", "list" OR "none" */
// docExpansion: "full" -- default one --,
//docExpansion: "list"
docExpansion: "none",
// operationsSorter if you do NOT specify == default one
//operationsSorter:"alpha"
operationsSorter:"method",
// tagsSorter if you do NOT specify == default one == determined by Swagger UI
tagsSorter:"alpha",
//tagsSorter:"functionPendingToAdd"
})
ui.initOAuth({
appName: "Swagger UI Webpack Demo",
// See https://demo.identityserver.io/ for configuration details.
clientId: "implicit"
})