0.0.8 • Published 2 years ago

sla-ts v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

SLA-TS

TypeScript library to help building SLA4API compliant API contracts. Provides a model compliant with the schema, and a internal DSL using the builder pattern with capabilities to generate the JSON and YAML version of the SLA contract.

Node.js CI

Conforms to the specification at SLA4API 1.0.0 Draft

Contains

Under src/ you will find:

  • model/ The schema for a valid SLA Document (plans & agreements).
  • dsl/ A utility interanl DSL to build SLA documents.
  • validator/ A validator for SLA documents.
  • cli/ A command line interface to generate documentation an validation for an SLA document.

Install

Locally in your project:

npm i sla-ts --save

Globally as a CLI tool: (planned / not yet)

npm i -g sla-ts

Test

npm test

How to use the CLI

Locally:

npm run cli
npm run cli validate samples/sla1-invalid.json
npm run cli validate samples/sla1.yaml
npm run cli document samples/sla1.yaml samples/sla1.html

As a global tool: (planned / not yet)

sla-ts
sla-ts validate samples/sla1-invalid.json
sla-ts validate samples/sla1.yaml
sla-ts document samples/sla1.yaml samples/sla1.html

Versions & Changelog

See changelog.

References

License

Licensed under the MIT License.

Credits

Contact: Pedro J. Molina | github: pjmolina | twitter: pmolinam

(c) 2022. Pedro J. Molina at Metadev S.L. https://metadev.pro & contributors.

0.0.3

2 years ago

0.0.2

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.1

2 years ago