@spec-validator/utils 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
A tool to validate TypeScript snippets within Markdown files.
yarn add --dev @spec-validator/open-api-endpoint
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago