Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into feat/ktor-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzsimon committed Aug 27, 2024
2 parents 83125a0 + a3dc058 commit 5e74d85
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
[![Qodana](https:/OpenFolder/kotlin-asyncapi/actions/workflows/qodana.yml/badge.svg?branch=master)](https://openfolder.github.io/kotlin-asyncapi/qodana/report)
[![Maven Central status](https://img.shields.io/maven-central/v/org.openfolder/kotlin-asyncapi-parent.svg)](https://search.maven.org/#search%7Cga%7C1%7Corg.openfolder%20kotlin-asyncapi)

> [!NOTE]
> Spring Framework 6 / Spring Boot 3 is supported since `6.0.14` / `3.1.6`
* [About](#about)
* [Prerequisites](#prerequisites)
* [Module Roadmap](#module-roadmap)
* [Usage](#usage)
* [Kotlin DSL](#kotlin-dsl-usage)
* [Spring Web](#spring-web-usage)
* [Annotation](#annotation-usage)
* [Kotlin Script](#kotlin-script-usage)
* [Examples](#examples)
* [Configuration](#configuration)
* [Spring Web](#spring-web-configuration)
* [Maven Plugin](#maven-plugin-configuration)
Expand All @@ -23,26 +25,6 @@ The Kotlin AsyncAPI project aims to provide convenience tools for generating and
[Kotlin DSL](https://kotlinlang.org/docs/type-safe-builders.html) for building the specification in a typesafe way.
The modules around that core build a framework for documenting asynchronous microservice APIs.

## Prerequisites
The framework generally supports any JVM project. Compatibility has been tested, but is not limited to the following versions:

| Identifier | Version |
|-----------------|-----------------------------|
| **JRE** | `8`, `11`, `17` |
| **Kotlin** | `1.6.21`, `1.7.0`, `1.7.10` |
| **Spring Boot** | `2.6.0`-`2.7.6` |
| **Maven** | `3.8.4`, `3.8.6` |

## Module Roadmap
| Module | Description | State |
|-------------------------|--------------------------------------------------------------------------------|--------------------|
| **core** | Kotlin DSL for building AsyncAPI specifications | :white_check_mark: |
| **spring‑web** | Spring Boot autoconfiguration for serving the generated document | :white_check_mark: |
| **script** | Kotlin scripting support for configuration as code | :white_check_mark: |
| **maven‑plugin** | Maven plugin for evaluating AsyncAPI scripts and packaging generated resources | :white_check_mark: |
| **annotation** | Technology agnostic annotations for meta-configuration | :white_check_mark: |
| **template** | Template engine for reusing similar AsyncAPI components | :x: |

## Usage
### <a name="kotlin-dsl-usage"></a>Kotlin DSL
The `AsyncApi` class represents the root of the specification. It provides a static entry function `asyncApi` to the
Expand Down Expand Up @@ -207,6 +189,9 @@ You have two options to use Kotlin scripting in your project:
- [Plugin] let the Maven plugin evaluate the script during build time (recommended)
- [Embedded] let your Spring Boot application evaluate the script at runtime

### <a name="examples"></a>Examples
- [Spring Boot Application](kotlin-asyncapi-examples/kotlin-asyncapi-spring-boot-example)

#### Maven Plugin
The Maven plugin evaluates your `asyncapi.kts` script, generates a valid AsyncAPI JSON file and adds it to the project resources. The `kotlin-asyncapi-spring-web` module picks the generated resource up and converts it to an `AsyncApiExtension`.

Expand Down

0 comments on commit 5e74d85

Please sign in to comment.