Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: make pattern and patternProperties unicode ECMA-262 compliant #145

Merged
merged 2 commits into from
Jan 13, 2022
Merged
Changes from 1 commit
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
66 changes: 33 additions & 33 deletions schemas/2.3.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Hmmm 🤔

I guess the problem is because it is inside a matching list [...] 🤔

Otherwise I guess we needed to do: "^x\\x2d[\\w\\d\\.\\x2d_]+$": {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you guessed correctly. It is because that - is inside a list.

"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -80,7 +80,7 @@
],
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -131,7 +131,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
}
Expand All @@ -154,7 +154,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
}
Expand All @@ -168,7 +168,7 @@
],
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -211,7 +211,7 @@
"description": "An object representing a Server Variable for server URL template substitution.",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -253,7 +253,7 @@
"description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -363,7 +363,7 @@
},
{
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -469,7 +469,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
}
Expand All @@ -478,7 +478,7 @@
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -522,7 +522,7 @@
"parameter": {
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand All @@ -537,7 +537,7 @@
"location": {
"type": "string",
"description": "A runtime expression that specifies the location of the parameter value",
"pattern": "^\\$message\\.(header|payload)\\#(\\/(([^\\/~])|(~[01]))*)*"
"pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"
},
"$ref": {
"$ref": "#/definitions/ReferenceObject"
Expand All @@ -548,7 +548,7 @@
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -638,7 +638,7 @@
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -799,7 +799,7 @@
],
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand All @@ -811,7 +811,7 @@
"location": {
"type": "string",
"description": "A runtime expression that specifies the location of the correlation ID",
"pattern": "^\\$message\\.(header|payload)\\#(\\/(([^\\/~])|(~[01]))*)*"
"pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*"
}
}
},
Expand All @@ -838,7 +838,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
}
Expand All @@ -847,7 +847,7 @@
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -880,7 +880,7 @@
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -1000,7 +1000,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -1031,7 +1031,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand All @@ -1054,7 +1054,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand All @@ -1077,7 +1077,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand All @@ -1100,7 +1100,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -1151,7 +1151,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -1184,7 +1184,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -1220,7 +1220,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -1256,7 +1256,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand All @@ -1280,7 +1280,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand All @@ -1303,7 +1303,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -1407,7 +1407,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
}
Expand All @@ -1432,7 +1432,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down Expand Up @@ -1466,7 +1466,7 @@
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "#/definitions/specificationExtension"
}
},
Expand Down