@makeropsinc/schema-generator
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

schema-generator

Generate schemas from TS source

Example

export interface Test {
  /**
   * This is a test
   * @pattern foo
   * @default "foo"
   * @description Foo stuff
   * @errorMessage This is an error message
   */
  foo: string
}
{
  "$ref": "#/definitions/Test",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "Test": {
      "additionalProperties": false,
      "properties": {
        "foo": {
          "default": "foo",
          "description": "Foo stuff",
          "errorMessage": "This is an error message",
          "pattern": "foo",
          "type": "string"
        }
      },
      "required": [
        "foo"
      ],
      "type": "object"
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @makeropsinc/schema-generator

Weekly Downloads

0

Version

1.0.1

License

UNLICENSED

Unpacked Size

593 kB

Total Files

601

Last publish

Collaborators

  • x-devops-bot