npm.io
0.0.1 • Published 4 years ago

@shotero/gen-schema

Licence
MIT
Version
0.0.1
Deps
2
Size
9 kB
Vulns
0
Weekly
0
Stars
2

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

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

console.dir(await getSchemas());

Keywords