Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .changeset/const-is-a-value.md

This file was deleted.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# fiber

## 0.14.6

### Patch Changes

- [#81](https://github.com/MathiasWP/fiber/pull/81) [`a7def54`](https://github.com/MathiasWP/fiber/commit/a7def5409481d34d62178de1de3f50303ae0fd81) Thanks [@MathiasWP](https://github.com/MathiasWP)! - Read `const` when building a body from a schema.

OpenAPI 3.1 uses JSON Schema 2020-12, where a literal is written as `const` and a literal union as `anyOf: [{const: "once"}, {const: "always"}]`. That is what 3.1 generators emit where 3.0 would have written an `enum`. Fiber read `example`, `default` and `enum`, but not `const` — so it walked into the first branch, found nothing to go on, and printed the `string` placeholder for a field whose only legal values were named right there. Sending that body back got it rejected by the very document it came from.

One real spec this was found against writes 543 `const`s and not a single `enum`, so the existing `enum` handling never fired once across 658 paths. A `const` is now taken as the value it names, in request skeletons and in form fields alike.

## 0.14.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fiber",
"private": true,
"version": "0.14.5",
"version": "0.14.6",
"type": "module",
"packageManager": "pnpm@11.22.0",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fiber"
version = "0.14.5"
version = "0.14.6"
description = "A local-first API client"
authors = ["Mathias Picker"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "Fiber",
"version": "0.14.5",
"version": "0.14.6",
"identifier": "dev.fiber.app",
"build": {
"frontendDist": "../build",
Expand Down