Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: updated regex for names to allow unicode characters #186

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions audit-resolve.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,19 @@
},
"1673|ml-testing-toolkit-shared-lib>lodash": {
"decision": "postpone",
"madeAt": 1631106466423
"madeAt": 1631197123764
},
"1674|jsdoc>underscore": {
"decision": "fix",
"madeAt": 1623168973716
},
"1675|postman-collection>sanitize-html": {
"decision": "postpone",
"madeAt": 1631106462461
"madeAt": 1631197120137
},
"1676|postman-collection>sanitize-html": {
"decision": "postpone",
"madeAt": 1631106462461
"madeAt": 1631197120137
},
"1677|npm-run-all>read-pkg>normalize-package-data>hosted-git-info": {
"decision": "postpone",
Expand Down Expand Up @@ -498,7 +498,7 @@
},
"1681|json-ref-lite>property-expr": {
"decision": "postpone",
"madeAt": 1631106467008
"madeAt": 1631197125482
},
"1693|postman-collection>sanitize-html>postcss": {
"decision": "postpone",
Expand Down
316 changes: 184 additions & 132 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "ml-testing-toolkit",
"description": "Testing Toolkit for Mojaloop implementations",
"version": "13.3.0",
"version": "13.3.1",
"license": "Apache-2.0",
"author": "Vijaya Kumar Guthi, ModusBox Inc. ",
"contributors": [
"Georgi Logodazhki <georgi.logodazhki@modusbox.com>",
"Sam Kummary <sam@modusbox.com>",
"Steven Oderayi <steven.oderayi@modusbox.com>",
"Vijay Kumar <vijaya.guthi@modusbox.com>"
],
Expand Down Expand Up @@ -101,7 +102,7 @@
"node-dir": "0.1.17",
"node-strings": "^1.0.2",
"npm-run-all": "4.1.5",
"openapi-backend": "3.5.2",
"openapi-backend": "4.2.0",
"parse-strings-in-object": "1.2.0",
"passport": "0.4.1",
"passport-jwt": "4.0.0",
Expand Down
16 changes: 8 additions & 8 deletions postman/mojaloop-pdp-testing-tool.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
" var jsonData = pm.response.json();",
" pm.expect(jsonData.errorInformation.errorCode).to.equal('3100')",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='keyword').value).to.equal('required');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='dataPath').value).to.equal('.requestBody');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='instancePath').value).to.equal('/requestBody');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='missingProperty').value).to.equal('quoteId');",
" });",
" });",
Expand Down Expand Up @@ -280,7 +280,7 @@
" pm.test(\"Check for error message is relevant\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='keyword').value).to.equal('required');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='dataPath').value).to.equal('.header');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='instancePath').value).to.equal('/header');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='missingProperty').value).to.equal('fspiop-source');",
" });",
" });",
Expand Down Expand Up @@ -363,7 +363,7 @@
" pm.test(\"Check for error message is relevant\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='keyword').value).to.equal('type');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='dataPath').value).to.equal('.requestBody.quoteId');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='instancePath').value).to.equal('/requestBody/quoteId');",
" });",
" });",
" ",
Expand Down Expand Up @@ -818,7 +818,7 @@
" var jsonData = pm.response.json();",
" pm.expect(jsonData.errorInformation.errorCode).to.equal('3100')",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='keyword').value).to.equal('required');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='dataPath').value).to.equal('.requestBody');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='instancePath').value).to.equal('/requestBody');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='missingProperty').value).to.equal('transferId');",
" });",
" });",
Expand Down Expand Up @@ -928,7 +928,7 @@
" pm.test(\"Check for error message is relevant\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='keyword').value).to.equal('required');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='dataPath').value).to.equal('.header');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='instancePath').value).to.equal('/header');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='missingProperty').value).to.equal('date');",
" });",
" });",
Expand Down Expand Up @@ -1034,7 +1034,7 @@
" pm.test(\"Check for error message is relevant\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='keyword').value).to.equal('type');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='dataPath').value).to.equal('.requestBody.transferId');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='instancePath').value).to.equal('/requestBody/transferId');",
" });",
" });",
" ",
Expand Down Expand Up @@ -1309,7 +1309,7 @@
" var jsonData = pm.response.json();",
" pm.expect(jsonData.errorInformation.errorCode).to.equal('3100')",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='keyword').value).to.equal('required');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='dataPath').value).to.equal('.requestBody');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='instancePath').value).to.equal('/requestBody');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='missingProperty').value).to.equal('fspId');",
" });",
" });",
Expand Down Expand Up @@ -1396,7 +1396,7 @@
" pm.test(\"Check for error message is relevant\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='keyword').value).to.equal('required');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='dataPath').value).to.equal('.header');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='instancePath').value).to.equal('/header');",
" pm.expect(jsonData.errorInformation.extensionList.find(item => item.key=='missingProperty').value).to.equal('date');",
" });",
" });",
Expand Down
18 changes: 9 additions & 9 deletions spec_files/api_definitions/fspiop_1.0/api_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3206,7 +3206,7 @@ components:
type: string
minLength: 1
maxLength: 128
pattern: '^(?!\s*$)[\w .,''-]{1,128}$'
pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$'
description: First name of the Party (Name Type).
FspId:
title: FspId
Expand Down Expand Up @@ -3246,7 +3246,7 @@ components:
type: string
minLength: 1
maxLength: 128
pattern: '^(?!\s*$)[\w .,''-]{1,128}$'
pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$'
description: Last name of the Party (Name Type).
Latitude:
title: Latitude
Expand Down Expand Up @@ -3277,21 +3277,21 @@ components:
type: string
minLength: 1
maxLength: 128
pattern: '^(?!\s*$)[\w .,''-]{1,128}$'
pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$'
description: Middle name of the Party (Name Type).
Name:
title: Name
type: string
pattern: '^(?!\s*$)[\w .,''-]{1,128}$'
pattern: '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$'
description: >-
The API data type Name is a JSON String, restricted by a regular
expression to avoid characters which are generally not used in a name.
Regular Expression - The regular expression for restricting the Name
type is "^(?!\s*$)[\w .,'-]{1,128}$". The restriction does not allow a
string consisting of whitespace only, all Unicode characters are
allowed, as well as the period (.) (apostrophe (‘), dash (-), comma (,)
and space characters ( ). Note - In some programming languages, Unicode
support must be specifically enabled. For example, if Java is used the
type is '^(?!\s*$)[\p{L}\p{gc=Mark}\p{digit}\p{gc=Connector_Punctuation}\p{Join_Control} .,''-]{1,128}$'.
The restriction does not allow a string consisting of whitespace only,
all Unicode characters are allowed, as well as the period (.) (apostrophe (‘),
dash (-), comma (,)and space characters ( ). Note - In some programming languages,
Unicode support must be specifically enabled. For example, if Java is used the
flag UNICODE_CHARACTER_CLASS must be enabled to allow Unicode
characters.
Note:
Expand Down
Loading