tapik

Tapik lets you describe HTTP endpoints once in Kotlin and generate clients, servers, and human-readable documentation from the same source of truth. The library captures full type information, headers, URI parameters, and status-driven flows to keep runtime code and docs in sync.

flowchart LR A[Endpoint DSL
tapik modules] --> B[Gradle build
classes] B --> C[[tapik Gradle Plugin]] C -->|scans| D[Endpoint metadata] C -->|runs generators| E[Spring RestClient clients] C -->|runs generators| F[Spring WebMVC controllers] C -->|runs generators| G[Markdown docs] D --> H[tapik-endpoints.txt
report]

Key Capabilities

  • Declarative DSL to model HTTP verbs, URI templates, headers, bodies, and status-driven responses.

  • Classpath scanning that keeps generated artefacts aligned with compiled endpoint definitions.

  • Pluggable generator architecture powered by Java ServiceLoader; enable only what you need.

  • First-party generators for Spring RestClient clients, Spring WebMVC controllers, and Markdown documentation.

  • Kotlin-first ergonomics: strongly typed parameters, Arrow interoperability, and codec abstractions for custom payloads.

Module Overview

Module Purpose Highlights

core

Endpoint DSL and supporting types

Path/query DSL, headers, status matching, response tuples, OneOf unions

codec

Built-in codecs

String & byte codecs, media-type helpers

jackson

Jackson integration

JSON codecs powered by Jackson ObjectMapper

spring-restclient

Client generator

Produces RestClient-based clients + interpreter

spring-webmvc

Server generator

Emits controller contracts + response mapping helpers

common-plugin

Generator runtime

Bytecode scanning, metadata model, Markdown generator

gradle-plugin

Build integration

Registers tapikGenerate, exposes DSL to select generators

Next Steps