Skip to content

Releases: theiterators/baklava

v2.1.0 🥮

Choose a tag to compare

@github-actions github-actions released this 10 Aug 14:16
0085c2c

What's Changed

  • List sttp integration and newer output formats in the README stacks table @luksow (#134)
  • release: bump version references ahead of v2.1.0 @luksow (#133)
  • Add baklava-sttp adapter for documenting remote APIs (#121) @luksow (#127)
  • Mark Option schemas nullable so captured null values validate @luksow (#132)
  • Emit OpenAPI JSON examples as structured objects instead of strings @luksow (#126)
  • Add naming-strategy hooks to SchemaDerivation (snake_case et al.) @luksow (#125)
  • Add standalone scala-cli example documenting the live GitHub API @luksow (#122)
  • Bump sbt-typelevel to 0.8.7 to fix Validate Steward Config CI job @luksow (#123)

Contributors that made this release possible

@luksow

v2.0.0 🥮

Choose a tag to compare

@github-actions github-actions released this 10 Jul 00:21
68b9c33

What's Changed

  • release: bump version references ahead of v2.0.0 @luksow (#119)
  • Align ts-rest and tsfetch on the shared route-module convention (2.0) @luksow (#117)

Contributors that made this release possible

@luksow

v1.4.1 🥮

Choose a tag to compare

@github-actions github-actions released this 09 Jul 22:33
0f631de

What's Changed

  • release: bump version references ahead of v1.4.1 @luksow (#118)
  • Add baklava-orpc: oRPC contract output format @luksow (#113)
  • cross-build baklava-sbt-plugin for sbt 2.x @pk044 (#111)

Contributors that made this release possible

@luksow and @pk044

v1.4.0 🥮

Choose a tag to compare

@github-actions github-actions released this 11 May 14:11
d80aa4f

What's Changed

  • fix: render Map[K, V] schemas with additionalProperties (#108) @luksow (#109)
  • fix(tsrest): quote non-identifier param keys (#105) and project multipart request bodies (#106) @luksow (#107)

Contributors that made this release possible

@luksow

v1.3.1 🥮

Choose a tag to compare

@github-actions github-actions released this 08 May 08:04
6df944d

What's Changed

  • fix(http4s): propagate multipart Content-Type/boundary to outgoing requests @luksow (#103)
  • ci: point Release Drafter at main instead of master @luksow (#101)
  • docs: bump version references to 1.3.0 @luksow (#100)
  • release: bump tlBaseVersion to 1.3 ahead of v1.3.0 @luksow (#99)

Contributors that made this release possible

@luksow

v1.3.0 🥮

Choose a tag to compare

@luksow luksow released this 06 May 08:32

A small, breaking-change-driven release: baklava-http4s-routes is now config-less by default and no longer drags com.typesafe:config onto http4s users' classpaths. The Pekko HTTP routes module continues to accept a com.typesafe.config.Config since HOCON is idiomatic on that stack — the change is isolated to the http4s adapter.

⚠️ Breaking changes

  • #97 (closes #96) — baklava-http4s-routes: removed the BaklavaRoutes.routes(config: com.typesafe.config.Config) overload along with the com.typesafe:config dependency and the bundled reference.conf. The new entry point is a public BaklavaRoutesConfig case class with sensible defaults and a BaklavaRoutesConfig.fromEnv factory that reads BAKLAVA_ROUTES_* environment variables (matching the old reference-conf override semantics). Calling BaklavaRoutes.routes() with no arguments now Just Works.

    Upgrade: drop the HOCON entirely (defaults + env vars cover most setups), pass an explicit BaklavaRoutesConfig, or build the case class from your own Config if you want to keep HOCON:

    val c = config.getConfig("baklava-routes")
    BaklavaRoutes.routes(BaklavaRoutesConfig(
      enabled = c.getBoolean("enabled"),
      basicAuthUser = Try(c.getString("basic-auth-user")).toOption,
      basicAuthPassword = Try(c.getString("basic-auth-password")).toOption,
      fileSystemPath = c.getString("filesystem-path"),
      publicPathPrefix = c.getString("public-path-prefix"),
      apiPublicPathPrefix = c.getString("api-public-path-prefix")
    ))

    Pekko HTTP callers are unaffected — the existing routes(com.typesafe.config.Config) API is preserved.

Routing / SwaggerUI

  • #97baklava-pekko-http-routes: also gains the BaklavaRoutesConfig case class (same shape, in pl.iterators.baklava.routes) plus a routes(BaklavaRoutesConfig) overload, and BaklavaRoutesConfig.fromTypesafeConfig for the existing HOCON path. Two pre-existing parity bugs caught during review and fixed in the same PR: the swagger redirect and swagger-initializer.js URL builders now apply a trailing-slash helper (a publicPathPrefix of /internal/docs correctly produces /internal/docs/openapi instead of /internal/docsopenapi), and the /openapi route returns the same friendly 404 the http4s adapter does when the spec file is missing.

Tests

  • 18 new scalatest specs across both routes modules (basic-auth challenge/accept, swagger redirect with both prefix variants, initializer JS content, missing-openapi 404, full env-mapping coverage for fromEnv, round-trip through fromTypesafeConfig). All pass on Scala 2.13 and 3.3.7.

Docs

  • New "Serving Open API and Swagger UI" section in docs/http4s.md parallel to the existing pekko-http one, with an Ember server example.
  • docs/installation.md reworked to differentiate the two modules and clarify that each defines its own (structurally identical, but distinct) BaklavaRoutesConfig.

v1.2.0 🥮

Choose a tag to compare

@luksow luksow released this 01 May 10:51
d92f75a

First minor release on the 1.x line: three brand-new generators, two breaking renames, and a wave of correctness fixes across the existing OpenAPI / Simple HTML generators.

⚠️ Breaking changes

  • #75 — Replaced BaklavaHttpMethod / BaklavaHttpStatus / BaklavaHeader with the corresponding sttp-model types (sttp.model.Method, sttp.model.StatusCode, sttp.model.Header).
    Upgrade: swap any import pl.iterators.baklava.{BaklavaHttpMethod, ...} for import sttp.model.{Method, StatusCode, Header}. Constructor calls move 1:1.
  • #73withSetup DSL: .request has been renamed to .onRequest (eager-vs-deferred call-site fix needed for Scala 2.13's inference).
    Upgrade: rename .request(...) to .onRequest(...) in any test using withSetup.

New output generators

Three new modules join the existing OpenAPI / Simple HTML / TS-REST generators. Each is published as its own SBT artifact and discovered automatically when added to the test classpath.

  • baklava-postman (#91, closes #23) — Postman Collection v2.1 JSON, imports cleanly into Postman Desktop / Web / CLI and Insomnia. target/baklava/postman/collection.json.
  • baklava-sttpclient (#93, closes #22) — Scala source tree using sttp-client4 + circe. Curried def baseUri, auth)(per-call params) signatures, typed circe bodies/responses where applicable, raw fallback otherwise. target/baklava/sttpclient/.
  • baklava-tsfetch (#92, closes #87) — Plain-TypeScript client built on the browser/Node fetch API. Per-tag folders, typed request/response interfaces, no ts-rest/zod runtime deps. target/baklava/tsfetch/.

See docs/output-formats.md for full details on each.

Routing / SwaggerUI

  • #79 (closes #54) — baklava-http4s-routes: serve the generated OpenAPI spec + SwaggerUI from an http4s server (parity with the existing baklava-pekko-http-routes).
  • #85 — pekko routes: derive the SwaggerUI version from the bundled webjar instead of hard-coding it; correct yaml/js content-types.
  • #83 (closes #81) — multipart/form-data request body support across the DSL.
  • #86 (closes #52) — honor the declared Content-Type for file uploads instead of always defaulting to application/octet-stream.

DSL

  • #58 (closes #57) — new withSetup DSL for deferring per-test inputs (e.g. fixtures created during beforeAll).

OpenAPI generator improvements

  • #71 (closes #66) — merge parameter declarations across all calls in an operation rather than emitting only the first.
  • #65 — generator audit: many correctness fixes (escape user-controlled data, dedupe operationIds, etc.). Closes #63 and #64.
  • #62 (closes #50, #51) — stable example ordering + merged response descriptions across calls.
  • #82 (closes #61) — encode Schema.default as structured JSON (was string-encoded, broke deeply-nested defaults).
  • #60 — merge metadata when multiple supports blocks share the same path + method.
  • #59 — fix default "None" rendered for optional query parameters.

Simple HTML generator

  • #78 — tag-grouped index page + per-call curl snippet with copy-to-clipboard button.

Misc

  • #89 — collapsed the security-scheme + security-contribution boilerplate, smaller surface to maintain.
  • #76 — comprehensive gold-snapshot test covering every generator end-to-end against a Pet-Store-style fixture.
  • #74 — small TODO sweep: case-insensitive response header assertion + a verified query-URI helper.
  • #70 (closes #67) — documented the baklava.postProcessorPackages config key.
  • #56, syntax highlighting / Prism-config / webpack@5.98.x pin (#77) — docs site polish.

Acknowledgements

Massive thanks to everyone who contributed reviews and issues across this release. The new generators in particular went through extensive iteration to land correctly.

v1.1.1 🥮

Choose a tag to compare

@luksow luksow released this 20 Mar 13:37

What's Changed

Bug Fixes

  • Fix resource leak when reading OpenAPI spec (Source not closed)
  • Fix simple formatter rendering path parameters in query parameters section
  • Fix HttpBearer constructor example in docs (bearerFormat vs prefix)
  • Fix Schema.derived reference in docs (use implicitly[Schema[T]])
  • Fix status code type mismatch examples in docs

Improvements

  • Redesigned Simple HTML formatter with modern CSS — color-coded method badges, card layout, dark code blocks, collapsible JSON schemas, back navigation
  • All output formatters now exercised in tests (simple + tsrest added to test classpath)

Documentation

  • Added comprehensive documentation: installation, DSL reference, Pekko HTTP & http4s integration, configuration, examples, output formats
  • Documented formatter auto-discovery pipeline
  • Documented debug mode (BaklavaTestFrameworkDslDebug)
  • Documented OAuth2 flows, cookie-based security, maxBodyLengthInAssertion
  • Updated all GitHub source links to v1.1.0

v1.1.0 🥮

Choose a tag to compare

@luksow luksow released this 20 Mar 09:21

What's Changed

Dependency Updates

  • sbt 1.11.3 → 1.12.6
  • Scala 2.13.16 → 2.13.18, 3.3.3 → 3.3.7, 2.12.17 → 2.12.21
  • sbt-typelevel 0.8.0 → 0.8.5
  • sbt-scalafmt 2.5.2 → 2.5.6
  • sbt-mdoc 2.6.1 → 2.8.2
  • scalafmt 3.8.3 → 3.10.7
  • pekko-http 1.1.0 → 1.3.0
  • pekko 1.1.2 → 1.1.5
  • http4s 0.23.29 → 0.23.33
  • circe 0.14.0 → 0.14.15
  • jsoniter-scala 2.13.8 → 2.13.39
  • swagger-core 2.2.27 → 2.2.45
  • swagger-parser 2.1.24 → 2.1.39
  • specs2 4.20.9 → 4.23.0
  • munit 1.0.2 → 1.2.4
  • magnolia 1.1.10 → 1.1.13 (Scala 2), 1.3.8 → 1.3.18 (Scala 3)
  • enumeratum 1.7.5 → 1.9.6
  • pekko-http-circe 3.0.0 → 3.9.0
  • testcontainers 0.41.8 → 0.44.1
  • swagger-ui 5.17.11 → 5.32.1
  • kebs 2.1.3 → 2.1.4
  • typesafe-config 1.4.3 → 1.4.6

Breaking Changes

  • Minimum JDK raised from 8 to 11 (required by jsoniter-scala upgrade)
  • pekko-http bumped from 1.1.0 to 1.3.0

v0.5.0 🥮

Choose a tag to compare

@github-actions github-actions released this 17 Oct 14:17

What's Changed

Contributors that made this release possible

@kristerr, @luksow and Krzysztof Palcowski