Skip to content

v0.19.0

Choose a tag to compare

@github-actions github-actions released this 22 Jul 20:55
· 505 commits to master since this release

Minor Changes

  • ff37dfc: Multiple responses, response headers, client input type fixes.

    This release allows to specify different status codes to return different responses and headers.

    const api = pipe(
      Http.api(),
      Http.post("hello", "/hello", {
        response: [
          {
            status: 201,
            content: Schema.number,
          },
          {
            status: 200,
            content: Schema.number,
            headers: {
              "X-Another-200": Schema.NumberFromString,
            },
          },
          {
            status: 204,
            headers: { "X-Another": Schema.string },
          },
        ],
      }),
    );

    Specified response combinations are propagated to the OpenApi.

    The generated client in case of multiple responses returns an
    object { status, content, headers }, the proper union type is
    generated in that case.

  • dbe343f: Derivation of ResponseUtil object.

Patch Changes