Skip to content

A JetBrains IntelliJ plugin that automatically generates Postman collections from Spring Java classes using @RequestMapping annotations.

License

Notifications You must be signed in to change notification settings

FerdiStro/spring-postman-request-generator

spring-postman-request-generator

ICON


Build Version Downloads

A JetBrains IntelliJ plugin that automatically generates Postman collections from Spring Java classes using @RequestMapping annotations.

Plugin Badge


✨ Features

  • Generates Postman collection files (.json) from Spring controller methods
  • Supports Spring annotation @RequestMapping
  • One-click generation via an icon next to your annotated methods
  • Output is written to generated-request.json in your project root

🚀 How to Use

  1. Open a Spring controller class in IntelliJ.
  2. Click the icon next to a method annotated with @RequestMapping.
  3. A Postman collection will be generated automatically as generated-request.json in your project’s base directory.

RequestMappingInterface.png


📦 Example Output

{
  "info": {
    "name": "Generated Requests",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "algos.go",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{PROTOCOL}}{{SERVER}}/{{APP_CONTEXT}}/services/v2/algo/algos.go",
          "host": [
            "{{PROTOCOL}}{{SERVER}}"
          ],
          "path": [
            "{{APP_CONTEXT}}",
            "services",
            "v2",
            "algo",
            "algos.go"
          ],
          "query": []
        }
      },
      "response": []
    }
  ]
}

✅ This is a valid Postman collection — just import it into Postman and start testing your endpoints.

postman collection


⚠️ Notes

  • Only methods annotated with Spring Web annotation @RequestMapping is currently supported.
  • The plugin is designed for use with Spring projects inside IntelliJ IDEA.
  • Plugin is in development, so maybe it will not work as expected

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.


📝 Todo

  • Support all Spring annotations (e.g., @GetMapping, @PostMapping, etc.)
  • Set up CI/CD pipeline
  • Add configuration window for plugin settings

Plugin Description

IMPORTANT: Currently under development—functionality still limited and partially buggy. Feel free to contribute and improve the plugin.

Plugin Badge

Generate Postman collections directly from your Spring controllers without leaving IntelliJ IDEA.
This plugin adds a convenient gutter icon next to methods annotated with @RequestMapping.
With a single click, it creates a ready-to-use Postman collection (generated-request.json) in your project root.

Also, when a Postman API token is provided, the latest collection is automatically published to Postman via the Postman API.

Features:

  • One‑click Postman collection generation from Spring @RequestMapping methods
  • Connection to Postman via Postman-API
  • Toolwindow with Settings for personal generation

Perfect for developers who want to quickly test their Spring APIs in Postman without manually creating requests.

About

A JetBrains IntelliJ plugin that automatically generates Postman collections from Spring Java classes using @RequestMapping annotations.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •