# @makeropsinc/schema-generator

> Generate JSON schemas from TS

Latest version **1.0.1** (published 2022-02-23) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install @makeropsinc/schema-generator
pnpm add @makeropsinc/schema-generator
yarn add @makeropsinc/schema-generator
bun add @makeropsinc/schema-generator
```

Provides the command `ts-json-schema-generator`.

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-02-23 |
| First published | 2022-02-23 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 6 |
| Unpacked size | 578.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | x-devops-bot |

## Links

- npm: https://www.npmjs.com/package/@makeropsinc/schema-generator
- Repository: https://github.com/makeropsinc/schema-generator
- Homepage: https://github.com/makeropsinc/schema-generator#readme
- Issues: https://github.com/makeropsinc/schema-generator/issues
- npm.io page: https://npm.io/package/@makeropsinc/schema-generator

## Dependencies (6)

- [glob](https://npm.io/package/glob.md) ^7.1.6
- [commander](https://npm.io/package/commander.md) ^7.2.0
- [typescript](https://npm.io/package/typescript.md) ~4.2.3
- [@types/json-schema](https://npm.io/package/@types/json-schema.md) ^7.0.7
- [json-stable-stringify](https://npm.io/package/json-stable-stringify.md) ^1.0.1
- [fast-json-stable-stringify](https://npm.io/package/fast-json-stable-stringify.md) ^2.1.0

## Recent versions

- 1.0.1 (latest) — 2022-02-23

## README

# schema-generator
Generate schemas from TS source

# Example

```typescript
export interface Test {
  /**
   * This is a test
   * @pattern foo
   * @default "foo"
   * @description Foo stuff
   * @errorMessage This is an error message
   */
  foo: string
}
```

```javascript
{
  "$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"
    }
  }
}
```

---
_Source: https://npm.io/package/@makeropsinc/schema-generator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
