Open Source API Design Code Generator
Apicurio Codegen is a powerful tool that automatically generates high-quality code from OpenAPI specifications. It specializes in generating JAX-RS server stubs, Quarkus-optimized applications, data models, and client libraries, helping developers quickly scaffold robust API implementations.
- OpenAPI 3.x Support - Full support for modern OpenAPI specifications
- Quarkus Native - Optimized for Quarkus applications with native compilation support
- JAX-RS Generation - Generate server stubs and client libraries
- Multiple Integration Options - Maven plugin, CLI tool, or programmatic API
- Highly Configurable - Extensive customization options for generated code
- Production Ready - Battle-tested in enterprise environments
core/- Core code generation enginemaven-plugin/- Maven plugin for build integrationmaven-plugin-tests/- Integration tests for the Maven plugincli/- Command-line interfacequarkus-extension/- Quarkus extension for seamless integration
- Java 11 or later (tested with Java 21)
- Maven 3.6+ (tested with Maven 3.9+)
# Clone the repository
git clone https://github.com/apicurio/apicurio-codegen.git
cd apicurio-codegen
# Build all modules
./mvnw clean install
# Build without running tests (faster)
./mvnw clean install -DskipTests
# Run tests only
./mvnw test
# Build specific module
./mvnw clean install -pl core
# Generate Javadocs
./mvnw javadoc:javadoc- Default Profile - Standard build with all tests
- Release Profile - Includes source jars, javadocs, and GPG signing
./mvnw clean install -Prelease
For a quick start guide and examples, see our Getting Started Guide.
Comprehensive documentation is available at: docs/
- Project Overview - Introduction and key concepts
- Getting Started - Hello World tutorial
- User Guide - Detailed feature documentation
We use MkDocs with the Material theme for our documentation.
# Install MkDocs and required plugins
pip install mkdocs mkdocs-material mkdocstrings# Navigate to docs directory
cd docs
# Preview documentation locally (auto-reload on changes)
mkdocs serve
# Visit http://127.0.0.1:8000 in your browser
# Build static documentation
mkdocs build
# Deploy to GitHub Pages (maintainers only)
mkdocs gh-deploy- All documentation files are in
docs/directory - Written in Markdown format
- Configuration in
docs/mkdocs.yml - Supports code syntax highlighting, admonitions, and more
- Fork the repository
- Create a new branch:
git checkout -b docs/your-feature - Make your changes in the
docs/directory - Preview locally with
mkdocs serve - Submit a pull request
Add to your pom.xml:
<plugin>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-codegen-maven-plugin</artifactId>
<version>1.2.6.Final</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>src/main/resources/openapi.yaml</inputSpec>
<output>target/generated-sources/apicurio</output>
</configuration>
</execution>
</executions>
</plugin># Download and run the CLI
java -jar apicurio-codegen-cli.jar generate \
--input-spec openapi.yaml \
--output ./generated-codeWe welcome contributions! Please see our Contributing Guidelines for details on:
- Code style and conventions
- Submitting pull requests
- Reporting issues
- Development setup
This project is licensed under the Apache License 2.0.
- Website: https://www.apicur.io/
- Documentation: https://apicurio.github.io/apicurio-codegen
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Eric Wittmann (@EricWittmann) - Project Lead
- Jakub Senko (@JakubSenko)
- Carles Arnal (@CarlesArnal)
Developed by Red Hat as part of the Apicurio project.