0.0.9 • Published 5 years ago

json-schema-poet v0.0.9

Weekly downloads
650
License
MIT
Repository
-
Last release
5 years ago

json-schema-poet

JSON Schema is a useful way to define input and output schemas.

Typescript is a useful way to verify the types of JavaScript objects.

json-schema-strictly-poet Write JSON Schema like you'd write poetry.

Example

import * as jsp from "json-schema-poet";

test("integer yields number schema", () => {
  expect(jsp.integer()).toEqual({ type: "integer" });
});

API

Here are all of the functions in the API.

  • nul()
  • cnst()
  • integer()
  • number()
  • string()
  • stringEnum()
  • numberEnum()
  • integerEnum()
  • regex()
  • boolean()
  • array()
  • tuple()
  • allOf()
  • anyOf()
  • oneOf()
  • not()
  • dictionary()
  • type()
  • object()
  • extend()

Todo

There is plenty of stuff that is not implemented yet. I'd really appreciate your help!

0.0.9

5 years ago

0.0.8

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago