@scalar/openapi-parser 0.25.5 → 0.25.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @scalar/openapi-parser
|
|
2
2
|
|
|
3
|
+
## 0.25.7
|
|
4
|
+
|
|
5
|
+
## 0.25.6
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#8520](https://github.com/scalar/scalar/pull/8520): Normalize trailing `+` in path template parameter names during path-parameter validation so `{name+}` matches a declared `name` path parameter.
|
|
10
|
+
|
|
3
11
|
## 0.25.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -57,7 +57,10 @@ export function validatePathParameters(specification) {
|
|
|
57
57
|
return deduplicateErrors(errors);
|
|
58
58
|
}
|
|
59
59
|
function getTemplateParameterNames(pathName) {
|
|
60
|
-
return [...pathName.matchAll(PATH_PARAMETER_PATTERN)].map((match) => match[1]);
|
|
60
|
+
return [...pathName.matchAll(PATH_PARAMETER_PATTERN)].map((match) => normalizeTemplateParameterName(match[1]));
|
|
61
|
+
}
|
|
62
|
+
function normalizeTemplateParameterName(name) {
|
|
63
|
+
return name.endsWith('+') ? name.slice(0, -1) : name;
|
|
61
64
|
}
|
|
62
65
|
function getPathParameters(parameters, pathPrefix) {
|
|
63
66
|
if (!Array.isArray(parameters)) {
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"parser",
|
|
18
18
|
"typescript"
|
|
19
19
|
],
|
|
20
|
-
"version": "0.25.
|
|
20
|
+
"version": "0.25.7",
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=22"
|
|
23
23
|
},
|
|
@@ -55,16 +55,16 @@
|
|
|
55
55
|
"leven": "^4.0.0",
|
|
56
56
|
"yaml": "^2.8.0",
|
|
57
57
|
"@scalar/helpers": "0.4.2",
|
|
58
|
-
"@scalar/openapi-types": "0.6.1",
|
|
59
58
|
"@scalar/json-magic": "0.12.4",
|
|
60
|
-
"@scalar/openapi-upgrader": "0.2.
|
|
59
|
+
"@scalar/openapi-upgrader": "0.2.3",
|
|
60
|
+
"@scalar/openapi-types": "0.6.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@apidevtools/swagger-parser": "10.1.0",
|
|
64
64
|
"@types/node": "^24.1.0",
|
|
65
65
|
"just-diff": "^6.0.2",
|
|
66
66
|
"vite": "8.0.0",
|
|
67
|
-
"@scalar/types": "0.7.
|
|
67
|
+
"@scalar/types": "0.7.5"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|