Using REST API client plugin

The following topics provide examples of how to generate REST API code using the client plugin tasks.

How to generate code using URL-based source with default configuration

Run the code generation task:

gradle restDownload

How to generate code using URL-based source with customized configuration

  1. Generate a configuration file
    gradle restConfig
  2. Update the configuration codegen.config.yaml file
  3. Run the code generation task
    gradle restDownload

How to generate code using file-based source with default configuration

Run the code generation task:

gradle restCodegen

How to generate code using file-based source with customized configuration

  1. Generate a configuration file
    gradle restConfig
  2. Update the configuration codegen.config.yaml file
  3. Run the code generation task
    gradle restCodegen