1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-28 17:55:15 +02:00
unleash.unleash/src/lib/openapi/spec/__snapshots__/feature-type-schema.test.ts.snap
Thomas Heartman 80cf27476b
openapi: enable allErrors and update snapshots (#3622)
## What

This PR changes our AJV configuration to return all errors it finds with
a schema instead of stopping at the first one.

Because of this, a number of the snapshot tests that we have must be
updated.

## Why

DX! As someone using an API: if I send a faulty request, I'd rather have
the API tell me about the five things that are wrong than for me to
learn about one thing, send a new request, learn about another thing,
send a new request, .... etc.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-04-28 12:56:00 +00:00

46 lines
1.0 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`featureTypeSchema empty 1`] = `
{
"errors": [
{
"instancePath": "",
"keyword": "required",
"message": "must have required property 'id'",
"params": {
"missingProperty": "id",
},
"schemaPath": "#/required",
},
{
"instancePath": "",
"keyword": "required",
"message": "must have required property 'name'",
"params": {
"missingProperty": "name",
},
"schemaPath": "#/required",
},
{
"instancePath": "",
"keyword": "required",
"message": "must have required property 'description'",
"params": {
"missingProperty": "description",
},
"schemaPath": "#/required",
},
{
"instancePath": "",
"keyword": "required",
"message": "must have required property 'lifetimeDays'",
"params": {
"missingProperty": "lifetimeDays",
},
"schemaPath": "#/required",
},
],
"schema": "#/components/schemas/featureTypeSchema",
}
`;