Skip to content

Instantly share code, notes, and snippets.

@adamw
Created March 13, 2026 17:05
Show Gist options
  • Select an option

  • Save adamw/2bddcc6fd8aafa666806293a5f86fb36 to your computer and use it in GitHub Desktop.

Select an option

Save adamw/2bddcc6fd8aafa666806293a5f86fb36 to your computer and use it in GitHub Desktop.

Tapir Documentation Map

Base URL: https://tapir.softwaremill.com/en/latest/ All links below are relative to the base URL.

Getting Started

  • quickstart.html — Core dependency, imports, and first steps with the endpoint DSL
  • generate.html — Generate a new Tapir project with chosen effect system, server, and JSON library
  • scala_2_3_platforms.html — Scala 2/3 syntax differences, JVM/JS/Native platform support matrix

Tutorials

  • tutorials/01_hello_world.html — Define and expose a single GET endpoint on an HTTP server
  • tutorials/02_openapi_docs.html — Generate OpenAPI docs from endpoints and serve via Swagger UI
  • tutorials/03_json.html — Parse and return JSON bodies using codecs, schemas, and auto-derivation
  • tutorials/04_errors.html — Model expected errors as typed outputs vs unexpected errors as exceptions
  • tutorials/05_multiple_inputs_outputs.html — Combine query params, headers, path segments, and multiple outputs
  • tutorials/06_error_variants.html — Use oneOf to return different error response types from a single endpoint
  • tutorials/07_cats_effect.html — Wire up Tapir endpoints with cats-effect IO and http4s server

How-To's

  • examples.html — Runnable scala-cli examples organized by stack, server, and feature
  • how-tos/delimited-path-parameters.html — Handle comma-separated or otherwise delimited values in path segments

Endpoints

  • endpoint/basics.html — Endpoint type structure, methods (GET/POST/etc.), names, and descriptions
  • endpoint/ios.html — Adding inputs (path, query, header, body) and outputs (body, headers, status code)
  • endpoint/oneof.html — Defining oneOf outputs for endpoints that return different response types by status code
  • endpoint/codecs.html — How codecs map between raw values (strings, bytes) and high-level Scala types
  • endpoint/customtypes.html — Deriving or manually providing codecs for custom domain types
  • endpoint/schemas.html — Schema derivation (automatic, semi-automatic, manual) for OpenAPI docs and validation
  • endpoint/enumerations.html — Mapping Scala 2 Enumeration, Scala 3 enums, and sealed hierarchies to schemas
  • endpoint/validation.html — Built-in validators (min, max, pattern, etc.) and custom validation logic
  • endpoint/contenttype.html — Content type negotiation, media type bindings, and charset handling
  • endpoint/json.html — JSON integration with circe, jsoniter, play-json, json4s, zio-json, and others
  • endpoint/pickler.html — Pickler: single derivation for both codec and schema, with customization options
  • endpoint/xml.html — XML request/response body support
  • endpoint/forms.html — URL-encoded forms and multipart file uploads with part metadata
  • endpoint/security.html — Model authentication (bearer, basic, API key, OAuth2) as security inputs
  • endpoint/streaming.html — Streaming bodies with fs2, ZIO Streams, Pekko Streams, or Ox
  • endpoint/websockets.html — Define WebSocket endpoints with typed message pipes and codecs
  • endpoint/integrations.html — Type integrations: cats datatypes, refined types, enumeratum, chimney, etc.
  • endpoint/static.html — Serve static files from filesystem or classpath resources with caching and range support

Server Interpreters

  • server/overview.html — Comparison of all supported server backends and their capabilities
  • server/akkahttp.html — Convert endpoints to Akka HTTP routes with Future-based logic
  • server/http4s.html — Convert endpoints to http4s HttpRoutes with cats-effect IO or any F[_]
  • server/zio-http4s.html — Use http4s server interpreter with ZIO and ZIO environment
  • server/netty.html — High-performance Netty server supporting direct-style, Future, cats-effect, and ZIO
  • server/nima.html — Helidon Nima server using JDK 21+ virtual threads (Loom)
  • server/finatra.html — Convert endpoints to Finatra HTTP controllers
  • server/pekkohttp.html — Convert endpoints to Pekko HTTP routes (Akka HTTP successor)
  • server/play.html — Integrate endpoints with Play Framework routing (Play 2.9 and 3.0)
  • server/vertx.html — Vert.x server interpreter with Future, cats-effect, or ZIO
  • server/ziohttp.html — Convert endpoints to ZIO HTTP routes
  • server/armeria.html — Armeria server with Future, cats-effect, or ZIO
  • server/jdkhttp.html — Use JDK built-in com.sun.net.httpserver as the backend
  • server/aws.html — Deploy endpoints as AWS Lambda functions behind API Gateway or ALB
  • server/options.html — Server options: CORS, default handlers, max content length, and custom configuration
  • server/path.html — How path segments are matched, decoded, and prioritized across endpoints
  • server/interceptors.html — Intercept requests before/after endpoint matching; logging, metrics, auth
  • server/logic.html — Attach business logic to endpoints: serverLogic, serverLogicSuccess, partial logic
  • server/observability.html — Prometheus metrics, OpenTelemetry tracing, and Datadog integration
  • server/errors.html — Decode failure handling, error responses, and exception handling customization
  • server/debugging.html — Debug logging of requests, responses, and endpoint matching

Client Interpreters

  • client/sttp.html — Generate sttp v3 client requests from endpoint definitions
  • client/sttp4.html — Generate sttp v4 client requests from endpoint definitions
  • client/play.html — Generate Play WS client calls from endpoint definitions
  • client/http4s.html — Generate http4s client requests from endpoint definitions

