From 0179c58cd2f9be5e0f5f30d2d159d74789eda200 Mon Sep 17 00:00:00 2001 From: Sebastien Dionne Date: Sat, 7 Oct 2023 15:54:33 -0400 Subject: [PATCH] fix typo and use singular --- packages/bruno-schema/src/collections/index.js | 4 ++-- packages/bruno-schema/src/collections/itemSchema.spec.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/bruno-schema/src/collections/index.js b/packages/bruno-schema/src/collections/index.js index 81cd2528b..337f0147b 100644 --- a/packages/bruno-schema/src/collections/index.js +++ b/packages/bruno-schema/src/collections/index.js @@ -123,7 +123,7 @@ const itemSchema = Yup.object({ uid: uidSchema, type: Yup.string().oneOf(['http-request', 'graphql-request', 'folder']).required('type is required'), seq: Yup.number().min(1), - name: Yup.string().min(1, 'name must be atleast 1 characters').required('name is required'), + name: Yup.string().min(1, 'name must be at least 1 character').required('name is required'), request: requestSchema.when('type', { is: (type) => ['http-request', 'graphql-request'].includes(type), then: (schema) => schema.required('request is required when item-type is request') @@ -138,7 +138,7 @@ const itemSchema = Yup.object({ const collectionSchema = Yup.object({ version: Yup.string().oneOf(['1']).required('version is required'), uid: uidSchema, - name: Yup.string().min(1, 'name must be atleast 1 characters').required('name is required'), + name: Yup.string().min(1, 'name must be at least 1 character').required('name is required'), items: Yup.array().of(itemSchema), activeEnvironmentUid: Yup.string() .length(21, 'activeEnvironmentUid must be 21 characters in length') diff --git a/packages/bruno-schema/src/collections/itemSchema.spec.js b/packages/bruno-schema/src/collections/itemSchema.spec.js index a949f3c2b..8c46bed2c 100644 --- a/packages/bruno-schema/src/collections/itemSchema.spec.js +++ b/packages/bruno-schema/src/collections/itemSchema.spec.js @@ -34,7 +34,7 @@ describe('Item Schema Validation', () => { return Promise.all([ expect(itemSchema.validate(item)).rejects.toEqual( - validationErrorWithMessages('name must be atleast 1 characters') + validationErrorWithMessages('name must be at least 1 character') ) ]); });