@kenyip/joi
Advanced tools
+1
-1
| { | ||
| "name": "@kenyip/joi", | ||
| "description": "Object schema validation", | ||
| "version": "0.0.4", | ||
| "version": "0.0.5", | ||
| "homepage": "https://github.com/hapijs/joi", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/hapijs/joi", |
+26
-26
@@ -23,4 +23,4 @@ # @kenyip/joi | ||
| const object = Joi.object({ | ||
| hello: Joi.string(), | ||
| world: Joi.string() | ||
| hello: Joi.string(), | ||
| world: Joi.string() | ||
| }); | ||
@@ -30,13 +30,13 @@ | ||
| // { | ||
| // "type": "object", | ||
| // "properties": { | ||
| // "hello": { | ||
| // "type": "string" | ||
| // }, | ||
| // "world": { | ||
| // "type": "string" | ||
| // } | ||
| // } | ||
| // } | ||
| { | ||
| "type": "object", | ||
| "properties": { | ||
| "hello": { | ||
| "type": "string" | ||
| }, | ||
| "world": { | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
@@ -49,9 +49,9 @@ | ||
| const objectA = Joi.object({ | ||
| hello: Joi.string(), | ||
| world: Joi.string(), | ||
| hello: Joi.string(), | ||
| world: Joi.string(), | ||
| }); | ||
| const objectB = objectA | ||
| .keys({ foo: Joi.string() }) | ||
| .remove(["hello"]); | ||
| .keys({ foo: Joi.string() }) | ||
| .remove(["hello"]); | ||
@@ -61,12 +61,12 @@ console.log(JSON.stringify(objectB.toSwagger(), null, 4)); | ||
| // { | ||
| // "type": "object", | ||
| // "properties": { | ||
| // "world": { | ||
| // "type": "string" | ||
| // }, | ||
| // "foo": { | ||
| // "type": "string" | ||
| // } | ||
| // } | ||
| // "type": "object", | ||
| // "properties": { | ||
| // "world": { | ||
| // "type": "string" | ||
| // }, | ||
| // "foo": { | ||
| // "type": "string" | ||
| // } | ||
| // } | ||
| // } | ||
| ``` |
186392
-0.04%