Skip to content

simon-p-r/hapi-json-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published