This is a Kong middleware to transform requests / responses, using pre-configured templates.
The plugin folder should contain at least a schema.lua
and a handler.lua
, alongside with a spec
folder and a .rockspec
file specifying the current version of the package.
We use lua-resty-template to write templates. It's also very important that you don't leave any \t
in the files.
The .rockspec
file should follow LuaRocks' conventions
We're using busted to run our tests. Every test file should live in a spec
folder and end with _spec.lua
.
make test
or busted spec/
in the plugin folder should do the job.
Remember to run it as super user if your current environment needs it.
If you're using our Makefile, just run make coverage
.
With Busted, a -c
flag will do the job.
It will generate a luacov.stats.out
that you can use to generate coverage reports.
You can run luacov
and it will generate a luacov.report.out
containing a comprehensive coverage report.
make lint
or luacheck -q .
in the plugin folder should run the linter.
made with ❤️ by Stone Payments