https://github.com/darosh/angular-swagger-ui-material
[ABANDONED] Material Design template for angular-swager-ui
https://github.com/darosh/angular-swagger-ui-material
Last synced: about 1 month ago
JSON representation
[ABANDONED] Material Design template for angular-swager-ui
- Host: GitHub
- URL: https://github.com/darosh/angular-swagger-ui-material
- Owner: darosh
- License: mit
- Created: 2016-02-25T12:16:42.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-16T14:23:07.000Z (over 7 years ago)
- Last Synced: 2025-03-26T11:51:08.941Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://darosh.github.io/angular-swagger-ui-material/
- Size: 857 KB
- Stars: 92
- Watchers: 4
- Forks: 21
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angular-swagger-ui-material
__Abandoned in favor of [OpenAPI Specification Explorer](https://github.com/darosh/oax/)!__

[](https://github.com/APIs-guru/openapi-directory)Material Design ~~template~~ Swagger UI ~~for~~ based on [angular-swagger-ui](https://github.com/Orange-OpenSource/angular-swagger-ui).
## Demo
*Chrome browser should work.*
### Main demos
| Demo | Server | Notes |
| --- | --- | --- |
| [Pet Store](http://darosh.github.io/angular-swagger-ui-material) | [petstore.swagger.io](http://petstore.swagger.io) | Markdown in API info |
| [Hub](http://darosh.github.io/angular-swagger-ui-material/hub/) | | powered by [APIs.guru](http://APIs.guru) |
| [Theming Demo](http://darosh.github.io/angular-swagger-ui-material/?primary=blue-grey&accent=grey&warn=pink) | [petstore.swagger.io](http://petstore.swagger.io) | *primary:* blue-grey, *accent:* grey, *warn:* pink |### Development demos
| Demo | Server | Notes |
| --- | --- | --- |
| [Uber](http://darosh.github.io/angular-swagger-ui-material/#?url=https://cdn.rawgit.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/uber.json) | no | from [OpenAPI-Specification/examples](https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v2.0/json/uber.json), Markdown in operation info |
| [LoopBack Drupal](http://darosh.github.io/angular-swagger-ui-material/#?url=http://darosh.github.io/angular-swagger-ui-material/swagger-drupal.json) | no | [Drupal](https://www.drupal.org/) database discovered + [LoopBack](http://loopback.io/) default models,
large: 900+ operations |
| [Minimal Swagger 2.0](http://darosh.github.io/angular-swagger-ui-material/#?url=http://darosh.github.io/angular-swagger-ui-material/swagger-minimal.json) | no | |
| [GiHub Flavored Markdown](http://darosh.github.io/angular-swagger-ui-material/#?url=http://darosh.github.io/angular-swagger-ui-material/swagger-gfm.json) | no | generated from [test/fixtures/markdown/README.md](https://github.com/darosh/angular-swagger-ui-material/blob/master/test/fixtures/markdown/README.md) |
| [Swashbuckle](http://darosh.github.io/angular-swagger-ui-material/#?url=http://darosh.github.io/angular-swagger-ui-material/swagger-swashbuckle.json) | no | generated by [Swashbuckle](https://github.com/domaindrivendev/Swashbuckle) |
| [Swashbuckle.OData](http://darosh.github.io/angular-swagger-ui-material/#?url=http://darosh.github.io/angular-swagger-ui-material/swagger-swashbuckle-odata.json) | no | example from [Swashbuckle.OData](https://github.com/rbeauchamp/Swashbuckle.OData) |
| [YAML](http://darosh.github.io/angular-swagger-ui-material/#?url=https://api.apis.guru/specs/bbc.com/1.0.0/swagger.yaml) | no | example for [swagger-yaml.js](./src/plugins/before-load/yaml.js) module |## Features
* [x] [Material Design](https://www.google.com/design/spec/material-design/introduction.html)
* [x] Responsible layout
* [x] Configurable [angular-material](https://material.angularjs.org) theme colors
* [x] Highlight deprecated methods
* [x] Render [GFM](https://help.github.com/articles/working-with-advanced-formatting/) descriptions
* [x] Download de-referenced standalone JSON or YAML
* [x] YAML Swagger format support
* [x] Standard HTTP *methods*, *status codes* and *headers* reference thanks to [know-your-http-well](https://github.com/for-GET/know-your-http-well)
* [x] Grouped and ungrouped views
* [x] Open response body in new window
* [x] [securityDefinitions](http://swagger.io/specification/#securityDefinitionsObject) support
* [x] Proxy support
* [x] Search## Search
| Filter | Matches | Notes |
| --- | --- | --- |
| log | POST /user/login
POST /user/login| path |
| get | GET /user
GET /pet | method |
| ge | N/A | single word, not full method |
| get pet | GET /pet | method + path |
| de pet | DELETE /pet | method + path |## Plugins
See [src/plugins](./src/plugins).
## Reference
* [angular-swagger-ui](https://github.com/Orange-OpenSource/angular-swagger-ui)
* [Swagger RESTful API documentation specification](http://swagger.io/specification/)
* [OpenAPI specification](https://github.com/OAI/OpenAPI-Specification)## Development
**Install**
```shell
npm install -g bower gulp
bower install
npm install
```**Rebuild** [http-data.js](./src/services/http-data.js)
```
gulp info
```**Rebuild** [swagger-gfm.json](./test/fixtures/markdown/swagger-gfm.json)
```
gulp info
```**Build dist**
```shell
gulp
```**Build demo**
```shell
gulp demo
```**Deploy demo**
```shell
gulp deploy
```## TODOs
* [angular-swagger-ui-material](https://github.com/darosh/angular-swagger-ui-material/search?q=TODO&type=Code&utf8=%E2%9C%93)
* [ ] Alternative layout in "documentation" style
* [ ] Operation permalinks
* [ ] Permalinks in description? ([example](http://darosh.github.io/angular-swagger-ui-material/#?url=https:%2F%2Fapi.apis.guru%2Fspecs%2Fimport.io%2F1.0%2Fswagger.json))
* [ ] Scripts tab with examples
* [ ] Cross-browser compatibility (unknown)
* [ ] Optimization (one-time binding, …)
* [ ] Hot keys (search, submit)
* [ ] XML example support
* [ ] Warning about http (non SSL) submit? (dialog + do not show me again?)
* [ ] Swagger 1.2
* [ ] GFM task lists vs SCE
* [ ] E2E tests
* [ ] No more compatible with [angular-swagger-ui](https://github.com/Orange-OpenSource/angular-swagger-ui)## Usage
### [LoopBack](http://loopback.io/) with [loopback-component-explorer](https://github.com/strongloop/loopback-component-explorer)
**package.json**
angular-swagger-ui-material is not published in npm, so we use [napa](https://www.npmjs.com/package/napa) instead
```json
{
"dependencies": {
"loopback-component-explorer": "^2.4.0",
"napa": "^2.3.0"
},
"napa": {
"angular-swagger-ui-material": "darosh/angular-swagger-ui-material"
},
"napa-config": {
"cache": false,
"cache-path": "./.napa-cache",
"log-level": "error"
},
"scripts": {
"install": "napa"
}
}
```**server/server.json**
```javascript
var loopback = require('loopback');
var explorer = require('loopback-component-explorer');var app = module.exports = loopback();
explorer(app, {
basePath: '/api',
uiDirs: [
require('angular-swagger-ui-material').dist
]
});
```