Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (27 sloc) 2.23 KB

Build Status codecov Download


Template to Generate Micronaut-based server side java application from a swagger/openapi specification

How to Use

First, Download the jars

# download swagger cli
curl -O

# download micronaut generator
curl -O

Next, use both jars to generate a micronaut project based on your swagger.yaml

java -cp swagger-codegen-micronaut-generator-1.0.1.jar:swagger-codegen-cli-3.0.10.jar \
  io.swagger.codegen.v3.cli.SwaggerCodegen \
  generate \
  -l \
  -i /path/to/your/swagger.yaml \
  -o /where/you/want/the/project/to/be/generated

This will read your swagger/openapi configuration /path/to/your/swagger.yaml and generate the project directory in /where/you/want/the/project/to/be/generated.

The project it will generate will contain dtos for your API, config files, and the actual Api intefaces themselves. By default, these Api interfaces throw UnsupportedOperationException.

The next step would be to implement those Api interfaces with your @Controller classes, and start implementing those methods with actual logic.


You can’t perform that action at this time.