Skip to content

RedTecLab/tsmeta

 
 

Repository files navigation

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"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 98.5%
  • JavaScript 1.5%