Skip to content

4.0.0 - 2025-09-12

Choose a tag to compare

@github-actions github-actions released this 12 Sep 14:23

Release Notes

Migration guide

Highlights

4.0 is Slumber's largest release to date, with a number of exciting improvements to the collection format. The overall goal of this release is to make collection files:

  • Easier to read
  • Easier to write
  • Easier to share

This required a number of breaking changes. For upgrade instructions, see the Breaking section.

Goodbye chains, we won't miss you

Previously, templates could source dynamic data (such as data from other responses, files, commands, etc.) via chains. While powerful, they were annoying to use because you had to define your chain in one part of the collection file, then use it in another. This led to a lot of jumping around, which was especially annoying for a simple chain that only got used once. Additionally, chains were clunky and unintuitive to compose together. You could combine multiple chains together (hence the name), but it wasn't obvious how.

4.0 eliminates chains entirely, replacing them with functions directly in your templates, inspired by Jinja (but dramatically simplified). Here's a side-by-side comparison:

Before

chains:
  fish_ids:
    source: !request
      recipe: list_fish
      trigger: !expire 1d
    selector: $[0].id
    selector_mode: array
  fish_id:
    source: !select
      options: "{{fish_ids}}"

requests:
  list_fish:
    method: GET
    url: "{{host}}/fishes"
  get_fish:
    method: GET
    url: "{{host}}/fishes/{{fish_id}}"

After

requests:
  list_fish:
    method: GET
    url: "{{ host }}/fishes"
  get_fish:
    method: GET
    url: "{{ host }}/fishes/{{ response('fish_list', trigger='1d') | jsonpath('$[*].id', mode='array') | select() }}"

So much easier to follow!

See docs for more.

Share configuration between collection files with $ref

YAML merge syntax (<<: *alias) is no longer supported. Instead, the more flexible JSON reference ($ref) format is supported. This allows you to reuse any portion of the current collection without having to declare it as an alias. Even better though, you can import components from other files:

# slumber.yml
requests:
  login:
    $ref: "./common.yml#/requests/login"

See docs for more.

JSON Schema

Slumber now exports a JSON Schema for both its global config and request collection formats. This makes it possible to get validation and completion in your IDE. To make this possible we've ditched the YAML !tag syntax in favor of type fields within each block.

See docs for more.

Thanks to @anussell5559 for this suggestion.

Breaking

This release contains a number of breaking changes to the collection format. The major one is a change in the template format, but there are a few other quality of life improvements as well.

You can automatically migrate your collection to the new v4 format with:

slumber import v3 <old file> <new file>

The new collection should be equivalent to the old one, but you should keep your old version around just in case something broke. If you notice any differences, please file a bug!.

See the migration guide for more details

  • Replace template chains with a more intuitive function syntax
    • Instead of defining chains separately then referencing them in templates, you can now call functions directly in templates: {{ response('login') | jsonpath('$.token') }}
    • See docs for more
  • Remove YAML !tags in favor of an inner type field
    • This change makes the format compatible with JSON Schema
    • Impacts these collection nodes:
      • Authentication
      • Body
      • Folder/request nodes (type field not required at all; node type is inferred from the object structure)
  • Represent query parameters as a map of {parameter: value} instead of a list of strings like parameter=value
    • The map format has been supported as well, but did not allow for multiple values for the same value, hence the need for the string format
    • To define multiple values for the same value, you can now use a list associated to the parameter: {parameter: [value1, value2]}
    • See docs for examples of the new format
  • YAML anchor/alias/merge syntax has been replaced with $ref references, similar to OpenAPI #290
    • These references are much more flexible, including the ability to import from other files
    • See docs for examples
  • Commands in templates (previously !command, now command()) now fail if the command exits with a non-zero status code
  • Templates in a JSON body with a single dynamic chunk (such as {{ username }}) will now be unpacked into their inner value rather than always being stringified
    • This means you can now create dynamic non-string values within a JSON body
    • See docs for more

Install slumber 4.0.0

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/LucasPickering/slumber/releases/download/v4.0.0/slumber-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/LucasPickering/slumber/releases/download/v4.0.0/slumber-installer.ps1 | iex"

Install prebuilt binaries via Homebrew

brew install LucasPickering/tap/slumber

Download slumber 4.0.0

File Platform Checksum
slumber-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
slumber-x86_64-apple-darwin.tar.xz Intel macOS checksum
slumber-x86_64-pc-windows-msvc.zip x64 Windows checksum
slumber-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
slumber-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum