main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
860 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | # Swagger UI Dist
|
---|
| 2 | [](http://badge.fury.io/js/swagger-ui-dist)
|
---|
| 3 |
|
---|
| 4 | # API
|
---|
| 5 |
|
---|
| 6 | This module, `swagger-ui-dist`, exposes Swagger-UI's entire dist folder as a dependency-free npm module.
|
---|
| 7 | Use `swagger-ui` instead, if you'd like to have npm install dependencies for you.
|
---|
| 8 |
|
---|
| 9 | `SwaggerUIBundle` and `SwaggerUIStandalonePreset` can be imported:
|
---|
| 10 | ```javascript
|
---|
| 11 | import { SwaggerUIBundle, SwaggerUIStandalonePreset } from "swagger-ui-dist"
|
---|
| 12 | ```
|
---|
| 13 |
|
---|
| 14 | To get an absolute path to this directory for static file serving, use the exported `getAbsoluteFSPath` method:
|
---|
| 15 |
|
---|
| 16 | ```javascript
|
---|
| 17 | const swaggerUiAssetPath = require("swagger-ui-dist").getAbsoluteFSPath()
|
---|
| 18 |
|
---|
| 19 | // then instantiate server that serves files from the swaggerUiAssetPath
|
---|
| 20 | ```
|
---|
| 21 |
|
---|
| 22 | For anything else, check the [Swagger-UI](https://github.com/swagger-api/swagger-ui) repository.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.