Skip to content

kotlin-sdkgen 0.3.0

Choose a tag to compare

@nabobery nabobery released this 24 Aug 02:54
· 4 commits to main since this release
827d479

Kotlin SDKGen 0.3.0 introduces a strict, audited allOf schema-composition algebra and media-specific request variants, completing the OpenRouter conformance surface at 89 of 89 operations and reclaiming ten GitHub webhook payload schemas.

Breaking

  • Public model API: the semantic model — public API tracked by the generator's API dumps — gained composition/audit types and fields (SchemaModel compositions, AllOfPropertyResolution with a now-required winningPropertySchemaId, audit sources), breaking source and binary compatibility of the generator-model/generator-openapi surface. Generated SDK surfaces are additive except for the wire-contract changes below.
  • Wire contract: a degenerate null-only anyOf member now canonicalizes into property nullability instead of a JsonElement? catch-all branch; affected unions become strict two-branch unions whose non-matching payloads throw the union's NoMatchException (previously they were silently absorbed).
  • Wire correctness: plain-text request bodies (GitHub markdown/render-raw) transmit raw UTF-8 text instead of a JSON-quoted string; the Stripe multipart enum purpose field is emitted as bare text instead of a JSON-quoted string; string-enum multipart parts and []-named repeated parts encode per their contracts.

Added

  • Strict allOf intersection algebra with audited overrides: duplicate allOf properties resolve through a proven set-theoretic algebra, and contract-judgment cases are recorded explicitly via the new x-sdkgen-allof-resolution canonical extension (per-property branch election by $ref or resolved-content digest, fail-closed on drift). See ADR 0021 and the committed schema-intersection proof table.
  • Media-specific request variants: an operation whose request body declares several incompatible media types now emits one callable method per compatible media group (…Multipart, …Form, sanitized-subtype suffixes) with deterministic naming that fails closed on collisions, instead of rejecting the operation.
  • Explicit request-body wire encodings: JSON (application/json, aliases, +json), raw text (text/* over string schemas, via the new RawTextCodec runtime codec), raw byte streams, form, and multipart. Unsupported representations fail closed with a waivable diagnostic instead of silently JSON-encoding.
  • Full OpenRouter conformance surface: all 89 of 89 operations generate with zero blockers, including the /messages and /responses streaming operations and both /audio/transcriptions media variants.
  • GitHub webhook payload reclamation through the audited overlays: 10 payload schemas (+10 inline sub-schemas) now project; the accepted-waiver ledger shrank from 139 to 119.

Changed

  • Oversized union inspection carriers (beyond a 200-JVM-slot synthetic-descriptor threshold) switch to a no-arg mutable internal carrier to stay within the JVM's 255-slot method descriptor limit; behavior is unchanged.
  • Parity provenance binds each corpus's ordered configured overlay set (audit overlays included), so an overlay-only edit can no longer escape parity input hashing.

Coordinates

  • Maven Central: io.github.nabobery:kotlin-sdkgen-*:0.3.0
  • Gradle Plugin Portal: io.github.nabobery.kotlin-sdkgen

See the changelog, ADR 0021, and support policy.

Full changelog: v0.2.0...v0.3.0