Skip to content

Tags: zio/zio-http

Tags

v3.11.0

Toggle v3.11.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update zio, zio-streams, zio-test to 2.1.25 (#4098)

v3.10.1

Toggle v3.10.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: escape single quotes in astToExpression string values (#4029)

v3.10.0

Toggle v3.10.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: escape </script> in Datastar executeScript SSE rendering (#4013)

v3.9.0

Toggle v3.9.0's commit message
Update tapir-http4s-server, ... to 1.13.10

v3.8.1

Toggle v3.8.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: internalize new OpenAPI example methods to avoid public API chan…

…ge (#3938)

v3.8.0

Toggle v3.8.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add Smithy IDL code generator (#1522) (#3898)

* Smithy parser impl (#1522)

* Add Smithy code generator for zio-http Endpoints

Implement SmithyEndpointGen that generates zio-http Endpoint definitions
from Smithy IDL models. This complements the Smithy parser added in the
previous commit.

Features:
- Generate case classes from Smithy structure shapes
- Generate sealed traits from union shapes
- Generate enums from enum shapes
- Generate Endpoint definitions from operations with @http traits
- Support for path parameters (@httpLabel)
- Support for query parameters (@httpquery)
- Support for header bindings (@HTTPHeader)
- Support for request/response body (@httpPayload)
- Comprehensive type mapping from Smithy to Scala types

Tests: 22 Smithy-specific tests (14 parser + 8 generator)
All 110 zio-http-gen tests pass.

* Add filesystem support for Smithy code generation

Add convenience methods to read and process Smithy files:
- fromString: Parse Smithy IDL string and generate code
- fromFile: Read a single .smithy file and generate code
- fromDirectory: Read all .smithy files from a directory
- generate: Full pipeline from source dir to target dir
- generateFromFile: Full pipeline from single file to target dir
- mergeModels: Combine multiple SmithyModels into one

This allows users to easily integrate Smithy code generation into
their build process by pointing to a directory of .smithy files.

* Add streaming, documentation, and auth trait support

Enhance the Smithy code generator with additional features:

Parser improvements:
- Add @streaming trait for streaming blob payloads
- Add @eventstream trait for event streams
- Add auth traits (@httpBasicAuth, @httpDigestAuth, @httpBearerAuth,
  @httpApiKeyAuth, @auth)
- Parse /// doc comments as @documentation traits

Code generation improvements:
- Detect streaming inputs/outputs and set streaming flag
- Extract documentation from @documentation traits
- Use @mediaType trait when available
- Include error documentation in generated endpoints

Tests: 29 Smithy-specific tests, 117 total zio-http-gen tests

* Add comprehensive Smithy model validation

Add SmithyValidation module with:
- Shape reference validation (undefined references)
- HTTP trait validation (methods, status codes, path params)
- Constraint trait validation (@Length, @range, @pattern)
- Operation validation (input/output must be structures)
- Service validation (operations, resources, version)
- Enum and union validation (non-empty, no duplicates)
- 40 new validation tests

Integrate validation into SmithyEndpointGen with optional
validate parameter for all generation methods.

* Add SmithyConfig for code generation options

- Create SmithyConfig with field normalization enabled by default
- Update SmithyEndpointGen to accept and use SmithyConfig
- Add config options: validation, companion objects, endpoints object, etc.
- Add 7 tests for config options (76 total Smithy tests pass)

* Format Smithy code with scalafmt (#1522)

* Apply sbt fmt (#1522)

* Fix unmoored doc comment in Smithy parser (#1522)

* Add comprehensive .smithy example files and tests (#1522)

Add three real-world Smithy IDL example files covering:
- Pet store API with CRUD operations, pagination, enums, validation
- Auth service with bearer tokens, login/logout, user management
- Order service with resources, nested types, money, addresses

Add tests to parse all example files and verify shape extraction.

* Add Alternator support to RichTextCodec | operator (#1522)

Enhance RichTextCodec's | operator to use Alternator typeclass, unifying
same-type alternatives without nested Either types. This matches the
behavior of HttpCodec's | operator.

Changes:
- RichTextCodec: Use Alternator in | operator for type-unified alternatives
- Header.scala: Simplify code by removing unnecessary .transform/.merge
- Add SmithyCodecs with primitive codecs demonstrating the enhancement
- Add SmithyCodecsSpec with 30 tests for the primitive codecs

* Fix Scala 2.12 compatibility for RichTextCodec | operator (#1522)

Wrap dependent-type method references in explicit lambdas for Scala 2.12
compatibility. Add MIMA exclusion for the | method signature change.

* Fix scaladoc error by escaping $ in doc comment (#1522)

* Remove unused zio-parser dependency (#1522)

v3.7.4

Toggle v3.7.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Abort fetch requests when scope is complete (#3866)

v3.7.3

Toggle v3.7.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix various issues with datastar rendering of names and updates (#3854)

v3.7.2

Toggle v3.7.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix rendering bugs in datastar (#3847)

v3.7.1

Toggle v3.7.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix `DatastarEvent.PatchElements` rendering for multiline elements (#…

…3833)