Skip to content

darosh/angular-swagger-ui-material

Repository files navigation

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

  • Material Design
  • Responsible layout
  • Configurable angular-material theme colors
  • Highlight deprecated methods
  • Render GFM descriptions
  • Download de-referenced standalone JSON or YAML
  • YAML Swagger format support
  • Standard HTTP methods, status codes and headers reference thanks to know-your-http-well
  • Grouped and ungrouped views
  • Open response body in new window
  • securityDefinitions support
  • Proxy support
  • 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

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published