StAppsCore Converter - converter of TypeScript models into JSON schema files

Use @openstapps/core-tools!
Last updated 2 years ago by krlwlfrt .
GPL-3.0-only · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @openstapps/core-converter 
SYNC missed versions from official npm registry.


StAppsCore Converter - converter of TypeScript models into JSON schema files

What is StAppsCore?

The StAppsCore (SC) is a generalized model of data.

SC is based on the idea of schema.org. The SC structures data by describing objects as so called SC-types like: Event, Place, Date, Person, ...

Data sources of the same type of data are assigned to the same SC-type.

What is StAppsCore Converter?

The StAppsCore Converter is a tool for converting SC-types (TypeScript) into JSON schema files.

JSON schema files are needed for run-time validation of SC-type objects, as this is a tedious task to do using SC-types defined in TypeScript (not possible without additional coding). That said, StAppsCore Converter practically prepares SC-types to be used for object validation (determining wether an JavaScript/JSON object is a valid object of the corresponding SC-type) using StAppsCore Validator.

How to use StAppsCore Converter?

Installation of the npm package (using npm install) makes the tool available as an executable with the name stapps-convert.

The command stapps-convert can then be called using 3 required arguments:

node_modules/.bin/stapps-convert <path> <outdir> <indirs...>


  • <path> is path to the project (where used *.ts files are, e.g. 'src/core',
  • <outdir> is directory (relative path) to save output files to, e.g. lib/schema,
  • <indirs...> are directories (relative paths) to get source files from, e.g. src/core/things src/core/protocol/.

Complete command with the example arguments is then:

node_modules/.bin/stapps-convert src/core lib/schema src/core/things src/core/protocol/

Inside of a script in package.json or if the npm package is installed globally, the tool stapps-convert can be called without its local path (node_modules/.bin):

stapps-convert <path> <outdir> <indirs...>

Current Tags

  • 0.1.0                                ...           latest (2 years ago)

2 Versions

  • 0.1.0 [deprecated]           ...           2 years ago
  • 0.0.1 [deprecated]           ...           2 years ago
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (9)
Dev Dependencies (5)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |