diff --git a/src/lib/openapi/spec/__snapshots__/api-token-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/api-token-schema.test.ts.snap index d1a3a22ec0..73ad1ac84a 100644 --- a/src/lib/openapi/spec/__snapshots__/api-token-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/api-token-schema.test.ts.snap @@ -12,51 +12,6 @@ exports[`apiTokenSchema empty 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'tokenName'", - "params": { - "missingProperty": "tokenName", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'type'", - "params": { - "missingProperty": "type", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'project'", - "params": { - "missingProperty": "project", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'projects'", - "params": { - "missingProperty": "projects", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'createdAt'", - "params": { - "missingProperty": "createdAt", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/apiTokenSchema", } diff --git a/src/lib/openapi/spec/__snapshots__/change-password-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/change-password-schema.test.ts.snap index bf2b1f238d..aca3944d34 100644 --- a/src/lib/openapi/spec/__snapshots__/change-password-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/change-password-schema.test.ts.snap @@ -12,15 +12,6 @@ exports[`changePasswordSchema empty 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'password'", - "params": { - "missingProperty": "password", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/changePasswordSchema", } diff --git a/src/lib/openapi/spec/__snapshots__/client-application-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/client-application-schema.test.ts.snap index 521b99ca9a..14692b1f35 100644 --- a/src/lib/openapi/spec/__snapshots__/client-application-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/client-application-schema.test.ts.snap @@ -12,33 +12,6 @@ exports[`clientApplicationSchema no fields 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'interval'", - "params": { - "missingProperty": "interval", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'started'", - "params": { - "missingProperty": "started", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'strategies'", - "params": { - "missingProperty": "strategies", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/clientApplicationSchema", } diff --git a/src/lib/openapi/spec/__snapshots__/client-features-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/client-features-schema.test.ts.snap index 81da2a5a08..c76a460bb4 100644 --- a/src/lib/openapi/spec/__snapshots__/client-features-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/client-features-schema.test.ts.snap @@ -12,15 +12,6 @@ exports[`clientFeaturesSchema no fields 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'features'", - "params": { - "missingProperty": "features", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/clientFeaturesSchema", } diff --git a/src/lib/openapi/spec/__snapshots__/feature-environment-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/feature-environment-schema.test.ts.snap index 9e26e1c162..16f81462c0 100644 --- a/src/lib/openapi/spec/__snapshots__/feature-environment-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/feature-environment-schema.test.ts.snap @@ -12,15 +12,6 @@ exports[`featureEnvironmentSchema empty 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'enabled'", - "params": { - "missingProperty": "enabled", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/featureEnvironmentSchema", } diff --git a/src/lib/openapi/spec/__snapshots__/feature-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/feature-schema.test.ts.snap index be88a656bf..16321b74e4 100644 --- a/src/lib/openapi/spec/__snapshots__/feature-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/feature-schema.test.ts.snap @@ -34,15 +34,6 @@ exports[`featureSchema variant override values must be an array 1`] = ` }, "schemaPath": "#/properties/payload/properties/type/enum", }, - { - "instancePath": "/variants/0/overrides/0/values", - "keyword": "type", - "message": "must be array", - "params": { - "type": "array", - }, - "schemaPath": "#/components/schemas/overrideSchema/properties/values/type", - }, ], "schema": "#/components/schemas/featureSchema", } diff --git a/src/lib/openapi/spec/__snapshots__/feature-type-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/feature-type-schema.test.ts.snap index 4291101757..1c0caf3f72 100644 --- a/src/lib/openapi/spec/__snapshots__/feature-type-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/feature-type-schema.test.ts.snap @@ -12,33 +12,6 @@ exports[`featureTypeSchema empty 1`] = ` }, "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", } diff --git a/src/lib/openapi/spec/__snapshots__/me-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/me-schema.test.ts.snap index 842d5ad390..8aa2c3b240 100644 --- a/src/lib/openapi/spec/__snapshots__/me-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/me-schema.test.ts.snap @@ -12,33 +12,6 @@ exports[`meSchema empty 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'permissions'", - "params": { - "missingProperty": "permissions", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'feedback'", - "params": { - "missingProperty": "feedback", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'splash'", - "params": { - "missingProperty": "splash", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/meSchema", } @@ -56,24 +29,6 @@ exports[`meSchema missing permissions 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'feedback'", - "params": { - "missingProperty": "feedback", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'splash'", - "params": { - "missingProperty": "splash", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/meSchema", } diff --git a/src/lib/openapi/spec/__snapshots__/role-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/role-schema.test.ts.snap index 16e917d8e9..0a0d9c868f 100644 --- a/src/lib/openapi/spec/__snapshots__/role-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/role-schema.test.ts.snap @@ -12,24 +12,6 @@ exports[`roleSchema 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'type'", - "params": { - "missingProperty": "type", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'name'", - "params": { - "missingProperty": "name", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/roleSchema", } diff --git a/src/lib/openapi/spec/__snapshots__/set-strategy-sort-order-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/set-strategy-sort-order-schema.test.ts.snap index e28008e55b..bbf7b10369 100644 --- a/src/lib/openapi/spec/__snapshots__/set-strategy-sort-order-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/set-strategy-sort-order-schema.test.ts.snap @@ -12,15 +12,6 @@ exports[`setStrategySortOrderSchema missing id 1`] = ` }, "schemaPath": "#/items/required", }, - { - "instancePath": "/1", - "keyword": "required", - "message": "must have required property 'id'", - "params": { - "missingProperty": "id", - }, - "schemaPath": "#/items/required", - }, ], "schema": "#/components/schemas/setStrategySortOrderSchema", } diff --git a/src/lib/openapi/spec/__snapshots__/strategy-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/strategy-schema.test.ts.snap index e54253404d..9d6432203a 100644 --- a/src/lib/openapi/spec/__snapshots__/strategy-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/strategy-schema.test.ts.snap @@ -12,51 +12,6 @@ exports[`strategySchema 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'displayName'", - "params": { - "missingProperty": "displayName", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'description'", - "params": { - "missingProperty": "description", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'editable'", - "params": { - "missingProperty": "editable", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'deprecated'", - "params": { - "missingProperty": "deprecated", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'parameters'", - "params": { - "missingProperty": "parameters", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/strategySchema", } diff --git a/src/lib/openapi/spec/__snapshots__/token-user-schema.test.ts.snap b/src/lib/openapi/spec/__snapshots__/token-user-schema.test.ts.snap index e0a4f10e1b..60e82e687c 100644 --- a/src/lib/openapi/spec/__snapshots__/token-user-schema.test.ts.snap +++ b/src/lib/openapi/spec/__snapshots__/token-user-schema.test.ts.snap @@ -12,42 +12,6 @@ exports[`tokenUserSchema 1`] = ` }, "schemaPath": "#/required", }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'email'", - "params": { - "missingProperty": "email", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'token'", - "params": { - "missingProperty": "token", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'createdBy'", - "params": { - "missingProperty": "createdBy", - }, - "schemaPath": "#/required", - }, - { - "instancePath": "", - "keyword": "required", - "message": "must have required property 'role'", - "params": { - "missingProperty": "role", - }, - "schemaPath": "#/required", - }, ], "schema": "#/components/schemas/tokenUserSchema", } diff --git a/src/lib/openapi/validate.ts b/src/lib/openapi/validate.ts index 1df2ab0d02..35f98938ad 100644 --- a/src/lib/openapi/validate.ts +++ b/src/lib/openapi/validate.ts @@ -18,7 +18,6 @@ const ajv = new Ajv({ 'date-time': true, uri: true, }, - allErrors: true, }); export const addAjvSchema = (schemaObjects: any[]): any => {