Apicurio Codegen subproject logo
Generate JAX-RS Java code
from your OpenAPI specifications
Get Started
Clone or fork on GitHub

What is Apicurio Codegen?

Apicurio Codegen is a code generation tool that transforms your OpenAPI specifications into production-ready Java code. It generates JAX-RS server stubs, Quarkus applications, and data model classes, helping you quickly implement APIs that match your OpenAPI contracts.

Apicurio Codegen Key Features

JAX-RS Server Generation
Generate complete JAX-RS resource interfaces and implementations from your OpenAPI specification, ready to be deployed in any JAX-RS compatible runtime.
Quarkus Integration
First-class support for Quarkus applications with optimized code generation that takes advantage of Quarkus features like native compilation and dependency injection.
Data Model Classes
Automatically generate Java POJOs from your OpenAPI schema definitions, complete with Jackson annotations for JSON serialization and validation annotations.
Maven Plugin
Integrate code generation seamlessly into your build process with the Apicurio Codegen Maven plugin. Generate code automatically during your build without manual steps.
OpenAPI Extensions
Customize generated code using OpenAPI specification extensions. Add custom annotations, configure date/time formatting, set context roots, and more.
Build Integration
Perfect for CI/CD pipelines and automated workflows. Integrates naturally with Maven-based build processes to ensure your implementation always matches your API contract.

Why Use Apicurio Codegen?

In a contract-first API development approach, your OpenAPI specification is the source of truth for your API. Apicurio Codegen ensures that your implementation stays synchronized with your API contract by generating the boilerplate code automatically.

This approach provides several benefits:

  • Consistency: Generated code always matches your OpenAPI specification
  • Productivity: Eliminate manual coding of repetitive boilerplate
  • Type Safety: Catch API contract violations at compile time
  • Maintainability: Update your API by modifying the spec and regenerating code