@spec-validator/cli v0.13.0
spec-validator
The main rationale of the package is to ensure that a developer defines structure of service's data once and in one place and all other representations of that structure are deduced dynamically without any code generation.
A developer can create a type safe REST API with:
- run-time payload validation
- build-time type checking
- dynamic API docs' generation (e.g. OpenAPI)
- type inference and autocompletion in the editor
and do so entirely with TypeScript in one place without wrtitng even a single line of JSON schemas or YAML based specs (though those are generated at runtime later on).
Please got through the ideas' document before diving into the API.
Packages
Core validation logic - the necessary bits to glue payload specifications with TypeScript datastructures.
yarn add @spec-validator/validator
@spec-validator/rest-api-server
REST API primitives such as a binding to node's http server and type-safe specification of HTTP protocol.
yarn add @spec-validator/rest-api-server
@spec-validator/open-api-endpoint
Endpoint decorators to generate Open API based documentation for the routes defined using the
rest-api-server
.yarn add @spec-validator/open-api-endpoint
@spec-validator/aws-api-gw-adapter
AWS API gateway adapter. ATM works only with a proxy route. But in the future will be able to bootstrap the whole set of explicit routes in API gateway.
yarn add @spec-validator/aws-api-gw-adapter
A tool to validate TypeScript snippets within Markdown files.
yarn add --dev @spec-validator/open-api-endpoint
A set of command-line tools to simplify working with QA of TypeScript based projects.
yarn add --dev @spec-validator/qa