angular-swagger-ui-material icon indicating copy to clipboard operation
angular-swagger-ui-material copied to clipboard

[ABANDONED] Material Design template for angular-swager-ui

angular-swagger-ui-material

Abandoned in favor of OpenAPI Specification Explorer!

work: abandoned tested on APIs.guru

Material Design ~~template~~ Swagger UI ~~for~~ based on angular-swagger-ui.

Demo

Chrome browser should work.

Main demos

Demo Server Notes
Pet Store petstore.swagger.io Markdown in API info
Hub powered by APIs.guru
Theming Demo petstore.swagger.io primary: blue-grey, accent: grey, warn: pink

Development demos

Demo Server Notes
Uber no from OpenAPI-Specification/examples, Markdown in operation info
LoopBack Drupal no Drupal database discovered + LoopBack default models,
large: 900+ operations
Minimal Swagger 2.0 no
GiHub Flavored Markdown no generated from test/fixtures/markdown/README.md
Swashbuckle no generated by Swashbuckle
Swashbuckle.OData no example from Swashbuckle.OData
YAML no example for swagger-yaml.js module

Features

  • [x] Material Design
  • [x] Responsible layout
  • [x] Configurable angular-material theme colors
  • [x] Highlight deprecated methods
  • [x] Render GFM 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
  • [x] Grouped and ungrouped views
  • [x] Open response body in new window
  • [x] securityDefinitions 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.

Reference

Development

Install

npm install -g bower gulp
bower install
npm install

Rebuild http-data.js

gulp info

Rebuild swagger-gfm.json

gulp info

Build dist

gulp

Build demo

gulp demo

Deploy demo

gulp deploy

TODOs

  • angular-swagger-ui-material
  • [ ] Alternative layout in "documentation" style
  • [ ] Operation permalinks
  • [ ] Permalinks in description? (example)
  • [ ] 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

Usage

LoopBack with loopback-component-explorer

package.json

angular-swagger-ui-material is not published in npm, so we use napa instead

{
  "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

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