@versed/contract
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Contract

Versed pipeline status coverage report

A versed contract is an openapi definition meeting certain requirements.

This library will compile the contract and generate Typescript type and service definition. More programming language might be supported in the future.

Open API Requirements

Using openapi is just for convenient as we can generate api documentation for it.

  1. path must be at root path (/GetUserProfile is OK but /user/profile is not ok)
  2. must be either GET or POST
  3. no query params
  4. body is application/json
  5. response is application/json

Cli

versed contract compile <src file> <out dir>

Readme

Keywords

none

Package Sidebar

Install

npm i @versed/contract

Weekly Downloads

0

Version

1.0.6

License

ISC

Unpacked Size

114 kB

Total Files

133

Last publish

Collaborators

  • briansostudio