Skip to content

0.3.0

Choose a tag to compare

@alpheusmtx alpheusmtx released this 13 Aug 13:28
· 283 commits to main since this release

Breaking Changes

  • Support new standard

Migrating from 0.2.0 to 0.3.0

import {
    createJsonResponse,
} from "@jderjs/core";

const route = (): Response => {
    return createJsonResponse({
-       error: {
-           code: "parse",
-           field: "title",
-           message: "Invalid title",
-       },
+       errors: [
+           {
+               code: "parse",
+               path: ["json", "title"],
+               message: "Invalid title",
+           }
+       ],
    });
}