@usearazzo/runner 1.0.1-alpha.13 → 1.0.1-alpha.14
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 +6 -0
- package/dist/arazzo-runner.browser.js +28 -1
- package/dist/arazzo-runner.browser.min.js +1 -1
- package/package.json +4 -4
- package/src/document/ParameterIdentity.cjs +16 -0
- package/src/document/ParameterIdentity.mjs +16 -0
- package/src/resolver/OpenAPIOperationParameterResolver.cjs +12 -1
- package/src/resolver/OpenAPIOperationParameterResolver.mjs +12 -1
- package/types/runner.d.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.1-alpha.14](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.13...v1.0.1-alpha.14) (2026-10-27)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **runner:** reject a parameter location outside the defined set ([#283](https://github.com/usearazzo/arazzo-toolkit/issues/283)) ([250f6bf](https://github.com/usearazzo/arazzo-toolkit/commit/250f6bf6a23bbb8b2f305480dc3d728d419e3017)), closes [#126](https://github.com/usearazzo/arazzo-toolkit/issues/126)
|
|
11
|
+
|
|
6
12
|
## [1.0.1-alpha.13](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.12...v1.0.1-alpha.13) (2026-10-27)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
|
@@ -10805,6 +10805,14 @@ class ParameterIdentity {
|
|
|
10805
10805
|
if (location === undefined || (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isNullElement)(location)) return undefined;
|
|
10806
10806
|
return (0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(location) ? (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(location) : null;
|
|
10807
10807
|
}
|
|
10808
|
+
|
|
10809
|
+
/**
|
|
10810
|
+
* The locations the Parameter Object defines: Arazzo 1.0.1's closed set plus
|
|
10811
|
+
* 1.1.0's `querystring`. 1.0.0's field description also listed `body`, which
|
|
10812
|
+
* its own summary of locations did not; 1.0.1 removed it as an erratum, so it
|
|
10813
|
+
* is not a location in any version (a payload is the step's `requestBody`).
|
|
10814
|
+
*/
|
|
10815
|
+
static LOCATIONS = ['path', 'query', 'header', 'cookie', 'querystring'];
|
|
10808
10816
|
name;
|
|
10809
10817
|
location;
|
|
10810
10818
|
constructor(name, location) {
|
|
@@ -10812,6 +10820,14 @@ class ParameterIdentity {
|
|
|
10812
10820
|
this.location = location;
|
|
10813
10821
|
}
|
|
10814
10822
|
|
|
10823
|
+
/**
|
|
10824
|
+
* Whether the location is one the Parameter Object defines. An absent or
|
|
10825
|
+
* malformed location is not.
|
|
10826
|
+
*/
|
|
10827
|
+
get hasDefinedLocation() {
|
|
10828
|
+
return ParameterIdentity.LOCATIONS.includes(this.location);
|
|
10829
|
+
}
|
|
10830
|
+
|
|
10815
10831
|
/**
|
|
10816
10832
|
* Whether this and the other identity name the same parameter. A malformed
|
|
10817
10833
|
* location equals nothing, its own duplicate included.
|
|
@@ -16097,7 +16113,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16097
16113
|
* instead would let it capture *every* declared location of that name — see
|
|
16098
16114
|
* `ParameterDelivery` for the lookup order that makes it so. A
|
|
16099
16115
|
* non-string location throws for the same reason it deduplicates with nothing
|
|
16100
|
-
* in the normalizer: it names no location.
|
|
16116
|
+
* in the normalizer: it names no location. So does a location outside
|
|
16117
|
+
* `path`, `query`, `header`, `cookie` and `querystring`: Arazzo 1.0.1 removed
|
|
16118
|
+
* `in: body`, and forwarding one would let it still deliver a request body
|
|
16119
|
+
* against an OpenAPI 2.0 operation, bypassing the step's `requestBody`, while
|
|
16120
|
+
* an unknown location reaches nothing at all. And two *different* parameters the
|
|
16101
16121
|
* map reports as colliding cannot both be delivered, so a collision throws
|
|
16102
16122
|
* rather than silently dropping one — whether they collide on one key (the
|
|
16103
16123
|
* scheme is not injective: a `querystring` parameter named `header.token` and
|
|
@@ -16158,6 +16178,13 @@ class OpenAPIOperationParameterResolver extends _StepParameterResolver_ts__WEBPA
|
|
|
16158
16178
|
reason: 'malformed-location'
|
|
16159
16179
|
});
|
|
16160
16180
|
}
|
|
16181
|
+
if (!identity.hasDefinedLocation) {
|
|
16182
|
+
throw new _errors_ResolverError_ts__WEBPACK_IMPORTED_MODULE_4__["default"](`Parameter "${name}" has location "${location}", which is not one of ` + `${_document_ParameterIdentity_ts__WEBPACK_IMPORTED_MODULE_3__["default"].LOCATIONS.join(', ')}`, {
|
|
16183
|
+
...scope,
|
|
16184
|
+
target: name,
|
|
16185
|
+
reason: 'invalid-location'
|
|
16186
|
+
});
|
|
16187
|
+
}
|
|
16161
16188
|
const {
|
|
16162
16189
|
key,
|
|
16163
16190
|
outcome
|