Generating Code
API Hub for Design lets you generate server and client code based on API definitions to help you get your API servers and clients up and running quickly. You can also configure integrations to automatically push the generated code to a repository on GitHub, GitLab, Bitbucket, or Azure DevOps.
Code generation is supported for both OpenAPI 2.0 and 3.0.
Learn more
Supported Languages and Frameworks (on this page)
Swagger Codegen Versions (on this page)
Custom Codegen Templates (API Hub for Design On-Premise only)
Supported languages and frameworks
The following table lists the available code generators for OpenAPI 2.0 and 3.0 definitions. Note that API editors can choose which generators will actually appear in the Export menu. API Hub for Design On-Premise also supports custom code generators.
Notes:
OpenAPI 3.0 generators are currently limited, but new generators are added regularly.
Each generator has various options, such as the dependencies to use. These options can be configured by the API editors in the codegen options for individual APIs, and will apply to all users who generate code for an API. If you want to change some options but do not have Edit permissions for an API, you can fork this API and configure the codegen options for yourself.
Name | OpenAPI 2.0 | OpenAPI 3.0 | Comments |
---|---|---|---|
Servers | |||
C# / ASP.NET Core ( | ✓ | ✓ | |
C# / NancyFx ( | ✓ | ||
C++ / Pistache ( | ✓ | API Hub for Design On-Premise note: This generator was added in v. 1.26. | |
C++ / Restbed ( | ✓ | API Hub for Design On-Premise note: This generator was added in v. 1.26. | |
Erlang ( | ✓ | ||
Go ( | ✓ | ✓ | API Hub for Design On-Premise note: Go server generator for OAS3 was added in v. 1.23. |
Haskell / Servant ( | ✓ | ||
Java / Apache CXF ( | ✓ | ✓ | API Hub for Design On-Premise note: jaxrs-cxf generator for OAS3 was added in v. 1.27. |
Java / Apache CXF and CDI ( | ✓ | ||
Java / JAX-RS using Jersey | ✓ | ✓ | |
Java / JAX-RS ( | ✓ | ✓ | Uses standard JAX-RS APIs, does not depend on specific JAX-RS implementations. API Hub for Design On-Premise note: OAS3 generator was added in v. 1.27. |
Java / MSF4J ( | ✓ | ||
Java / PKMST ( | ✓ | Uses ProKarma microservices toolkit. API Hub for Design On-Premise note: This generator was added in v. 1.27. | |
Java / RESTEasy ( | ✓ | ✓ | |
Java / RESTEasy with JBoss EAP ( | ✓ | ||
Java / Spring ( | ✓ | ✓ | Can be Spring Boot with Springfox, Spring MVC with Springfox, or Spring Cloud Feign, depending on the codegen options. |
Java / Swagger Inflector ( | ✓ | ✓ | |
Java / Undertow ( | ✓ | ||
Node.js ( | ✓ | ✓ | API Hub for Design On-Premise note: Node.js generator for OAS3 was added in v. 1.23. |
PHP / Lumen ( | ✓ | ||
PHP / Silex ( | ✓ | ||
PHP / Slim ( | ✓ | ||
PHP / Symfony ( | ✓ | ||
Python / Flask ( | ✓ | ✓ | |
Ruby on Rails 5 ( | ✓ | ||
Ruby / Sinatra ( | ✓ | ||
Rust ( | ✓ | API Hub for Design On-Premise note: This generator was added in v. 1.25.0. | |
Scala / Akka HTTP ( | ✓ | ||
Scala / Scalatra ( | ✓ | ||
Clients | |||
ActionScript ( | ✓ | ||
Android / Java ( | ✓ | ||
Apex ( | ✓ | ||
C++ using C++ REST SDK ( | ✓ | ||
C++ / Qt 5 ( | ✓ | ||
C++ / Tizen ( | ✓ | ||
C# / .NET 3.5 or later ( | ✓ | ✓ | The target .NET framework version can be changed in the codegen options. |
C# / .NET 2.0 using Mono compiler ( | ✓ | ||
Clojure ( | ✓ | ||
Dart ( | ✓ | ||
Go ( | ✓ | ✓ | API Hub for Design On-Premise note: Go client generator for OAS3 was added in v. 1.26. |
Groovy ( | ✓ | ||
Java ( | ✓ | ✓ | Uses one of the following HTTP client libraries: Jersey (default), Google API Client Library for Java, OkHttp, OpenFeign, RESTEasy, Spring RestTemplate, Vert.x. |
Java / JAX-RS Client API with Apache CXF ( | ✓ | ✓ | |
JavaScript ( | ✓ | ||
JavaScript / AngularJS ( | ✓ | AngularJS (Angular 1.x) with Google Closure Compiler annotations. | |
JMeter ( | ✓ | ||
Kotlin ( | ✓ | ✓ | |
Objective-C ( | ✓ | ||
Perl ( | ✓ | ||
PHP ( | ✓ | ✓ | |
Python ( | ✓ | ✓ | API Hub for Design On-Premise note: Python client generator for OAS3 was added in v. 1.23. |
Ruby ( | ✓ | ||
Scala ( | ✓ | ✓ | |
Scala / Akka ( | ✓ | ||
Swift 2.x ( | ✓ | ||
Swift 3.x ( | ✓ | ✓ | |
Swift 4.x ( | ✓ | ✓ | |
Swift 5.x ( | ✓ | ✓ | API Hub for Design On-Premise note: The Swift 5.x generator for OAS2 was added in v. 1.23, and the OAS3 generator was added in v. 1.24. |
TypeScript / Angular ( | ✓ | ✓ | Angular version is 4.3.0 by default, but can be changed in the codegen options. |
TypeScript / AngularJS ( | ✓ | Angular 1.x. | |
TypeScript / Fetch ( | ✓ | ✓ | API Hub for Design On-Premise note: TypeScript / Fetch generator for OAS3 was added in v. 1.26. |
TypeScript / Inversify ( | ✓ | ||
TypeScript / Node.js ( | ✓ | ||
Documentation | |||
| ✓ | Confluence wiki markup. | |
| ✓ | ✓ | Multiple HTML pages with left-side navigation. |
| ✓ | ✓ | A single print-friendly HTML page. |
| ✓ | ✓ | A single HTML page with left-side navigation and tabbed code examples. |
Swagger Codegen versions
Code generation is powered by the open-source Swagger Codegen project. The following table lists the Codegen versions used. You can also find the currently used Codegen version in the .swagger-codegen\VERSION
file in the generated code.
API Hub for Design version | Codegen version for... | |
---|---|---|
OpenAPI 2.0 | OpenAPI 3.0 | |
API Hub for Design SaaS | 2.4.26 | 3.0.33 |
API Hub for Design On-Premise 2.1.0 | 2.4.27 | 3.0.34 |
API Hub for Design On-Premise 2.0.x | 2.4.25 | 3.0.31 |
API Hub for Design On-Premise 1.29.x | 2.4.21 | 3.0.27 |
API Hub for Design On-Premise 1.27.0—1.28.0 | 2.4.19 | 3.0.25 |
API Hub for Design On-Premise 1.26.0 | 2.4.17 | 3.0.23 |
API Hub for Design On-Premise 1.24.0—1.25.1 | 2.4.13 | 3.0.19 |
API Hub for Design On-Premise 1.23.x | 2.4.10 | 3.0.14 |
API Hub for Design On-Premise 1.22.0 | 2.4.8 | 3.0.11 |
API Hub for Design On-Premise 1.21.0 | 2.4.7 | 3.0.10 |
API Hub for Design On-Premise 1.20.x | 2.4.5 | 3.0.8 |
API Hub for Design On-Premise 1.19.3 | 2.4.2 | 3.0.5 |
API Hub for Design On-Premise 1.19.2 | 2.4.0 | 3.0.3 |
API Hub for Design On-Premise 1.18.8—1.19.1 | 2.3.1 | 3.0.2 |
API Hub for Design On-Premise 1.18.7 and earlier | 2.3.1 | – |