Powerful IDE for API-first design, documentation and development.

Start my Free Trial

About GenTargets

In RepreZen API Studio, a GenTarget is a code generator configuration that takes an API specification document as an input, and produces a specific kind of output.  Concretely, a GenTarget is a special kind of folder within your project, containing a set of configuration files. 


You can see your project's GenTargets, edit the configurations, and see the generated output files in the Project Explorer view. Project Explorer is minimized by default, but you can view it by clicking this button in the left margin: 



This will show the Project Explorer in a floating window. You can restore the window to its docked position by clicking either of the two restore buttons:


And from inside the Project Explorer, you can see the GenTargets folder hierarchy in your project:


Inside the GenTarget Folder

If you expand one of the GenTarget folders, you'll see something like this: 

Initially, the GenTarget will have only configuration files: 

  • The .gen file is a YAML-formatted configuration file that specifies input source files, the GenTemplate (i.e. a specific code generation module) to use, the output location, and configurable options for the GenTemplate. 
  • The pom.xml file is a maven build configuration for your GenTarget. 
  • The build.gradle file is a Gradle build configuration for the GenTemplate.

After running code generation, you'll see some additional files:

  • The .trace.json file may contain metadata describing the transformation from the source API spec to the target code. 
  • The generated subfolder is the default location for generated code.  If you have specified a different relative output location in the .gen file, you might see a different folder here, or in another location altogether. 


Video: Generating Code in RepreZen API Studio

This video gives you a more comprehensive tour, showing how code generation works in RepreZen API Studio: