Generate Java requests and tests from curls.
- Download the latest release.
- Add your curls in resources/curls.txt.
- Run
gradle run
.
Java 9+
Curl to Java works by generating taking a curl request, and generating Java code with tests out of it.
Specifically, it performs the following steps.
- Transform curl request into generated restTemplate request.
- Run generated Java code and get json response.
- Generate more code, specifically tests from json response.
- Run all the code together and see if the tests pass.
- Transforms a curl into a Java http request.
- Generates tests to make sure the response is the same each time.
- Can customise generated code with templates.