0.0.9 • Published 9 years ago

kwaai-schema v0.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

#kwaai-schema

Json schema helpers

##Description A set of helper tools to assist in working with json schema in node.

##API ###validateToSchema(document,schema)

var schema={
    $schema: "http://json-schema.org/draft-04/schema#",
    title: "test",
    description:"test",
    properties: {
        name: {type: "string", pattern: "^[a-z0-9_\-]+$"},
        description: {type: "string"},
        id:{type:"string",format:"mongoid"},
        email:{type:"string",format:"email"}
    }
}

var doc={
   name:"ab5%%c",
   description:"test"
}

var invalid=kwaaiSchema.validateToSchema(doc,schema)

###coerceToSchema(document,schema) Not implemented

###mergeSchemaLinks(document,schema) Merges any hyperschema links in a schema into the document. Replaces {attribute} with teh actual value.

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago