RepreZen API Studio supports API design-first and API CodeFlow with a highly-evolved, extensible code generation engine. Starting with the 1.6.13 release of API Studio, these capabilities are repackaged as GenFlow. GenFlow is RepreZen's open framework for API code generation, soon to be announced as an open source project on GitHub.
GenFlow is a comprehensive API code generation framework that supports a wide variety of code generation scenarios. Here are some of its essential features:
- Generates API client libraries, services, documentation and other essential components, using pre-built or custom generators.
What code generators are included in RepreZen API Studio?
- Works with OpenAPI v2 (Swagger), OpenAPI v3, and RAPID-ML, with an open architecture to support other API specification formats as input.
OpenAPI 2.0 Specification
OpenAPI 3.0 Specification
- Provides convenient access to Swagger Codegen and OpenAPI-Generator, and other popular open source code generators.
- Supports custom code generators written in Java, and provides a powerful, template-driven framework built on Xtend.
Custom Code Generation in RepreZen API Studio
- Integrates KaiZen OpenAPI Normalizer as a preprocessor or standalone code generator. KaiZen Normalizer consolidates multi-file OpenAPI projects to a single document by resolving references, applying defaults, and expanding cascading properties to ensure reliable processing by downstream code generators and API documentation formats.
KaiZen OpenAPI Normalizer
- Runs from the command line, CI/CD platforms, and RepreZen API Studio through Maven and Gradle integration, with all dependencies hosted on Maven Central.
- Easy configuration through a convenient YAML-formatted .gen file, with embedded documentation for each parameter.
- Enables multi-step chaining of code generators to create advanced API modeling and codegen solutions.
GenFlow in RepreZen API Studio
Starting in release 1.6.13, GenFlow is seamlessly integrated into RepreZen API Studio. It works the same as our previous code generation framework, with GenTemplates as reusable code generators, and GenTargets, which wire a specific API specification document as an input to a GenTemplate with configuration options.
The main differences with GenFlow are:
- The GenFlow framework, GenTemplates, and their dependencies are hosted entirely on Maven Central, so there is no need to access RepreZen's Maven repository at maven.reprezen.com.
- The GenFlow Framework and GenTemplates will be open source, available on GitHub, so you can easily inspect, copy and modify GenTemplates for your own projects.
- GenFlow GenTemplates use a different set of Maven artifact names and Java packages.
Project and GenTarget Compatibility
Because of these changes, there are some limits to forward compatibility. The following table summarizes:
(new or manually updated)
API Studio with GenFlow
Can Create and Execute
Creation and Execution Require Project Update
API Studio Pre-GenFlow
Can Create and Execute
Execution Requires Project Update
Can Create and Execute
Pre-GenFlow Projects in RepreZen API Studio
Your existing pre-GenFlow projects, created with RepreZen API Studio 1.6.12 and earlier, will run in the new API Studio release without any modification.
Likewise, new GenFlow-enabled projects that you create in API Studio 1.6.13 and later work without modification in API Studio 1.6.12 and earlier releases.
Just be aware of this important limitation:
You cannot create or execute a new GenFlow GenTarget in a pre-GenFlow project.
The New GenTarget Wizard and the New API Wizards for OpenAPI v2, v3, and RAPID-ML will offer the option to update your project to work with GenFlow. If you uncheck this option, the wizards will not allow you to create new GenTargets. You can also update your project directly, using the Update Project to GenFlow menu command in Project explorer. The following sections explain how project update works in each of these contexts.
Updating to GenFlow from the New GenTarget Wizard
In the New GenTarget Wizard, if you have selected an API model in a pre-GenFlow project, you'll see a checkbox to update the project to work with GenFlow.
If you uncheck this option, you won't be allowed to create a new GenTarget.
Updating to GenFlow from the New API Wizards
The New API Wizards for OpenAPI v2 (Swagger), OpenAPI v3, and RAPID-ML also have the option to update the containing project to support GenFlow.
Updating to GenFlow from the Project Explorer
You can update a pre-GenFlow project to work with GenFlow at any time from the Project Explorer. Just right-click on the top-level project, and select Update Project to GenFlow from the context menu.