hapi-json-schema

0.7.3 • Public • Published

hapi-json-schema

Greenkeeper badge build status Current Version dependency Status devDependency Status Coveralls

Hapi plugin for json-schema-models

options object must contain the following properties

  • indexes - boolean to confirm whether indexes should be built or not
  • mongo
    • name - mongodb name
    • url - mongodb url string (host and port)
    • options - mongodb connection options
    • collections - array of objects with following properties
      • name - string name of collection
      • indexes - array of indexes to create
      • options - valid options object for mongodb driver createCollection method
  • schemata - directory containing schemas
  • formats - path to formats file

Plugin exposes 2 methods

addSchemas via server.dataStore.schema.addSchemas
addFormats via server.dataStore.schema.addFormats

These methods can be used by other plugins to dynamically load more internal schema / models

Todo
  • Improve interface to z-schema
  • Manage plugin dependencies better

/hapi-json-schema/

    Package Sidebar

    Install

    npm i hapi-json-schema

    Weekly Downloads

    1

    Version

    0.7.3

    License

    BSD-3-Clause

    Last publish

    Collaborators

    • simon-p-r