daraja-openapi

Contributing

Issues and pull requests are welcome, especially Daraja quirks the spec doesn't cover yet.

Set up

git clone https://github.com/ByteGigs-Labs/daraja-openapi
cd daraja-openapi
npm install
npm run lint:spec   # Spectral
npm run generate    # regenerate TypeScript types from the spec
npm run typecheck
npm run build
npm test            # SDK and mock tests, including spec conformance

Change the spec

  1. Edit spec/daraja.openapi.yaml.
  2. Run npm run generate.
  3. Run npm run lint:spec && npm test.
  4. Open a pull request.

To run the contract tests against the real sandbox, set the DARAJA_* variables and run npm run test:contract.

Build these docs

npm run docs    # builds site/

The guides live in docs/content/. The API reference is generated from the spec.

Licence

Apache 2.0. Contributions are accepted under the same licence.

View the source of this page

Built by ByteGigs Labs. Apache 2.0. M-PESA, Daraja and Safaricom are trademarks of Safaricom PLC; this project is independent and not endorsed by Safaricom.