npm.io
2.0.1 • Published 9 years ago

@bb-cli/bb-convert-plugin-pageable

Licence
—
Version
2.0.1
Deps
0
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

BB-Convert Pageable plugin middleware

This plugin will make any HTTP GET service method from RAML specification which has from and size query parameters to respect them. So those service methods will return not full data, but subset of it.

This plugin will only by applied in mock template.

Install alongside bb-convert (prefer global)

npm i -g @bb-cli/bb-convert-plugin-pageable

Usage

bb-convert raml --transform-plugins @bb-cli/bb-convert-plugin-pageable --template mock-ng
# OR
bb-convert raml --transform-plugins pageable --template mock-ng

Configure in .bbconfig

Pageable plugin can be configured in .bbconfig file:

{
  "default": {
    "convert": {
      "raml": {
        "transform-plugins": "pageable"
      }
    }
  }
}

With this configuration in place, you can simply run

bb-convert raml --template mock-ng

Keywords