Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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)

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'));
});
}





```