Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/torxed/swagger-ui-mini
A minimal version of swagger-ui (No NodeJS, No Docker, No Dependencies)
https://github.com/torxed/swagger-ui-mini
no-dependencies no-docker no-nodejs rest rest-api swagger swagger-ui swagger-ui-mini
Last synced: 24 days ago
JSON representation
A minimal version of swagger-ui (No NodeJS, No Docker, No Dependencies)
- Host: GitHub
- URL: https://github.com/torxed/swagger-ui-mini
- Owner: Torxed
- License: apache-2.0
- Created: 2019-09-28T13:03:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-05T14:11:47.000Z (almost 5 years ago)
- Last Synced: 2024-12-01T04:45:04.279Z (about 1 month ago)
- Topics: no-dependencies, no-docker, no-nodejs, rest, rest-api, swagger, swagger-ui, swagger-ui-mini
- Language: JavaScript
- Homepage:
- Size: 59.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
A minimal version of swagger-ui *(No NodeJS, No Docker, No Dependencies)*
# Example
A [Live Demo](https://hvornum.se/swagger-ui-mini/examples/example.html) can be viewed online.
For more complete examples, check under `/examples` and see what's in store.### Manifest
```json
{
"urls" : {
"/pet" : {
"POST" : {
"description" : "Add a new pet to the store",
"payloads" : {
"body" : {
"flags" : "REQUIRED",
"description" : "Pet object that needs to be added to the store",
"data" : {
"name" : "Cat name",
"type" : "CAT"
},
"responses" : {
"405" : {
"description" : "Invalid input"
}
}
}
}
}
}
}
}
```### HTML Page
```html
let manifest = null;
import * as swagger from '/swagger.js';window.onload = function() {
// Load a manifest, and once it's loaded - call a function().
swagger.load_manifest('/manifest.json', function() {
swagger.load_urls(manifest['urls'], document.getElementById('table'));
});
}
```