1.0.6 • Published 4 years ago
@versed/contract v1.0.6
Contract
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>