Experimenting with Spot and OpenAPI client generators
The workflow is as follows:
- Implement a new endpoint in
./server.js
- Run
npm run gen:spot-contract
to generate/update a Spot contract containing endpoints and request/response definitions (stored in./api.ts
). - Run
npm run gen:openapi
to generate an OpenAPI schema (api.yml
) from the Spot contract. - Run
npm run gen:client
to generate a TypeScript client library stored in./client/