@rxap/open-api 19.2.0-dev.0 → 19.2.0-dev.2
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 +10 -0
- package/compodoc/changelog.html +7 -0
- package/compodoc/classes/SchemaValidationMixin.html +17 -22
- package/compodoc/dependencies.html +3 -3
- package/compodoc/interfaces/SchemaValidationResponse.html +13 -18
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +111 -111
- package/docs/html/classes/OpenApiConfigService.html +3 -3
- package/docs/html/classes/OpenApiHttpResponseError.html +4 -4
- package/docs/html/classes/RxapOpenApiError.html +5 -5
- package/docs/html/classes/SchemaValidationMixin.html +5 -5
- package/docs/html/functions/AssertOpenApiV3.html +1 -1
- package/docs/html/functions/IsOpenApiV3.html +1 -1
- package/docs/html/functions/IsReferenceObject.html +1 -1
- package/docs/html/functions/NotContainsReferenceObjects.html +1 -1
- package/docs/html/functions/OpenApiInit.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/OpenApiInitOptions.html +3 -3
- package/docs/html/interfaces/OpenApiMetaData.html +5 -5
- package/docs/html/interfaces/OperationObjectWithMetadata.html +2 -2
- package/docs/html/interfaces/SchemaValidationResponse.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/types/OperationMap.html +1 -1
- package/docs/html/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.html +1 -1
- package/docs/html/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.html +1 -1
- package/docs/html/variables/DISABLE_SCHEMA_VALIDATION.html +1 -1
- package/docs/html/variables/DISABLE_VALIDATION.html +1 -1
- package/docs/html/variables/RXAP_OPEN_API_CONFIG.html +1 -1
- package/docs/html/variables/RXAP_OPEN_API_STRICT_VALIDATOR.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/OpenApiConfigService.md +14 -14
- package/docs/markdown/classes/OpenApiHttpResponseError.md +7 -7
- package/docs/markdown/classes/RxapOpenApiError.md +13 -13
- package/docs/markdown/classes/SchemaValidationMixin.md +12 -12
- package/docs/markdown/functions/AssertOpenApiV3.md +2 -2
- package/docs/markdown/functions/IsOpenApiV3.md +2 -2
- package/docs/markdown/functions/IsReferenceObject.md +2 -2
- package/docs/markdown/functions/NotContainsReferenceObjects.md +2 -2
- package/docs/markdown/functions/OpenApiInit.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/OpenApiInitOptions.md +4 -4
- package/docs/markdown/interfaces/OpenApiMetaData.md +7 -7
- package/docs/markdown/interfaces/OperationObjectWithMetadata.md +4 -4
- package/docs/markdown/interfaces/SchemaValidationResponse.md +6 -6
- package/docs/markdown/type-aliases/OperationMap.md +2 -2
- package/docs/markdown/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +2 -2
- package/docs/markdown/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +2 -2
- package/docs/markdown/variables/DISABLE_SCHEMA_VALIDATION.md +2 -2
- package/docs/markdown/variables/DISABLE_VALIDATION.md +2 -2
- package/docs/markdown/variables/RXAP_OPEN_API_CONFIG.md +2 -2
- package/docs/markdown/variables/RXAP_OPEN_API_STRICT_VALIDATOR.md +2 -2
- package/docs/wiki/Class.OpenApiConfigService.md +13 -13
- package/docs/wiki/Class.OpenApiHttpResponseError.md +6 -6
- package/docs/wiki/Class.RxapOpenApiError.md +12 -12
- package/docs/wiki/Class.SchemaValidationMixin.md +11 -11
- package/docs/wiki/Function.AssertOpenApiV3.md +1 -1
- package/docs/wiki/Function.IsOpenApiV3.md +1 -1
- package/docs/wiki/Function.IsReferenceObject.md +1 -1
- package/docs/wiki/Function.NotContainsReferenceObjects.md +1 -1
- package/docs/wiki/Function.OpenApiInit.md +1 -1
- package/docs/wiki/Interface.OpenApiInitOptions.md +3 -3
- package/docs/wiki/Interface.OpenApiMetaData.md +6 -6
- package/docs/wiki/Interface.OperationObjectWithMetadata.md +3 -3
- package/docs/wiki/Interface.SchemaValidationResponse.md +5 -5
- package/docs/wiki/TypeAlias.OperationMap.md +1 -1
- package/docs/wiki/Variable.DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +1 -1
- package/docs/wiki/Variable.DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +1 -1
- package/docs/wiki/Variable.DISABLE_SCHEMA_VALIDATION.md +1 -1
- package/docs/wiki/Variable.DISABLE_VALIDATION.md +1 -1
- package/docs/wiki/Variable.RXAP_OPEN_API_CONFIG.md +1 -1
- package/docs/wiki/Variable.RXAP_OPEN_API_STRICT_VALIDATOR.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-open-api-http-resource.mjs +1 -1
- package/fesm2022/rxap-open-api-http-resource.mjs.map +1 -1
- package/fesm2022/rxap-open-api.mjs +12 -8
- package/fesm2022/rxap-open-api.mjs.map +1 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
# [19.2.0-dev.2](https://gitlab.com/rxap/packages/compare/@rxap/open-api@19.2.0-dev.1...@rxap/open-api@19.2.0-dev.2) (2025-09-23)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **open-api:** add `toHttpHeaders` utility and encode query params ([86e02bd](https://gitlab.com/rxap/packages/commit/86e02bd763b748ec072d0a91c83ab60ac297d1e9))
|
|
11
|
+
|
|
12
|
+
# [19.2.0-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/open-api@19.2.0-dev.0...@rxap/open-api@19.2.0-dev.1) (2025-09-12)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @rxap/open-api
|
|
15
|
+
|
|
6
16
|
# [19.2.0-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/open-api@19.1.0...@rxap/open-api@19.2.0-dev.0) (2025-08-18)
|
|
7
17
|
|
|
8
18
|
### Features
|
package/compodoc/changelog.html
CHANGED
|
@@ -85,6 +85,13 @@
|
|
|
85
85
|
<h1>Change Log</h1>
|
|
86
86
|
<p>All notable changes to this project will be documented in this file.
|
|
87
87
|
See <a href="https://conventionalcommits.org">Conventional Commits</a> for commit guidelines.</p>
|
|
88
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/open-api@19.2.0-dev.1...@rxap/open-api@19.2.0-dev.2">19.2.0-dev.2</a> (2025-09-23)</h1>
|
|
89
|
+
<h3>Features</h3>
|
|
90
|
+
<ul>
|
|
91
|
+
<li><strong>open-api:</strong> add <code>toHttpHeaders</code> utility and encode query params (<a href="https://gitlab.com/rxap/packages/commit/86e02bd763b748ec072d0a91c83ab60ac297d1e9">86e02bd</a>)</li>
|
|
92
|
+
</ul>
|
|
93
|
+
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/open-api@19.2.0-dev.0...@rxap/open-api@19.2.0-dev.1">19.2.0-dev.1</a> (2025-09-12)</h1>
|
|
94
|
+
<p><strong>Note:</strong> Version bump only for package @rxap/open-api</p>
|
|
88
95
|
<h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/open-api@19.1.0...@rxap/open-api@19.2.0-dev.0">19.2.0-dev.0</a> (2025-08-18)</h1>
|
|
89
96
|
<h3>Features</h3>
|
|
90
97
|
<ul>
|
|
@@ -374,8 +374,8 @@
|
|
|
374
374
|
|
|
375
375
|
<tr>
|
|
376
376
|
<td class="col-md-4">
|
|
377
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
378
|
-
class="link-to-prism">src/lib/schema-validation.mixin.ts:
|
|
377
|
+
<div class="io-line">Defined in <a href="" data-line="362"
|
|
378
|
+
class="link-to-prism">src/lib/schema-validation.mixin.ts:362</a></div>
|
|
379
379
|
</td>
|
|
380
380
|
</tr>
|
|
381
381
|
|
|
@@ -591,8 +591,8 @@ create a http request. The transformation is guided by the openapi definition</p
|
|
|
591
591
|
|
|
592
592
|
<tr>
|
|
593
593
|
<td class="col-md-4">
|
|
594
|
-
<div class="io-line">Defined in <a href="" data-line="
|
|
595
|
-
class="link-to-prism">src/lib/schema-validation.mixin.ts:
|
|
594
|
+
<div class="io-line">Defined in <a href="" data-line="328"
|
|
595
|
+
class="link-to-prism">src/lib/schema-validation.mixin.ts:328</a></div>
|
|
596
596
|
</td>
|
|
597
597
|
</tr>
|
|
598
598
|
|
|
@@ -1363,41 +1363,36 @@ export class SchemaValidationMixin<Response = any, Parameters extends Re
|
|
|
1363
1363
|
|
|
1364
1364
|
public buildHttpHeaders(operationParameters: OpenAPIV3.ParameterObject[], parameters?: Parameters): HttpHeaders {
|
|
1365
1365
|
|
|
1366
|
-
|
|
1366
|
+
const headers: Record<string, string | number | string[] | number[]> = {};
|
|
1367
1367
|
|
|
1368
1368
|
if (IsRecord(parameters)) {
|
|
1369
1369
|
|
|
1370
|
-
for (const parameter of operationParameters.filter(p => p.in === 'header')) {
|
|
1371
|
-
|
|
1370
|
+
for (const parameter of operationParameters.filter((p) => p.in === 'header')) {
|
|
1372
1371
|
if (parameters.hasOwnProperty(parameter.name)) {
|
|
1373
|
-
|
|
1374
1372
|
const value = parameters[parameter.name];
|
|
1375
1373
|
|
|
1376
1374
|
if (Array.isArray(value)) {
|
|
1377
|
-
|
|
1378
1375
|
if (value.length) {
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1376
|
+
if (value.length === 1) {
|
|
1377
|
+
const first = value.shift();
|
|
1378
|
+
headers[parameter.name] =
|
|
1379
|
+
typeof first === 'object' ? JSON.stringify(first) : first;
|
|
1380
|
+
} else {
|
|
1381
|
+
headers[parameter.name] = value.map((item) =>
|
|
1382
|
+
typeof item === 'object' ? JSON.stringify(item) : item
|
|
1383
|
+
);
|
|
1386
1384
|
}
|
|
1387
|
-
|
|
1388
1385
|
}
|
|
1389
|
-
|
|
1390
1386
|
} else {
|
|
1391
|
-
headers
|
|
1387
|
+
headers[parameter.name] =
|
|
1388
|
+
typeof value === 'object' ? JSON.stringify(value) : value;
|
|
1392
1389
|
}
|
|
1393
|
-
|
|
1394
1390
|
}
|
|
1395
|
-
|
|
1396
1391
|
}
|
|
1397
1392
|
|
|
1398
1393
|
}
|
|
1399
1394
|
|
|
1400
|
-
return headers;
|
|
1395
|
+
return new HttpHeaders(headers);
|
|
1401
1396
|
|
|
1402
1397
|
}
|
|
1403
1398
|
|
|
@@ -117,19 +117,19 @@
|
|
|
117
117
|
<li>
|
|
118
118
|
<b>@angular/core</b> : ^19.2.1</li>
|
|
119
119
|
<li>
|
|
120
|
-
<b>@rxap/config</b> : ^19.
|
|
120
|
+
<b>@rxap/config</b> : ^19.2.0-dev.0</li>
|
|
121
121
|
<li>
|
|
122
122
|
<b>@rxap/data-source</b> : ^19.1.1-dev.1</li>
|
|
123
123
|
<li>
|
|
124
124
|
<b>@rxap/environment</b> : ^19.0.4</li>
|
|
125
125
|
<li>
|
|
126
|
-
<b>@rxap/mixin</b> : ^16.0.15-dev.
|
|
126
|
+
<b>@rxap/mixin</b> : ^16.0.15-dev.3</li>
|
|
127
127
|
<li>
|
|
128
128
|
<b>@rxap/remote-method</b> : ^19.1.0-dev.0</li>
|
|
129
129
|
<li>
|
|
130
130
|
<b>@rxap/rxjs</b> : ^1.1.16</li>
|
|
131
131
|
<li>
|
|
132
|
-
<b>@rxap/utilities</b> : ^16.
|
|
132
|
+
<b>@rxap/utilities</b> : ^16.5.0-dev.0</li>
|
|
133
133
|
<li>
|
|
134
134
|
<b>ajv</b> : ^8.12.0</li>
|
|
135
135
|
<li>
|
|
@@ -618,41 +618,36 @@ export class SchemaValidationMixin<Response = any, Parameters extends Re
|
|
|
618
618
|
|
|
619
619
|
public buildHttpHeaders(operationParameters: OpenAPIV3.ParameterObject[], parameters?: Parameters): HttpHeaders {
|
|
620
620
|
|
|
621
|
-
|
|
621
|
+
const headers: Record<string, string | number | string[] | number[]> = {};
|
|
622
622
|
|
|
623
623
|
if (IsRecord(parameters)) {
|
|
624
624
|
|
|
625
|
-
for (const parameter of operationParameters.filter(p => p.in === 'header')) {
|
|
626
|
-
|
|
625
|
+
for (const parameter of operationParameters.filter((p) => p.in === 'header')) {
|
|
627
626
|
if (parameters.hasOwnProperty(parameter.name)) {
|
|
628
|
-
|
|
629
627
|
const value = parameters[parameter.name];
|
|
630
628
|
|
|
631
629
|
if (Array.isArray(value)) {
|
|
632
|
-
|
|
633
630
|
if (value.length) {
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
631
|
+
if (value.length === 1) {
|
|
632
|
+
const first = value.shift();
|
|
633
|
+
headers[parameter.name] =
|
|
634
|
+
typeof first === 'object' ? JSON.stringify(first) : first;
|
|
635
|
+
} else {
|
|
636
|
+
headers[parameter.name] = value.map((item) =>
|
|
637
|
+
typeof item === 'object' ? JSON.stringify(item) : item
|
|
638
|
+
);
|
|
641
639
|
}
|
|
642
|
-
|
|
643
640
|
}
|
|
644
|
-
|
|
645
641
|
} else {
|
|
646
|
-
headers
|
|
642
|
+
headers[parameter.name] =
|
|
643
|
+
typeof value === 'object' ? JSON.stringify(value) : value;
|
|
647
644
|
}
|
|
648
|
-
|
|
649
645
|
}
|
|
650
|
-
|
|
651
646
|
}
|
|
652
647
|
|
|
653
648
|
}
|
|
654
649
|
|
|
655
|
-
return headers;
|
|
650
|
+
return new HttpHeaders(headers);
|
|
656
651
|
|
|
657
652
|
}
|
|
658
653
|
|