0.0.9 • Published 10 years ago

kwaai-schema v0.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
10 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

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago