# @shotero/gen-schema

> JSON Schema generator for postgresql database

Latest version **0.0.1** (published 2022-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @shotero/gen-schema
pnpm add @shotero/gen-schema
yarn add @shotero/gen-schema
bun add @shotero/gen-schema
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-08-21 |
| First published | 2022-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >= 18 |
| Dependencies | 2 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | shotero |
| Maintainers | lemonchiffon |
| Keywords | postgresql, objectionjs, jsonschema, database |

## Links

- npm: https://www.npmjs.com/package/@shotero/gen-schema
- Repository: https://github.com/shotero/gen-schema
- Issues: https://github.com/shotero/gen-schema
- npm.io page: https://npm.io/package/@shotero/gen-schema

## Dependencies (2)

- [cosmiconfig](https://npm.io/package/cosmiconfig.md) ^7.0.1
- [pg-structure](https://npm.io/package/pg-structure.md) ^7.13.0

## Alternatives

- [@libsql/sqlite3](https://npm.io/package/@libsql/sqlite3.md) — 39.8K weekly downloads
- [@fortemi/core](https://npm.io/package/@fortemi/core.md) — 461 weekly downloads
- [cdb-converter](https://npm.io/package/cdb-converter.md) — 341 weekly downloads
- [@uplo/adapter-prisma](https://npm.io/package/@uplo/adapter-prisma.md) — 75 weekly downloads
- [typeorm-aios](https://npm.io/package/typeorm-aios.md) — 30 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2022-08-21

## README

# Gen Schema

Generate JSON Schema definitions from a PostgreSQL database

## Configuration

`.genschemarc.js`

```
module.exports = {
  baseUrl: 'https://genschema.com',
  schemaVersion: 'http://json-schema.org/draft-07/schema#',
  db: {
    database: 'db',
    user: 'system'
  },
  schemas: [
    {
      name: 'public',
      renames: {},
      ignores: ['ignore', 'these', 'tables']
    }
  ]
};
```

## Usage

```js
import { getSchemas } from '@shotero/gen-schema';

console.dir(await getSchemas());
```

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