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
11 changes: 0 additions & 11 deletions .changeset/buy-the-validators.md

This file was deleted.

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

## 0.14.7

### Patch Changes

- [#83](https://github.com/MathiasWP/fiber/pull/83) [`5f8fde8`](https://github.com/MathiasWP/fiber/commit/5f8fde84220b5168a9a41ffe4884b9da7e8ba00d) Thanks [@MathiasWP](https://github.com/MathiasWP)! - Validate request bodies with Ajv, and read credential paths with real JSONPath.

Body linting was a hand-written walker over "a deliberately useful subset" of JSON Schema, and the subset was the problem: no `$ref`, no `minimum`, `pattern`, `uniqueItems`, `minLength`, `patternProperties`, `if`/`then` or `dependentSchemas`. All of those passed silently, so a body could be reported clean and still be rejected by the API that published the schema. Ajv is the reference implementation of what that walker was approximating.

What stays hand-written is the part that isn't JSON Schema: OpenAPI 3.0's `nullable`, folded into a union type, and `type` values that don't exist. One real 3.1 document arrives with `"type": "undefined"` 310 times alongside `emoji`, `icon`, `void` and `http` — Ajv rejects those at compile time, which would cost that schema all of its linting rather than one field's, so the invented names are dropped and every valid constraint beside them keeps working. Messages are unchanged, including the "must be number, not string" phrasing Ajv leaves out.

Credential paths now go through `serde_json_path`, so a capture rule can use `$..id_token` to find a token whose nesting depth you don't know, or `$.keys[?(@.active == true)].secret` to pick the entry that is current rather than pinning an index that moves. The dotted form every saved rule already uses keeps working: it isn't valid JSONPath — `$.data.tokens.0.value` needs `[0]` under RFC 9535 — so the query is tried first and the original walk answers for anything it rejects. A query matching several nodes reports nothing rather than picking arbitrarily.

## 0.14.6

### 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.6",
"version": "0.14.7",
"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.6"
version = "0.14.7"
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.6",
"version": "0.14.7",
"identifier": "dev.fiber.app",
"build": {
"frontendDist": "../build",
Expand Down