tsmeta
TypeScript icon, indicating that this package has built-in type declarations

0.12.7 • Public • Published

Downloads Version License

tsmeta

Contents

install

npm i tsmeta

intend

tsmeta can create schemas for either documentation of your RestAPI as well as the needed schemas for your GraphqlAPI of your typescript node application. Using simply typescript classes and a few annotations.

tsmeta.config.json

to run tsmeta a tsmeta.config.json file is required in the root of your project. the basic tsmeta.config.json has to include the base-package reference (package.json)

{
  "basePackage": "package.json",
  "scanAdditionalPackages": {},
  "showScannedFiles": false,
  "showWrittenFiles": true,
  "metaConfig": {},
  "sigmaConfig": {},
  "oasConfig": {},
  "graphQLConfig": {}
}

your package.json has to include the source property like:

{
  "main": "dist/index.js",
  "source": "src/index.ts",
}

metaConfig

the tsmetaConfig object is required in your tsmeta.config.json, however creation of the tsmeta.output.json file is not required to generate the other schemas

{
  "create": true,
  "outputPath": "schema",
  "outputFilename": "tsmeta.output.json",
  "compilerOptions": "tsconfig.json"
}

Package Sidebar

Install

npm i tsmeta

Weekly Downloads

171

Version

0.12.7

License

MIT

Unpacked Size

611 kB

Total Files

306

Last publish

Collaborators

  • mafh