From 6b0b6a6b3a63f6c655ad29faf5c1210a8890fb23 Mon Sep 17 00:00:00 2001 From: AymarN Date: Thu, 1 Aug 2024 13:38:45 -0400 Subject: [PATCH 1/3] I have changed line 35 of eslintrc.js based on the issue #313 --- .eslintrc.js | 2 +- public/data/getting-started-examples.json | 1 - .../instances/conditional-ok.json | 6 +- .../instances/enumerated-ok.json | 2 +- .../instances/regex-ok.json | 2 +- .../schemas/conditional.json | 64 +++++++++---------- .../schemas/default-extended.json | 2 +- .../schemas/enumerated.json | 2 +- .../schemas/regex.json | 6 +- 9 files changed, 43 insertions(+), 44 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 7f0300c6a..1949aa122 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -34,7 +34,7 @@ module.exports = { 'react/jsx-curly-spacing': ['error', { when: 'never', children: true }], indent: ['error', 2, { SwitchCase: 1 }], - 'linebreak-style': ['error', 'unix'], + 'linebreak-style': ['error', process.platform === 'win32' ? 'windows' : 'unix'], quotes: ['error', 'single'], 'jsx-quotes': ['error', 'prefer-single'], diff --git a/public/data/getting-started-examples.json b/public/data/getting-started-examples.json index b723ab71d..a81668868 100644 --- a/public/data/getting-started-examples.json +++ b/public/data/getting-started-examples.json @@ -80,5 +80,4 @@ } ] } - ] diff --git a/public/data/getting-started-examples/instances/conditional-ok.json b/public/data/getting-started-examples/instances/conditional-ok.json index 95e0d986b..b40af18e1 100644 --- a/public/data/getting-started-examples/instances/conditional-ok.json +++ b/public/data/getting-started-examples/instances/conditional-ok.json @@ -1,4 +1,4 @@ { - "isMember": true, - "membershipNumber": "1234567890" - } \ No newline at end of file + "isMember": true, + "membershipNumber": "1234567890" +} diff --git a/public/data/getting-started-examples/instances/enumerated-ok.json b/public/data/getting-started-examples/instances/enumerated-ok.json index 4ad5e5aed..8c5d84435 100644 --- a/public/data/getting-started-examples/instances/enumerated-ok.json +++ b/public/data/getting-started-examples/instances/enumerated-ok.json @@ -1,3 +1,3 @@ { "data": [1, 2, 3] -} \ No newline at end of file +} diff --git a/public/data/getting-started-examples/instances/regex-ok.json b/public/data/getting-started-examples/instances/regex-ok.json index 6255bcc09..21fc33f87 100644 --- a/public/data/getting-started-examples/instances/regex-ok.json +++ b/public/data/getting-started-examples/instances/regex-ok.json @@ -1,3 +1,3 @@ { "code": "ABC-123" -} \ No newline at end of file +} diff --git a/public/data/getting-started-examples/schemas/conditional.json b/public/data/getting-started-examples/schemas/conditional.json index 10c924c4f..eca41150b 100644 --- a/public/data/getting-started-examples/schemas/conditional.json +++ b/public/data/getting-started-examples/schemas/conditional.json @@ -1,39 +1,39 @@ { - "$id": "https://example.com/conditional-validation-if-else.schema.json", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "Conditional Validation with If-Else", - "type": "object", + "$id": "https://example.com/conditional-validation-if-else.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Conditional Validation with If-Else", + "type": "object", + "properties": { + "isMember": { + "type": "boolean" + }, + "membershipNumber": { + "type": "string" + } + }, + "required": ["isMember"], + "if": { "properties": { "isMember": { - "type": "boolean" - }, - "membershipNumber": { - "type": "string" + "const": true } - }, - "required": ["isMember"], - "if": { - "properties": { - "isMember": { - "const": true - } - } - }, - "then": { - "properties": { - "membershipNumber": { - "type": "string", - "minLength": 10, - "maxLength": 10 - } + } + }, + "then": { + "properties": { + "membershipNumber": { + "type": "string", + "minLength": 10, + "maxLength": 10 } - }, - "else": { - "properties": { - "membershipNumber": { - "type": "string", - "minLength": 15 - } + } + }, + "else": { + "properties": { + "membershipNumber": { + "type": "string", + "minLength": 15 } } - } \ No newline at end of file + } +} diff --git a/public/data/getting-started-examples/schemas/default-extended.json b/public/data/getting-started-examples/schemas/default-extended.json index 8ff9cc558..769c181b6 100644 --- a/public/data/getting-started-examples/schemas/default-extended.json +++ b/public/data/getting-started-examples/schemas/default-extended.json @@ -48,4 +48,4 @@ } }, "required": ["productId", "productName", "price"] -} \ No newline at end of file +} diff --git a/public/data/getting-started-examples/schemas/enumerated.json b/public/data/getting-started-examples/schemas/enumerated.json index c7e9e1588..4d335465b 100644 --- a/public/data/getting-started-examples/schemas/enumerated.json +++ b/public/data/getting-started-examples/schemas/enumerated.json @@ -8,4 +8,4 @@ "enum": [42, true, "hello", null, [1, 2, 3]] } } -} \ No newline at end of file +} diff --git a/public/data/getting-started-examples/schemas/regex.json b/public/data/getting-started-examples/schemas/regex.json index 7d23a0d87..665fed8b8 100644 --- a/public/data/getting-started-examples/schemas/regex.json +++ b/public/data/getting-started-examples/schemas/regex.json @@ -3,10 +3,10 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Regular Expression Pattern", "type": "object", - "properties": { - "code": { + "properties": { + "code": { "type": "string", "pattern": "^[A-Z]{3}-\\d{3}$" } } -} \ No newline at end of file +} From d031d974f1a254d74b569c58744451961902d08d Mon Sep 17 00:00:00 2001 From: AymarN Date: Tue, 6 Aug 2024 14:46:13 -0400 Subject: [PATCH 2/3] I removed all changes in the getting started examples --- .../getting-started-examples/instances/conditional-ok.json | 2 +- .../getting-started-examples/instances/enumerated-ok.json | 4 ++-- public/data/getting-started-examples/instances/regex-ok.json | 2 +- public/data/getting-started-examples/schemas/conditional.json | 2 +- .../getting-started-examples/schemas/default-extended.json | 2 +- public/data/getting-started-examples/schemas/enumerated.json | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/data/getting-started-examples/instances/conditional-ok.json b/public/data/getting-started-examples/instances/conditional-ok.json index b40af18e1..d6bbad11d 100644 --- a/public/data/getting-started-examples/instances/conditional-ok.json +++ b/public/data/getting-started-examples/instances/conditional-ok.json @@ -1,4 +1,4 @@ { "isMember": true, "membershipNumber": "1234567890" -} +} \ No newline at end of file diff --git a/public/data/getting-started-examples/instances/enumerated-ok.json b/public/data/getting-started-examples/instances/enumerated-ok.json index 8c5d84435..6255bcc09 100644 --- a/public/data/getting-started-examples/instances/enumerated-ok.json +++ b/public/data/getting-started-examples/instances/enumerated-ok.json @@ -1,3 +1,3 @@ { - "data": [1, 2, 3] -} + "code": "ABC-123" +} \ No newline at end of file diff --git a/public/data/getting-started-examples/instances/regex-ok.json b/public/data/getting-started-examples/instances/regex-ok.json index 21fc33f87..6255bcc09 100644 --- a/public/data/getting-started-examples/instances/regex-ok.json +++ b/public/data/getting-started-examples/instances/regex-ok.json @@ -1,3 +1,3 @@ { "code": "ABC-123" -} +} \ No newline at end of file diff --git a/public/data/getting-started-examples/schemas/conditional.json b/public/data/getting-started-examples/schemas/conditional.json index eca41150b..be1281a66 100644 --- a/public/data/getting-started-examples/schemas/conditional.json +++ b/public/data/getting-started-examples/schemas/conditional.json @@ -36,4 +36,4 @@ } } } -} +} \ No newline at end of file diff --git a/public/data/getting-started-examples/schemas/default-extended.json b/public/data/getting-started-examples/schemas/default-extended.json index 769c181b6..8ff9cc558 100644 --- a/public/data/getting-started-examples/schemas/default-extended.json +++ b/public/data/getting-started-examples/schemas/default-extended.json @@ -48,4 +48,4 @@ } }, "required": ["productId", "productName", "price"] -} +} \ No newline at end of file diff --git a/public/data/getting-started-examples/schemas/enumerated.json b/public/data/getting-started-examples/schemas/enumerated.json index 4d335465b..c7e9e1588 100644 --- a/public/data/getting-started-examples/schemas/enumerated.json +++ b/public/data/getting-started-examples/schemas/enumerated.json @@ -8,4 +8,4 @@ "enum": [42, true, "hello", null, [1, 2, 3]] } } -} +} \ No newline at end of file From 211982028a3ec080274b6aac935abf1f9383a82e Mon Sep 17 00:00:00 2001 From: AymarN Date: Wed, 7 Aug 2024 11:08:52 -0400 Subject: [PATCH 3/3] The changes in the getting started examples should be removed from this PR. --- .../data/getting-started-examples/instances/enumerated-ok.json | 2 +- public/data/getting-started-examples/instances/regex-ok.json | 2 +- .../data/getting-started-examples/schemas/default-extended.json | 2 +- public/data/getting-started-examples/schemas/enumerated.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/data/getting-started-examples/instances/enumerated-ok.json b/public/data/getting-started-examples/instances/enumerated-ok.json index 6255bcc09..4ad5e5aed 100644 --- a/public/data/getting-started-examples/instances/enumerated-ok.json +++ b/public/data/getting-started-examples/instances/enumerated-ok.json @@ -1,3 +1,3 @@ { - "code": "ABC-123" + "data": [1, 2, 3] } \ No newline at end of file diff --git a/public/data/getting-started-examples/instances/regex-ok.json b/public/data/getting-started-examples/instances/regex-ok.json index 6255bcc09..21fc33f87 100644 --- a/public/data/getting-started-examples/instances/regex-ok.json +++ b/public/data/getting-started-examples/instances/regex-ok.json @@ -1,3 +1,3 @@ { "code": "ABC-123" -} \ No newline at end of file +} diff --git a/public/data/getting-started-examples/schemas/default-extended.json b/public/data/getting-started-examples/schemas/default-extended.json index 8ff9cc558..769c181b6 100644 --- a/public/data/getting-started-examples/schemas/default-extended.json +++ b/public/data/getting-started-examples/schemas/default-extended.json @@ -48,4 +48,4 @@ } }, "required": ["productId", "productName", "price"] -} \ No newline at end of file +} diff --git a/public/data/getting-started-examples/schemas/enumerated.json b/public/data/getting-started-examples/schemas/enumerated.json index c7e9e1588..4d335465b 100644 --- a/public/data/getting-started-examples/schemas/enumerated.json +++ b/public/data/getting-started-examples/schemas/enumerated.json @@ -8,4 +8,4 @@ "enum": [42, true, "hello", null, [1, 2, 3]] } } -} \ No newline at end of file +}