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

Pageable plugin for BB Convert RAML

Stats

StarsIssuesVersionUpdatedCreatedSize
@bb-cli/bb-convert-plugin-pageable
2.0.14 years ago4 years agoMinified + gzip package size for @bb-cli/bb-convert-plugin-pageable in KB

Readme

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.