Releases: zio/zio-http
v3.0.1
What's Changed
- 3.0 release (#2982) by @987Nabil in #3119
- Update README.md by @zio-assistant in #3120
- Fix: Multipart Boundary Generation to Comply with RFC 2046 by @varshith257 in #3123
- Fixing partial provision of environment to Routes when resulting env is intersection type. by @pawelsadlo in #3128
- Setup Mima by @987Nabil in #3129
- Save one copy call by @987Nabil in #3137
New Contributors
- @varshith257 made their first contribution in #3123
Full Changelog: v3.0.0...v3.0.1
v3.0.0
Finally 3.0! 🎉
Thanks for 3.0
We finally made the 3.0 release 🎉🎊 . Which is also the first real production-ready release with stable API of zio-http.
I am very happy to have reached this milestone.
Thanks to all the contributors and users of ZIO HTTP!
Especially thanks to:
- @jdegoes for his vision, code contribution, mentoring and sponsoring of the project.
- @vigoo for a lot of code contribution at the beginning of the 3.x series.
- @kyri-petrou for optimizations and bug fixes.
- @khajavi for his work on the documentation.
I hope you will enjoy working with zio-http as much as I do working with it and developing it.
Best regards,
Nabil Abdel-Hafeez aka @987Nabil 🥳
What's Changed since v3.0.0-RC10
- Caching and improvements for HttpContentCodec (#3029) by @987Nabil in #3074
- Update README.md by @zio-assistant in #3082
- Sanitize scala doc string for open api gen (#3047) by @987Nabil in #3071
- Update middleware.md by @neo773 in #3088
- [gen] normalized fields with annotations holding original field name by @hochgi in #3069
- [gen] map common abstract fields in trait (oneOf enum) to have (un)aliasing translation of types by @hochgi in #3089
- Fix OpenApi gen components from case class with arity > 22 by @narma in #3065
- Add
Endpoint#implementAsZIO
by @987Nabil in #3085 - Use user-defined content-length for HEAD responses by @kyri-petrou in #3084
- Mark connection pool test flaky by @987Nabil in #3093
- Add middlewares to forward header and ensure the existence of a header by @987Nabil in #2808
- Revisit decisions for lazy val (#3051) by @987Nabil in #3067
- Make int and long segment parsing JS compatible (#3087) by @987Nabil in #3090
- Add convenience method for out header and extend docs (#3054) by @987Nabil in #3068
- Update testkit docs by @987Nabil in #3095
- Config name spacing to kebab case by @987Nabil in #3105
- Remove http app wording by @987Nabil in #3106
- fix OpenAPI not deserializing lowercase value of 'in' field in security schemes by @geeeezmo in #3107
- ContentType based on MediaType in HttpContentCodec (#3023) by @987Nabil in #3109
- Housekeeping by @987Nabil in #3111
- Add concept docs and update various outdated docs by @987Nabil in #3108
- Support custom reason phrase for Status (#3009) by @987Nabil in #3116
- Remove route builder by @987Nabil in #3115
- Optimize netty integration and default config by @kyri-petrou in #3114
Full Changelog: v3.0.0-RC10...v3.0.0
What's Changed since v.0.5.0
- Avoid redundant layer creation by @vigoo in #2040
- Make request logging middleware universial by @guersam in #2043
- Ability to set specific boundary when encoding body as multipart/form-data by @vigoo in #2042
- Add content-type header based on endpoint body by @vigoo in #2046
- Handle invalid base64 in basic authorization by @vigoo in #2047
- Header model cleanup by @vigoo in #2051
- Fix type signature of Http#@@ by @vigoo in #2054
- Unifying headers by @vigoo in #2055
- Set scheme when setting url/uri to ZClient by @zeal18 in #2057
- Update tapir-http4s-server, ... to 1.2.11 by @scala-steward in #2059
- Part 1/2 by @jdegoes in #2061
- Streaming multipart/form-data by @vigoo in #2062
- Fail on decoding errors by @vigoo in #2063
- Async DNS resolver by @vigoo in #2064
- Unified layers and config classes, added ZIO Config support by @vigoo in #2067
- Implement ClientSSLConfig.config by @adamgfraser in #2069
- WIP by @jdegoes in #2066
- Update scalafmt-core to 3.7.3 by @scala-steward in #2079
- WIP by @jdegoes in #2074
- Update netty-codec-http, ... to 4.1.91.Final by @scala-steward in #2081
- Log failures in debug and request logging middlewares by @vigoo in #2082
- Ability to catch server errors and defects in Http by @vigoo in #2072
- octet-stream as default multipart form contentType by @liewhite in #2076
- Update tapir-http4s-server, ... to 1.2.12 by @scala-steward in #2085
- Add mapErrorZIO to Handler and Http by @ex0ns in #2086
- Real support for streaming in Client by @vigoo in #2083
- Log a warning in case of fatal errors by @vigoo in #2084
- Update sbt-revolver to 0.10.0 by @scala-steward in #2087
- Simplify package structure by @vigoo in #2089
- Clean up ZClient#socket by @vigoo in #2090
- debug and logging aspects for ZClient by @vigoo in #2092
- collapsed sidebar by default by @khajavi in #2093
- Fix previous merge by @vigoo in #2096
- Update zio, zio-streams, zio-test, ... to 2.0.12 by @scala-steward in #2095
- Better drop trailing slash by @vigoo in #2098
- Graceful shutdown by @vigoo in #2099
- Make header logging work with unparsed headers by @vigoo in #2103
- Fix broken link in README by @danbills in #2080
- Create initial version of HttpCliApp by @jorge-vasquez-2301 in #2101
- Making all code snippets up-to-date by @vigoo in #2104
- feature: retrieve repeatable headers from response by @ex0ns in #2102
- Endpoint#outErrorWith by @vigoo in #2097
- Update README by @vigoo in #2105
- Some refactorings to HttpCliApp by @jorge-vasquez-2301 in #2108
- Update zio, zio-streams, zio-test, ... to 2.0.13 by @scala-steward in #2107
- Update netty-incubator-transport-native-io_uring to 0.0.20.Final by @scala-steward in #2112
- Fix usage of Config.nested by @vigoo in #2115
- Allow middlewares to alter the error handler by @vigoo in #2114
- Update tapir-http4s-server, ... to 1.2.13 by @scala-steward in #2119
- Update netty-codec-http, ... to 4.1.92.Final by @scala-steward in #2120
- Significantly improve performance of streaming multipart/form-data by @vigoo in #2116
- Fix triple evaluation of context layer by @vigoo in #2124
- Endpoint factory methods for head, patch and trace by @jczuchnowski in #2132
- Update zio-schema, zio-schema-json to 0.4.11 by @scala-steward in #2129
- Update tapir-http4s-server, ... to 1.3.0 by @scala-steward in #2128
- Fix mapErrorZIO by @vigoo in #2135
- Fix rendering of content type boundary by @jgranstrom in #2130
- Add methods to
Endpoint
to apply any kind of in/out codec by @987Nabil in #2142 - Offer API to add examples to
HttpCodec
andEndpoint
(#2118) by @987Nabil in #2144 - Special support for byte stream on endpoint api in/out by @vigoo in #2145
- Refactor Websockets by @adamgfraser in #2152
- Support for multipart/form-data in endpoint API by @vigoo in #2158
- Support returning body from another request by @andrzejressel in #2161
- added basic implementation for Server sent events on the server side. by @devsprint in #2138
- Throw request body decoding error by @rhueara-ca in #2147
- Fix issue with streaming form decoding hanging forever by @vigoo in #2162
- Fix handling of multipart inputs on th...
v3.0.0-RC10
Breaking changes
Query Codec
QueryCodec
is now Schema
based. Therefore calls that would before look like HttpCodec.queryInt
or HttpCodec.queryTo[Int]
become HttpCodec.query[Int]
. (See the docs for more details)
This also enables using a case class to extract multiple parameters.
Client
The ZClient got some rework done. Most important is, that there is now an explicit streaming and non-streaming API.
The reason is, that for streaming bodies we depended on Scope
for which some users used the default application scope.
To reduce possible errors, we offer now batched
requests. They do not need a scope. For the streaming ones, please use for example ZIO.scoped
to set boundaries in which the streaming body is available. See the docs for more details.
Replaced Endpoint Middleware with explicit security concept
An example says more then 1000 words.
private val basicAuthContext = HandlerAspect.customAuthProviding[AuthContext] { r =>
{
r.headers.get(Header.Authorization).flatMap {
case Header.Authorization.Basic(uname, password) if Secret(uname.reverse) == password =>
Some(AuthContext(uname))
case _ =>
None
}
}
}
val endpoint = Endpoint(Method.GET / "test").out[String](MediaType.text.`plain`).auth(AuthType.Basic)
val routes =
Routes(
endpoint.implementHandler(handler((_: Unit) => withContext((ctx: AuthContext) => ctx.value))),
) @@ basicAuthContext
val response = for {
client <- ZIO.service[Client]
locator = EndpointLocator.fromURL(url"http://localhost:8080")
executor = EndpointExecutor(client, locator, Header.Authorization.Basic("admin", "admin".reverse))
invocation = endpoint(())
response <- ZIO.scoped(executor(invocation))
} yield response
This endpoint has a clear auth requirement and uses an aspect to extract information from the headers to be provided to the handler.
Note that the providing works on the level of Routes
, so multiple routes can request AuthContext
and you need to add the aspect only once.
The endpoint client call requires an EndpointExecutor
, that can provide the authentication requirement set on the endpoint.
Either via a value like in the example or an effect.
Replaced Warning header and beautifyErrors with more explicit error config
The default way to handover errors has been the warning header so far. That had multiple problems.
Therefore we replaced it with ErrorResponseConfig
. Which should be set globally in the application bootstrap via ErrorResponseConfig.configLayer
and can be locally overwritten via the handler aspects ErrorResponseConfig.debug
or ErrorResponseConfig.withConfig
.
What's Changed
- Use
Exit.succeed
when body extraction is side-effect free by @kyri-petrou in #2938 - Override URL's toString with encode by @guersam in #2939
- Reorg driver layers by @eyalfa in #2936
- Use ZIO Assistant to Update Readme by @khajavi in #2949
- Update README.md by @zio-assistant in #2950
- Fix application shutdown issue when
Server#install
is not called by @kyri-petrou in #2966 - Streaming response body content type by @eyalfa in #2967
- Multi-value segments for PathCodecs by @987Nabil in #2959
- Fixes issue #2971 by @gregor-rayman in #2972
- Fix WebSockets when request streaming is enabled by @kyri-petrou in #2978
- Reduce verbosity of test suites by @kyri-petrou in #2979
- Encode SSE based on HttpContentCodec (#2695) by @987Nabil in #2951
- Fix doc typo by @guizmaii in #2989
- Allow nesting
Routes
with unhandled errors (#2934) by @987Nabil in #2986 - Handle content new lines in
fromFormAST
(#2976) by @987Nabil in #2983 - Body content type by @eyalfa in #2969
- Remove deprecated App (#2984) by @987Nabil in #2990
- just fail instead of throwing if a relative url is provided by @jgulotta in #2995
- Fix fromZSchemaMulti by @pawelsadlo in #2996
- Generic ServerSentEvents (#2952) by @987Nabil in #2985
- fixes #2963: PartialBooleanAttribute (support no value) by @jgoday in #2973
- Tags for Endpoint and OpenAPI generation (#2716) by @987Nabil in #2930
- Schema based query codecs including validation (#2937) by @987Nabil in #2991
- ServerSentEvents client support (#2953) by @987Nabil in #2987
- Fix sbt module compilation issue when using IntelliJ IDE by @kyri-petrou in #2970
- test for #2652 (issue already fixed in #2935) by @hochgi in #3004
- Fix uuid SegmentCodec matches by @narma in #3007
- Update dependencies by @kyri-petrou in #3010
- Fix
ClassCastException: class zio.schema.Schema$Lazy cannot be cast to class zio.schema.Schema$Record
by @guizmaii in #3013 - Cache parsing of content-type header by @kyri-petrou in #3011
- Remove stray
debug
statement fromasServerSentEvents
by @frekw in #3016 - Expose config option for avoiding context switching when handling requests by @kyri-petrou in #2944
- Validation for OpenAPI generated endpoints (#2786) by @987Nabil in #2968
- [gen] newtype aliases by @hochgi in #3002
- Rework Endpoint authentication by @987Nabil in #2947
- Efficient query optional encoding (#2942) by @987Nabil in #3000
- Add convenient
AuthType.Basic
andAuthType.Bearer
type aliases by @guizmaii in #3020 - Add test for generating OpenAPI for generic payload (#2767) by @987Nabil in #3022
- [gen] clean whitespace noise in generated code by @hochgi in #3021
- Simplify the interface of
URL.decode
by only returning one possibleException
, instead of all possibleException
by @guizmaii in #3017 - #2941: Cors, accessControlAllowHeaders in option request (prepend pre… by @jgoday in #2943
- QueryParameter validation for OpenAPI (#2993) by @987Nabil in #3025
- Add streaming body constructors with env access (#2817) by @987Nabil in #3018
- Fix doc typo by @geeeezmo in #3027
- Add missing
case
on theMethod
implementations by @guizmaii in #3034 - clean some tests repetitive boilerplate by @hochgi in #3038
- Expose additional server config by @kyri-petrou in #3037
- Fix some
Endpoint::doc
field usages && Rename it todocumentation
to avoid this kind of mistake in the future by @guizmaii in #3044 - Simplify Encoderdecoder by @pablf in #2998
- Fix
Map
representation in generated OpenAPI specs by @guizmaii in #3049 - Provide Authentication information via EndpointExecutor (#3019) by @987Nabil in #3026
- Add a
batched
API toZClient
by @kyri-petrou in #3008 - Improve error handling for
collect
andignore
methods by @kyri-petrou in #3056 - Optimize
ServerInboundHandler#writeResponse
by @kyri-petrou in #3057 - Update README.md by @zio-assistant in #3055
- exclude fragments when encoding a url for an http request path by @jgulotta in #2974
- [OpenAPI] case class field being an Option of an ADT are not rendered as nullable by @guizmaii in #3053
- Security audit by @pablf in #3039
- fix OpenAPI doc for Endpoint not rendered by @geeeezmo in #3046
- Configurable EndpointAPI codecs (#2911) by @987Nabil in #3032
- Fix Route with literal path segment makes route with variable path segment unavailable by @narma in #3040
- Remove warning header; Configurable generated error responses (#2955) by @987Nabil in #3050
- Fixed #3058 - added securityRequirementSchema to ignore securitySchem… by @kdelija in #3059
- Use an unbounded queue in
AsyncBody#asStream
by @kyri-petrou in #3060 - Avoid secondary supe...
v3.0.0-RC9
What's Changed
- Add line breaks in key features section by @gbarrett-makeit in #2874
- Fix serving of static files over SSL by @kyri-petrou in #2879
- Implement dynamic resizing of
StreamingForm.Buffer
by @kyri-petrou in #2882 - Don't share the Scope in
ContentTypeSpec
by @kyri-petrou in #2886 - Docs/improve readme by @syedbarimanjan in #2880
- Add a resourcePrefix for Middleware.serveResources by @sullivan- in #2887
- Some tiny doc fixes. by @sullivan- in #2884
- Remove invalid
HttpApp
references by @mijicd in #2881 - Fix Client manual interruption by @kyri-petrou in #2889
- Add
Server.serve
variant that acceptsRoute
(#2805) by @987Nabil in #2895 - Update README.md by @github-actions in #2877
- Prefer user given content type over default generation (#2748) by @987Nabil in #2896
- Endpoints as list in CodeGen to avoid duplicate key elimination (#2836) by @987Nabil in #2892
- add tests for Routes.serveDirectory and Routes.serveResources by @sullivan- in #2891
- Use text over application media type for file serving; add charset by @987Nabil in #2890
- fix: broken link in readme by @ezhil56x in #2883
- Simpler default
Endpoint#implement
(#2811) by @987Nabil in #2894 - Remove leading/trailing whitespaces from rendered authorization header by @kyri-petrou in #2900
- Implement streaming of multipart field data by @kyri-petrou in #2899
- Fix OpenAPI security schema (#2813) by @987Nabil in #2893
- fix: Ignore everything after closing boundary when parsing multi form data by @seakayone in #2862
- Fix for routes with different parameter names by @kyri-petrou in #2903
- Try all resolved IP addresses when client fails to connect by @kyri-petrou in #2905
- Avoid allocation of new path when resolving path ambiguities by @kyri-petrou in #2904
- Htmx attributes are unimportable by @daharon in #2910
- Fix memory leak in netty connection pool by @kyri-petrou in #2907
- Access latest route pattern when mapping route errors (#2823) by @987Nabil in #2915
- Fix ScalaJS regex and regression tests by @pablf in #2912
- Modify JS client and fix tests by @pablf in #2909
- Add
description
annotation content to docs for open API (#2722) by @987Nabil in #2914 - Update test that was deliberately failing before JS regex fix by @swoogles in #2917
- Generate maps for additional properties in OpenAPI code gen (#2901) by @987Nabil in #2921
- Generate Mime types by @kitlangton in #2918
- Improve the Client's performance for non-stream bodies by @kyri-petrou in #2919
- Avoid copying of the underlying array in
AsyncBody#asArray
by @kyri-petrou in #2923 - Select codec based on response status for endpoint client (#2727) by @987Nabil in #2929
- Fix rare race condition in ZClient causing healthy connections to be discarded by @kyri-petrou in #2924
- Release Netty requests prior to forking ZIO effects by @kyri-petrou in #2925
- Alternative literal path segments for route definitions (#2815) by @987Nabil in #2920
- Update README.md by @github-actions in #2898
- Generate http-file standard from Endpoint definitions (#2876) by @987Nabil in #2931
- Accept
octet-stream
as media type for multipart text fields (#2746) by @987Nabil in #2926 - Ignore non-content codecs when building multipart OpenAPI spec (#2745) by @987Nabil in #2927
- some cleanup on recent work serving files and resources by @sullivan- in #2928
- Call Driver#.start only when Server#.install is first called (#2381) by @masonedmison in #2872
- Fix error when extracting examples (#2789) by @987Nabil in #2922
- [openapi] fix incomplete handling (fails on Schema.Lazy) for openapi's fromEndpoints by @hochgi in #2935
New Contributors
- @gbarrett-makeit made their first contribution in #2874
- @syedbarimanjan made their first contribution in #2880
- @sullivan- made their first contribution in #2887
- @mijicd made their first contribution in #2881
- @seakayone made their first contribution in #2862
- @masonedmison made their first contribution in #2872
Full Changelog: v3.0.0-RC8...v3.0.0-RC9
v3.0.0-RC8
What's Changed
- Fix response compression for static files by @kyri-petrou in #2856
- Update README.md by @github-actions in #2858
- Avoid unsafely running effects when handling WS requests by @kyri-petrou in #2852
- Update dependencies and fix warnings by @kyri-petrou in #2853
- Fix client proxy closing connection prematurely by @kyri-petrou in #2861
- Fix connection pooled client timeouts by @kyri-petrou in #2860
- Documentation of Key Features of ZIO HTTP by @khajavi in #2825
- remove unused parameter by @mberndt123 in #2849
- Add brotli compression (#2646) by @987Nabil in #2857
- Update README.md by @github-actions in #2863
- [gen] fix for codegen of sumtypes with reusable fields by @hochgi in #2850
- Remove silencer by @987Nabil in #2866
- Update zio-schema to 1.2.0 by @987Nabil in #2867
- [gen] fix codegen to reference subtypes nested with their encapsulating object when referenced directly by @hochgi in #2869
Full Changelog: v3.0.0-RC7...v3.0.0-RC8
v3.0.0-RC7
What's Changed
- Documentation of Client by @khajavi in #2723
- Update path regex to support RFC1738 safe chars and properly escape forward slash by @russwyte in #2762
- add
Config
instance forURL
by @mberndt123 in #2772 - Update slf4j-api, slf4j-simple to 2.0.13 by @scala-steward in #2770
- Update zio, zio-streams, zio-test, ... to 2.0.22 by @scala-steward in #2768
- Mark
application/json
as NotBinary (#2752) by @guersam in #2764 - Documentation of Middleware and HandlerAspect by @khajavi in #2757
- Update scalafmt-core, scalafmt-dynamic to 3.8.1 by @scala-steward in #2754
- Update sbt-shading to 2.1.4 by @scala-steward in #2739
- Update sbt-scalajs, scalajs-compiler, ... to 1.16.0 by @scala-steward in #2736
- Update client3:core to 3.9.5 by @scala-steward in #2735
- introduce multipart/mixed support by @eyalfa in #2765
- Add the
Date
header to responses by default by @kyri-petrou in #2773 - Update README.md by @github-actions in #2744
- Documentation of Endpoint API by @khajavi in #2741
- Use
fork
instead ofrunOrFork
in NettyRuntime by @kyri-petrou in #2782 - Explicit and customizable error messages for Endpoint BadRequest (#2650) by @987Nabil in #2714
- Provide HandlerAspect context via env instead of function param (#2488) by @987Nabil in #2778
- Implement client SSL certificates by @WesselVS in #2783
- Update Documentation of Overview Section by @khajavi in #2784
- fix doc mixup for ConcreteEntity.scala and CliExamples.scala by @YassineMEJRI in #2788
- rename enumValues to enum to comply with OSA 3 by @lachezar in #2787
- Showcase for Both Client and Server by @khajavi in #2775
- Documentation of Testing HTTP Applications by @khajavi in #2774
- Update README.md by @github-actions in #2790
- Documentation of BinaryCodecs by @khajavi in #2793
- Documentation: Reference Section on Sidebar by @khajavi in #2785
- Update zio-schema, zio-schema-json, ... to 1.1.1 by @scala-steward in #2794
- Fix streaming response compression by @kyri-petrou in #2798
- Deprecate HttpApp and remove internal usage. by @987Nabil in #2791
- Avoid providing the ZEnvironment on very request by @kyri-petrou in #2800
- breaking: Make
Root
aPathCodec
, removeEmpty
by @erikvanoosten in #2796 - Documentation of FAQ Page by @khajavi in #2795
- Use current runtime when initializing AppRef by @kyri-petrou in #2807
- Cleanup Documentation by @khajavi in #2797
- Add
context
method to request context by @987Nabil in #2799 - Documentation: "Tutorials section >> docs" by @daveads in #2806
- Add tests to check if the ZIO Runtime is propagated to req execution by @kyri-petrou in #2809
- Update zio-config, zio-config-typesafe to 4.0.2 by @scala-steward in #2820
- Update README.md by @github-actions in #2802
- Enable Framework Benchmark Workflow by @khajavi in #2830
- Guide: How to Integrate ZIO HTTP with ZIO Config by @khajavi in #2810
- Prune the environment when installing an app by @kyri-petrou in #2833
- Simplify running ZIO effects by @kyri-petrou in #2828
- Code generator for protobuf specification by @pablf in #2814
- Fix gen schema with scala keywords as fields by @hochgi in #2839
- [ZClient] Unsafely fulfil promises to avoid race conditions by @kyri-petrou in #2843
- Ignore - Testing CI by @kyri-petrou in #2844
- Attempt fix to
StreamingForm
blocking due tounsafe.run
by @kyri-petrou in #2845 - Run Benchmark Tests Only for Pull Request Events by @khajavi in #2842
- apply more configuration parameters in WebSocketClientProtocolConfig by @mberndt123 in #2846
- Migrate scala-steward to use the ZIO org bot credentials by @guizmaii in #2834
- Documentation of HttpCodecs by @khajavi in #2824
- Diagrams for ProtocolStack, HandlerAspect and Middleware by @khajavi in #2826
- Add routes#serve method by @GrigoriiBerezin in #2829
- Update zio-sbt-website to 0.4.0-alpha.26 by @scala-steward in #2832
New Contributors
- @russwyte made their first contribution in #2762
- @mberndt123 made their first contribution in #2772
- @eyalfa made their first contribution in #2765
- @github-actions made their first contribution in #2744
- @WesselVS made their first contribution in #2783
- @YassineMEJRI made their first contribution in #2788
- @lachezar made their first contribution in #2787
- @daveads made their first contribution in #2806
- @hochgi made their first contribution in #2839
- @GrigoriiBerezin made their first contribution in #2829
Full Changelog: v3.0.0-RC6...v3.0.0-RC7
v3.0.0-RC6
What's Changed
- fix: use @casename annotations for openapi enums by @runtologist in #2544
- feat: Allow dynamic schema in openapi by @runtologist in #2543
- Error handling methods on
Route
/Routes
that can accessRequest
by @987Nabil in #2546 - Support URL relative resolution, and use it in a ZClientAspect to follow redirects by @jgulotta in #2537
- Limit Scheme.Custom construction to calling decode by @987Nabil in #2533
- #2541 Fix bug where the OpenAPI generator fails to generate multiple methods for the same path. by @daharon in #2542
- Implement Routes#apply by @adamgfraser in #2550
- Add docs for serving static files by @zalbia in #2554
- Implement Routes#run and Route#run by @adamgfraser in #2552
- Middleware for adding swagger ui endpoint (#2494) by @987Nabil in #2556
- Don't flatten nested case classes for JsonSchema by @987Nabil in #2558
- Add transform methods on
Endpoint
, for input, output and errors by @987Nabil in #2551 - sourcing maxInitialLineLength through the config and propagating it to netty's configuration by @hdriviere in #2561
- Add prefix method to
Route
/Routes
by @987Nabil in #2547 - OpenAPI to Endpoint code gen (#1520) by @987Nabil in #2562
- Update scala versions by @vigoo in #2530
- chore: support mtls settings by @rajcspsg in #2443
- Add Flash, Flash.Message and Flash.Backend by @TomTriple in #2481
- Allow HandlerAspect.customAuthProvidingZIO To Fail With User Specified Response by @adamgfraser in #2493
- CodeGenSpec is flaky by @vigoo in #2564
- Add description and client code to websocket example (#1418) by @987Nabil in #2567
- add mapError and mapErrorZIO to Routes and Route by @yisraelU in #2568
- add methods to update the body of a request by @yisraelU in #2571
- feat: OpenAPI allow non-nominal cases in enum by @runtologist in #2578
- Allow creating a body from
Array[Byte]
by @kyri-petrou in #2581 - Content-Length, chunked transfer encoding and Host header improvements by @vigoo in #2563
- Add missing method to ArrayBody by @vigoo in #2585
- Optimize RichTextCodec by @kyri-petrou in #2597
- Schema based ops for en- and decoding bodies by @987Nabil in #2569
- Add missing default http headers (#2557) by @987Nabil in #2595
- Use
zio.Config.Secret
instead ofString
to avoid leaks (#2508) by @987Nabil in #2593 - Handle defects in handled routes (#2580) by @987Nabil in #2596
- Fix hanging on stream response errors by @kyri-petrou in #2599
- Only Handlers with Request input can have HandlerAspects applied (#2527) by @987Nabil in #2600
- Update testkit to use common DSL (#2559) by @987Nabil in #2601
- Implement QueryParam ordering by @easel in #2591
- feat: htmx attributes by @neo773 in #2589
- Update zio-schema, zio-schema-json, ... to 0.4.17 by @scala-steward in #2613
- Reproducer and fix for multipart/form-data bug by @vigoo in #2468
- Fix Client hanging on unexpected Channel closures by @kyri-petrou in #2610
- Speedup test suite execution by @kyri-petrou in #2624
- Update sbt to 1.9.8 by @scala-steward in #2615
- Update slf4j-api, slf4j-simple to 2.0.11 by @scala-steward in #2616
- Update zio, zio-streams, zio-test, ... to 2.0.21 by @scala-steward in #2612
- Update sbt-github-actions to 0.22.0 by @scala-steward in #2611
- Fixed #2373: don't propagate ReadTimeoutExceptions by @ekhov in #2619
- Initial scala.js setup by @987Nabil in #2630
- Fallback to smaller priority Accept headers by @kyri-petrou in #2636
- chore: update project plugins by @ezhil56x in #2618
- Remove inactive contributor amitksingh1490 from CODEOWNERS by @987Nabil in #2642
- Fix #2622: don't remove 'val' from case classes' parameters with names containing 'val' in them by @ekhov in #2634
- Micro-optimizations and improved
IOException
error handling by @kyri-petrou in #2638 - Fix OpenAPI example extraction by @987Nabil in #2635
- OpenAPI code gen collections fix (#2620) by @987Nabil in #2643
- Avoid unnecessary parsing of
content-type
header inServerInboundHandler
by @kyri-petrou in #2644 - Intoroduce query parameters with multiple values to Endpoint API by @ekhov in #2631
- Try to read oneOf, before handling empty schema type as Object (#2623) by @987Nabil in #2657
- Update Examples by @khajavi in #2656
- Rename
Handler.response
toHandler.fromResponse
by @khajavi in #2664 - Add finalizer for Netty channels created via
NettyConnectionPool
by @kyri-petrou in #2663 - Only write non default values to OpenAPI Json (#2549) by @987Nabil in #2661
- HttpContentCodec - Customizable encoding for Endpoint API by @987Nabil in #2655
- Simplify style attributes by @johnspade in #2675
- Improve performance & memory usage of
asMultipartFormStream
by @kyri-petrou in #2674 - QueryOps by @987Nabil in #2671
- OpenAPI: Don't generate request body, if it would be the null schema by @987Nabil in #2672
- Flaky JS Test by @987Nabil in #2670
- changed test site from google.com to example.com by @urbit-pilled in #2669
- Update slf4j-api, slf4j-simple to 2.0.12 by @scala-steward in #2665
- Snippet Utils: Handle Exceptions When Running Docs Commands on The Root Project by @khajavi in #2687
- Remove README Check on Build Phase by @khajavi in #2688
- Skip Publishing Jar Files for Documentation Project by @khajavi in #2690
- Enable Live Reload Docs by @khajavi in #2686
- Handler Documentation by @khajavi in #2689
- Request Documentation by @khajavi in #2692
- Response Documentation by @khajavi in #2696
- Documentation of Body Data Type by @khajavi in #2703
- fix: CodeGen should render UUID primitive type by @runtologist in #2709
- Documentation of Form and FormField by @khajavi in #2710
- feature: added Server Logging by @guptadeepak8 in #2649
- Documentation of Headers by @khajavi in #2711
- Documentation of Cookies by @khajavi in #2712
- feat: load scalaFmt only once by @runtologist in #2717
- Documentation of Routes, RoutePattern and PathCodec by @khajavi in #2720
- Documentation of Flash Messages by @khajavi in #2719
- feat: Proper imports for generated openapi code by @runtologist in #2718
- OpenAPI: Don't generate request body, if it would be the Annotated null schema by by @Petter-K in #2743
- Bump zio-schema to 1.0.1 and remove snapshot resolver by @guersam in #2730
- Update Path for Request Data Type by @khajavi in #2758
- Fix usage of
Accept */*
headers in endpoint API (#2699) by @987Nabil in #2760 - Update zio-schema to 1.1.0 by @987Nabil in #2761
- Documentation of ProtocolStack by @khajavi in #2756
- fix: added jsonplaceholder link by @guptadeepak8 in #2667
- Fix :Add raw in Html object by @guptadeepak8 in https:/...
v3.0.0-RC5
What's Changed
- fix: use @casename annotations for openapi enums by @runtologist in #2544
- feat: Allow dynamic schema in openapi by @runtologist in #2543
- Error handling methods on
Route
/Routes
that can accessRequest
by @987Nabil in #2546 - Support URL relative resolution, and use it in a ZClientAspect to follow redirects by @jgulotta in #2537
- Limit Scheme.Custom construction to calling decode by @987Nabil in #2533
- #2541 Fix bug where the OpenAPI generator fails to generate multiple methods for the same path. by @daharon in #2542
- Implement Routes#apply by @adamgfraser in #2550
- Add docs for serving static files by @zalbia in #2554
- Implement Routes#run and Route#run by @adamgfraser in #2552
- Middleware for adding swagger ui endpoint (#2494) by @987Nabil in #2556
- Don't flatten nested case classes for JsonSchema by @987Nabil in #2558
- Add transform methods on
Endpoint
, for input, output and errors by @987Nabil in #2551 - sourcing maxInitialLineLength through the config and propagating it to netty's configuration by @hdriviere in #2561
- Add prefix method to
Route
/Routes
by @987Nabil in #2547 - OpenAPI to Endpoint code gen (#1520) by @987Nabil in #2562
- Update scala versions by @vigoo in #2530
- chore: support mtls settings by @rajcspsg in #2443
- Add Flash, Flash.Message and Flash.Backend by @TomTriple in #2481
- Allow HandlerAspect.customAuthProvidingZIO To Fail With User Specified Response by @adamgfraser in #2493
- CodeGenSpec is flaky by @vigoo in #2564
- Add description and client code to websocket example (#1418) by @987Nabil in #2567
- add mapError and mapErrorZIO to Routes and Route by @yisraelU in #2568
- add methods to update the body of a request by @yisraelU in #2571
- feat: OpenAPI allow non-nominal cases in enum by @runtologist in #2578
- Allow creating a body from
Array[Byte]
by @kyri-petrou in #2581 - Content-Length, chunked transfer encoding and Host header improvements by @vigoo in #2563
- Add missing method to ArrayBody by @vigoo in #2585
- Optimize RichTextCodec by @kyri-petrou in #2597
- Schema based ops for en- and decoding bodies by @987Nabil in #2569
- Add missing default http headers (#2557) by @987Nabil in #2595
- Use
zio.Config.Secret
instead ofString
to avoid leaks (#2508) by @987Nabil in #2593 - Handle defects in handled routes (#2580) by @987Nabil in #2596
- Fix hanging on stream response errors by @kyri-petrou in #2599
- Only Handlers with Request input can have HandlerAspects applied (#2527) by @987Nabil in #2600
- Update testkit to use common DSL (#2559) by @987Nabil in #2601
- Implement QueryParam ordering by @easel in #2591
- feat: htmx attributes by @neo773 in #2589
- Update zio-schema, zio-schema-json, ... to 0.4.17 by @scala-steward in #2613
- Reproducer and fix for multipart/form-data bug by @vigoo in #2468
- Fix Client hanging on unexpected Channel closures by @kyri-petrou in #2610
- Speedup test suite execution by @kyri-petrou in #2624
- Update sbt to 1.9.8 by @scala-steward in #2615
- Update slf4j-api, slf4j-simple to 2.0.11 by @scala-steward in #2616
- Update zio, zio-streams, zio-test, ... to 2.0.21 by @scala-steward in #2612
- Update sbt-github-actions to 0.22.0 by @scala-steward in #2611
- Fixed #2373: don't propagate ReadTimeoutExceptions by @ekhov in #2619
- Initial scala.js setup by @987Nabil in #2630
- Fallback to smaller priority Accept headers by @kyri-petrou in #2636
- chore: update project plugins by @ezhil56x in #2618
- Remove inactive contributor amitksingh1490 from CODEOWNERS by @987Nabil in #2642
- Fix #2622: don't remove 'val' from case classes' parameters with names containing 'val' in them by @ekhov in #2634
- Micro-optimizations and improved
IOException
error handling by @kyri-petrou in #2638 - Fix OpenAPI example extraction by @987Nabil in #2635
- OpenAPI code gen collections fix (#2620) by @987Nabil in #2643
- Avoid unnecessary parsing of
content-type
header inServerInboundHandler
by @kyri-petrou in #2644 - Intoroduce query parameters with multiple values to Endpoint API by @ekhov in #2631
- Try to read oneOf, before handling empty schema type as Object (#2623) by @987Nabil in #2657
- Update Examples by @khajavi in #2656
- Rename
Handler.response
toHandler.fromResponse
by @khajavi in #2664 - Add finalizer for Netty channels created via
NettyConnectionPool
by @kyri-petrou in #2663 - Only write non default values to OpenAPI Json (#2549) by @987Nabil in #2661
- HttpContentCodec - Customizable encoding for Endpoint API by @987Nabil in #2655
- Simplify style attributes by @johnspade in #2675
- Improve performance & memory usage of
asMultipartFormStream
by @kyri-petrou in #2674 - QueryOps by @987Nabil in #2671
- OpenAPI: Don't generate request body, if it would be the null schema by @987Nabil in #2672
- Flaky JS Test by @987Nabil in #2670
- changed test site from google.com to example.com by @urbit-pilled in #2669
- Update slf4j-api, slf4j-simple to 2.0.12 by @scala-steward in #2665
- Snippet Utils: Handle Exceptions When Running Docs Commands on The Root Project by @khajavi in #2687
- Remove README Check on Build Phase by @khajavi in #2688
- Skip Publishing Jar Files for Documentation Project by @khajavi in #2690
- Enable Live Reload Docs by @khajavi in #2686
- Handler Documentation by @khajavi in #2689
- Request Documentation by @khajavi in #2692
- Response Documentation by @khajavi in #2696
- Documentation of Body Data Type by @khajavi in #2703
- fix: CodeGen should render UUID primitive type by @runtologist in #2709
- Documentation of Form and FormField by @khajavi in #2710
- feature: added Server Logging by @guptadeepak8 in #2649
- Documentation of Headers by @khajavi in #2711
- Documentation of Cookies by @khajavi in #2712
- feat: load scalaFmt only once by @runtologist in #2717
- Documentation of Routes, RoutePattern and PathCodec by @khajavi in #2720
- Documentation of Flash Messages by @khajavi in #2719
- feat: Proper imports for generated openapi code by @runtologist in #2718
New Contributors
- @jgulotta made their first contribution in #2537
- @daharon made their first contribution in #2542
- @zalbia made their first contribution in #2554
- @hdriviere made their first contribution in #2561
- @kyri-petrou made their first contribution in #2581
- @easel made their first contribution in #2591
- @neo773 made their first contribution in #2589
- @ekhov made their first contribution in #2619
- @ezhil56x made their first contribution in https://github.com/zio/zio-http/pull...
v3.0.0-RC4
What's Changed
- Trying to fix publishing by @vigoo in #2495
- CLI uses description annotation from zio-schema by @jorge-vasquez-2301 in #2499
- Update zio-schema, zio-schema-json, ... to 0.4.15 by @scala-steward in #2501
- Added getAs for QueryParams by @BanyMaciej in #2505
- Added getAs for QueryParams - errors enhancement by @BanyMaciej in #2510
- Fix: Middleware.StaticServe crashes on empty path by @runtologist in #2517
- Update netty-codec-http, ... to 4.1.101.Final by @scala-steward in #2516
- Update client3:core to 3.9.1 by @scala-steward in #2515
- Update zio, zio-streams, zio-test, ... to 2.0.19 by @scala-steward in #2511
- Add middlewares to add log annotations by @987Nabil in #2509
- RoutePattern.apply(Method, Path) by @nafg in #2503
- Update sbt to 1.9.7 by @scala-steward in #2497
- Implement handleErrorCauseZIO for executing ZIO effects on error by @SHSongs in #2513
- Update sbt-github-actions to 0.19.0 by @scala-steward in #2496
- Deactivate broken SSL test by @987Nabil in #2531
- Improve
RichTextCodec
decoding performance by @987Nabil in #2512 - Update scalafmt-core to 3.7.17 by @scala-steward in #2524
- Update netty-incubator-transport-native-io_uring to 0.0.24.Final by @scala-steward in #2523
- Update zio-schema, zio-schema-json, ... to 0.4.16 by @scala-steward in #2528
- Make type Scheme follow the specs by @FabioPinheiro in #2490
- fix: multipart header for streaming binary by @jgranstrom in #2534
- Improve OpenAPI model; Add OpenAPI generator for EndpointAPI (#1498) by @987Nabil in #2470
New Contributors
- @BanyMaciej made their first contribution in #2505
- @runtologist made their first contribution in #2517
- @nafg made their first contribution in #2503
- @FabioPinheiro made their first contribution in #2490
Full Changelog: v3.0.0-RC3...v3.0.0-RC4
v3.0.0-RC3
What's Changed
- Update README by @cacapouh in #2218
- Update sbt-header to 5.10.0 by @scala-steward in #2241
- Update tapir-http4s-server, ... to 1.5.1 by @scala-steward in #2234
- Update zio-schema, zio-schema-json to 0.4.12 by @scala-steward in #2236
- Fix forwarding async empty body by @vigoo in #2244
- link to updated g8 template by @TomTriple in #2133
- Shading of netty dependencies by @dkarlinsky in #2220
- netty-shading: actually use
enabled
inshadingSettings
by @dkarlinsky in #2250 - Update silencer-lib, silencer-lib_2.13.8, ... to 1.7.13 by @scala-steward in #2249
- Move Http.fromFileZIO to Handler. by @landlockedsurfer in #2239
- netty-shading: only enable ShadingPlugin if
publish.shaded
property is true by @dkarlinsky in #2251 - Scope Requests by @adamgfraser in #2252
- netty-shading: adding testing step by @dkarlinsky in #2253
- Update silencer-lib, silencer-lib_2.13.8, ... to 1.17.13 by @scala-steward in #2254
- Add
hasFormMultipartContentType
for checkingContent-Type: multipart/form-data
by @abcpro1 in #2256 - Fix error response logging and metrics by @vigoo in #2259
- Collapse ZIO HTTP Sidebar by @khajavi in #2248
- Upgrade Scala versions (and other stuff) by @jdegoes in #2264
- Significant usability and semantic improvements to ZClient / Client by @jdegoes in #2261
- feat: Allow Unknown AcceptEncoding by @ex0ns in #2258
- Send HTTP requests like GET /?p=1 instead of GET ?p=1 by @abcpro1 in #2271
- Fix #2245 by @vigoo in #2270
- Update scala-collection-compat to 2.11.0 by @scala-steward in #2267
- Update netty-codec-http, ... to 4.1.94.Final by @scala-steward in #2272
- Better handling of unknown/missing content types in multipart/form-data by @vigoo in #2273
- CLI: Fix
java.lang.UnsupportedOperationException: empty.reduceLeft
error by @guizmaii in #2299 - Update zio-schema, zio-schema-json to 0.4.13 by @scala-steward in #2310
- Routes by @jdegoes in #2277
- Add clearer instructions for making a simple HTTPS server for testing by @abcpro1 in #2269
- Fix path in client requests by @vigoo in #2316
- support a multipart body with explicitly set encodings by @flavienbert in #2301
- Implement Channel#sendAll by @adamgfraser in #2315
- Add Timeout by @adamgfraser in #2335
- Add required traces to the http package by @jaliss in #2326
- Add required traces to the package zio.http.netty by @gregor-rayman in #2322
- cancel HttpError by @jdegoes in #2319
- URL string interpolation macro by @vigoo in #2331
- Add traces to all effectful methods for zio.http.codec package by @zarinfam in #2317
- experiment with layer disconnect by @jdegoes in #2339
- Fix issue with websocket send by @vigoo in #2341
- Use Latest ZIO Snapshot by @adamgfraser in #2345
- WebSocket Improvements by @adamgfraser in #2358
- Add
Trace
s toendpoint
package by @paulpdaniels in #2332 - SocketApp refactoring, ability to provide custom websocket config by @vigoo in #2338
- Accept absolute url strings in request constructors by @vigoo in #2343
- Server inbound handler performance by @jaspervz in #2325
- Generalize the concept of metadata in
HttpCodec
by @987Nabil in #2363 - New Response model by @hbibel in #2348
- Tests Cleanup by @adamgfraser in #2379
- Update client3:core to 3.9.0 by @scala-steward in #2382
- Ignore Flaky Test by @adamgfraser in #2337
- Optimize (Halt | codec) by @vigoo in #2374
- Make header value computation in request logging lazy by @987Nabil in #2367
- Convert metrics from HandlerAspect to Middleware #2320 by @lookingformira in #2334
- Automatically validate request body using
Schema.validate
by @williamareynolds in #2360 - By default set client idle timeout by @erikvanoosten in #2371
- transform functions for PathCodec by @vigoo in #2376
Endpoint
api en-/decodes based on accept header by @987Nabil in #2366- Increase Endpoint test coverage by @danieletorelli in #2385
- Fix accept header handling by @vigoo in #2391
- lax environment requirement when transforming a Handler by @myazinn in #2390
- Multipart/from file impl. in CLI and test suite by @pablf in #2355
- Revert netty and update ZIO to stable by @vigoo in #2397
- Negative values support for TextCodec and SegmentCodec by @danieletorelli in #2393
- Fix Scoping Of Test Resources by @adamgfraser in #2407
- rename package from zio.http.html to zio.http.template to avoid ambiguity by @TomTriple in #2405
- small fixes in docs by @TomTriple in #2408
- Add traces to all effectful methods for zio.http package by @zarinfam in #2328
- change signature to allow type inference by @TomTriple in #2406
- cleanup and remove ServerTime by @TomTriple in #2413
- Refactor
Endpoint
test coverage by @wooster0 in #2389 - ZClient fast shutdown by @johnhungerford in #2410
- issue_2212 update client proxy settings by @rajcspsg in #2336
- Fix SSLSpec by @adamgfraser in #2415
- remove code by @TomTriple in #2414
- refactor: simplify empty check by @junghoon-vans in #2329
- simplify query param access by @TomTriple in #2419
- added mediaType parameters to Body methods by @Adriani-Furtado in #2323
- Update zio, zio-streams, zio-test, ... to 2.0.17 by @scala-steward in #2447
- memoized is not used by @TomTriple in #2429
- Update slf4j-api, slf4j-simple to 2.0.9 by @scala-steward in #2427
- Update sbt-github-actions to 0.16.0 by @scala-steward in #2425
- change signature to allow for type inference by @TomTriple in #2422
- add xss protection as default by @TomTriple in #2421
- Fix stream body delay 2 by @guersam in #2420
- Update scalafmt-core to 3.7.14 by @scala-steward in #2426
- Update sbt-jmh to 0.4.6 by @scala-steward in #2428
- align default values from HandlerAspect.redirect with Response.redirect by @TomTriple in #2432
- Fix stream delay 3 by @guersam in #2458
- Update netty-codec-http, ... to 4.1.98.Final by @scala-steward in #2456
- Do Not Continue Reading From Web Socket After Terminal Event by @adamgfraser in #2441
- Update Handler.scala by @ioleo in #2453
- Add missing traces to the http package by @jaliss in #2354
- add note regarding classical "redirect after post" situations by @TomTriple in #2434
- add flash scope by @TomTriple in #2451
- Update sbt-scala3-migrate to 0.6.1 by @scala-steward in #2435
- Update zio-schema, zio-schema-json, ... to 0.4.14 by @scala-steward in #2436
- Update sbt to 1.9.6 by @scala-steward in #2449
- use richtext codec for content type by @TomTriple in https...