Postman Exporter for Spring
This project is a simple Java library that can export all of your Spring endpoints into a Postman Collection json, which you can import on Postman. This library is fairly new, so feedback is greatly appreciated.
Example:
PostmanExporter exporter = new PostmanExporter();
String json = exporter.export(PostmanExportOptions.builder()
.collectionName("My Collection")
.packageFullName("com.example.package")
.baseUrl("{{url}}")
.variable("url", "localhost:8080")
.build());
To use this library on your project:
<dependency>
<groupId>io.github.sampaiodiasgroupId>
<artifactId>postman-exporterartifactId>
<version>0.3.0version>
dependency>
Features
- Supports all Mapping annotations: @RequestMapping, @GetMapping, @PostMapping, @PutMapping, @DeleteMapping, @PatchMapping.
- Generates Postman requests configured with request methods (GET, POST, etc.), Params and Body.
- Groups requests into folders (one folder per class/Controller).
- Supports Postman variables (such as "{{variable-name}}").
- Ignores classes and methods annotated with @PostmanIgnore during exportation.
- Renames requests and folders easily with the @PostmanName annotation.