Documentation Interpreters

  • docs/openapi.html — Generate OpenAPI 3.0/3.1 YAML/JSON; expose via Swagger UI or Redoc
  • docs/asyncapi.html — Generate AsyncAPI documentation for WebSocket endpoints
  • docs/json-schema.html — Generate JSON Schema from Tapir schemas for any Scala type

Generators

  • generator/sbt-openapi-codegen.html — sbt plugin to generate Tapir endpoint definitions from OpenAPI YAML files

Testing

  • testing.html — Test server endpoints in-process without network using sttp stub backends

Other

  • other/other_interpreters.html — Community interpreters: Caliban GraphQL, SNUnit (Scala Native), tapir-gen
  • other/mytapir.html — Create a custom MyTapir object bundling preferred codecs, schemas, and integrations
  • other/grpc.html — Experimental gRPC support: define protobuf-like endpoints with Tapir
  • other/troubleshooting.html — Solutions for common compilation errors, implicit resolution, and runtime issues
  • other/migrating.html — Step-by-step migration guides between major Tapir versions

Ox Documentation Map

Base URL: https://ox.softwaremill.com/latest/ All links below are relative to the base URL.

Getting Started

  • info/dependency.html — Core dependency for sbt and scala-cli; no transitive deps besides jox
  • info/scope.html — Project scope: streaming, error management, concurrency, scheduling, resiliency
  • info/ai.html — Tips for using Ox with AI coding assistants (Cursor rules, Context7, doc indexing)

Basics

  • tour.html — Quick tour of Ox: par, race, timeout, flows, retries, error handling in one page
  • basics/direct-style.html — What direct style means, how virtual threads replace monadic wrappers
  • basics/error-handling.html — Two error channels: exceptions for bugs, Either/union types for app errors; ErrorMode API

High-Level Concurrency

  • high-level-concurrency/par.html — Run computations in parallel with par and parLimit; auto-cancellation on failure
  • high-level-concurrency/race.html — Race computations with raceSuccess and raceResult; loser is interrupted
  • high-level-concurrency/collections.html — Parallel collection ops: mapPar, foreachPar, filterPar, collectPar
  • high-level-concurrency/timeout.html — Timeout a computation with timeout (throws) or timeoutOption (returns None)

Structured Concurrency

  • structured-concurrency/index.html — What structured concurrency is and why thread lifetimes follow code structure
  • structured-concurrency/fork-join.html — Concurrency scopes (supervised, unsupervised), fork/forkUser, joining forks
  • structured-concurrency/error-handling-scopes.html — Error handling in scopes: supervised auto-fails on fork failure; supervisedError for app errors
  • structured-concurrency/fork-local.html — ForkLocal: scoped values propagated across forks (replacement for ThreadLocal)
  • structured-concurrency/interruptions.html — Handling InterruptedException correctly; use NonFatal to avoid swallowing interrupts

Streaming

  • streaming/index.html — Two streaming APIs: high-level lazy Flows and low-level imperative Channels
  • streaming/flows.html — Flow[T]: lazy async pipeline with map, mapPar, filter, grouped, merge, async; creating and running flows
  • streaming/io.html — Flow-based file and stream I/O: read/write files, InputStreams, OutputStreams as Flow[Chunk[Byte]]
  • streaming/channels.html — Channels: buffered/rendezvous/unlimited queues with completion, error propagation, and select
  • streaming/transforming-channels.html — Eager channel transformations (map, filter, transform) running in dedicated forks
  • streaming/selecting-from-channels.html — select across multiple channels: receive/send clauses, default values
  • streaming/errors.html — Error propagation in streams: errors flow downstream to the run/discharge point
  • streaming/backpressure.html — Backpressure mechanics: send blocks when buffer is full, bounding processing space

Scheduling

  • scheduling/retries.html — Retry failing operations with configurable schedule, delay, max attempts, and result predicates
  • scheduling/repeat.html — Repeat successful operations on a schedule with interval or delay modes
  • scheduling/scheduled.html — Low-level scheduled API underlying retry and repeat; Schedule, SleepMode, afterAttempt

Resiliency & Utilities

  • utils/oxapp.html — OxApp: application entry point with clean SIGINT/SIGTERM shutdown and root Ox scope
  • utils/rate-limiter.html — Rate limiter: fixed/sliding window algorithms with runBlocking or runOrDrop
  • utils/resources.html — Resource management: useCloseable, scope-bound acquisition with reverse-order release
  • utils/control-flow.html — Helpers: forever, repeatWhile, repeatUntil, never, checkInterrupt (all inline, zero overhead)
  • utils/actors.html — Lightweight typed actors: serialize method calls on mutable state using channels; ask/tell patterns
  • utils/circuit-breaker.html — Circuit breaker: Closed/Open/HalfOpen states to prevent cascading failures
  • utils/utility.html — Misc utilities: uninterruptible, sleep, debug, .pipe, .tap, .discard, Future.get()

Integrations

  • integrations/kafka.html — Kafka flows: KafkaFlow source, KafkaStage transforms, KafkaDrain sink with offset commit
  • integrations/mdc-logback.html — Inheritable MDC for Logback: propagate correlation ids across forks via ForkLocal
  • integrations/cron4s.html — Cron-based scheduling using cron4s expressions with repeat API
  • integrations/otel-context.html — Propagate OpenTelemetry context across virtual threads using PropagatingVirtualThreadFactory
  • integrations/tapir.html — HTTP server via Tapir: direct-style Netty interpreter, streaming bodies, WebSockets
  • integrations/sttp-client.html — HTTP client via sttp: synchronous backends, streaming bodies, WebSockets, SSE

Other

  • other/dictionary.html — Terminology reference: scopes, forks, lifecycle states, supervision semantics
  • other/best-practices.html — Patterns: keep scopes small, integrate callbacks via channels, use using Ox sparingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment