Skip to content

Spring Web & OpenApi rest client

Ilya Muromtsev edited this page Jun 16, 2026 · 3 revisions

Spring Web & OpenAPI REST client

Turn Spring Web–annotated methods into a runnable REST client — generate OpenAPI from your annotations and execute requests through Swagger UI inside the IDE. No custom DSL: you reuse Spring Web, OpenAPI, and Swagger UI.

How it works

  1. Define an HTTP method with a standard Spring Web annotation (the body can stay empty):
    @GetMapping("https://api.openweathermap.org/data/2.5/weather")
    public String getWeather() {
        // Implementation is not important
    }
  2. The plugin generates an OpenAPI definition from your annotated methods.
  3. Click the Run gutter icon next to a method with an absolute URL to launch Swagger UI in the IDE.
  4. Fill in parameters, execute, inspect responses/headers, and copy the generated cURL.

You can also edit the generated OpenAPI files directly, with completion and validation. A custom request handler bypasses CORS in the embedded browser.

Generate OpenAPI doc from Spring Web controllers/methods

rest-client-open-api-localhost.v2.mp4

Use OpenAPI & Swagger as a REST client

rest-client-open-api-any.mp4

Prefer plain request files?

If you'd rather write requests directly, use .http/.rest files — see Rest Client RFC 7230.

Learn more

See also: Code Generations · Features · Usage

Clone this wiki locally