@rxap/open-api 19.2.0-dev.2 → 19.2.0-dev.4

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/compodoc/changelog.html +7 -0
  3. package/compodoc/classes/SchemaValidationMixin.html +106 -6
  4. package/compodoc/dependencies.html +1 -1
  5. package/compodoc/interfaces/SchemaValidationResponse.html +19 -4
  6. package/compodoc/js/search/search_index.js +2 -2
  7. package/compodoc/properties.html +1 -1
  8. package/docs/documentation.json +295 -216
  9. package/docs/html/assets/search.js +1 -1
  10. package/docs/html/classes/OpenApiConfigService.html +3 -3
  11. package/docs/html/classes/OpenApiHttpResponseError.html +8 -8
  12. package/docs/html/classes/RxapOpenApiError.html +5 -5
  13. package/docs/html/classes/SchemaValidationMixin.html +6 -5
  14. package/docs/html/functions/AssertOpenApiV3.html +1 -1
  15. package/docs/html/functions/IsOpenApiV3.html +1 -1
  16. package/docs/html/functions/IsReferenceObject.html +1 -1
  17. package/docs/html/functions/NotContainsReferenceObjects.html +1 -1
  18. package/docs/html/functions/OpenApiInit.html +1 -1
  19. package/docs/html/index.html +2 -2
  20. package/docs/html/interfaces/OpenApiInitOptions.html +3 -3
  21. package/docs/html/interfaces/OpenApiMetaData.html +5 -5
  22. package/docs/html/interfaces/OperationObjectWithMetadata.html +2 -2
  23. package/docs/html/interfaces/SchemaValidationResponse.html +2 -2
  24. package/docs/html/modules.html +1 -1
  25. package/docs/html/types/OperationMap.html +1 -1
  26. package/docs/html/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.html +1 -1
  27. package/docs/html/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.html +1 -1
  28. package/docs/html/variables/DISABLE_SCHEMA_VALIDATION.html +1 -1
  29. package/docs/html/variables/DISABLE_VALIDATION.html +1 -1
  30. package/docs/html/variables/RXAP_OPEN_API_CONFIG.html +1 -1
  31. package/docs/html/variables/RXAP_OPEN_API_STRICT_VALIDATOR.html +1 -1
  32. package/docs/markdown/README.md +1 -1
  33. package/docs/markdown/classes/OpenApiConfigService.md +14 -14
  34. package/docs/markdown/classes/OpenApiHttpResponseError.md +16 -16
  35. package/docs/markdown/classes/RxapOpenApiError.md +13 -13
  36. package/docs/markdown/classes/SchemaValidationMixin.md +34 -12
  37. package/docs/markdown/functions/AssertOpenApiV3.md +2 -2
  38. package/docs/markdown/functions/IsOpenApiV3.md +2 -2
  39. package/docs/markdown/functions/IsReferenceObject.md +2 -2
  40. package/docs/markdown/functions/NotContainsReferenceObjects.md +2 -2
  41. package/docs/markdown/functions/OpenApiInit.md +2 -2
  42. package/docs/markdown/globals.md +2 -2
  43. package/docs/markdown/interfaces/OpenApiInitOptions.md +4 -4
  44. package/docs/markdown/interfaces/OpenApiMetaData.md +8 -8
  45. package/docs/markdown/interfaces/OperationObjectWithMetadata.md +4 -4
  46. package/docs/markdown/interfaces/SchemaValidationResponse.md +6 -6
  47. package/docs/markdown/type-aliases/OperationMap.md +2 -2
  48. package/docs/markdown/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +2 -2
  49. package/docs/markdown/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +2 -2
  50. package/docs/markdown/variables/DISABLE_SCHEMA_VALIDATION.md +2 -2
  51. package/docs/markdown/variables/DISABLE_VALIDATION.md +2 -2
  52. package/docs/markdown/variables/RXAP_OPEN_API_CONFIG.md +2 -2
  53. package/docs/markdown/variables/RXAP_OPEN_API_STRICT_VALIDATOR.md +2 -2
  54. package/docs/wiki/Class.OpenApiConfigService.md +13 -13
  55. package/docs/wiki/Class.OpenApiHttpResponseError.md +15 -15
  56. package/docs/wiki/Class.RxapOpenApiError.md +12 -12
  57. package/docs/wiki/Class.SchemaValidationMixin.md +33 -11
  58. package/docs/wiki/Function.AssertOpenApiV3.md +1 -1
  59. package/docs/wiki/Function.IsOpenApiV3.md +1 -1
  60. package/docs/wiki/Function.IsReferenceObject.md +1 -1
  61. package/docs/wiki/Function.NotContainsReferenceObjects.md +1 -1
  62. package/docs/wiki/Function.OpenApiInit.md +1 -1
  63. package/docs/wiki/Interface.OpenApiInitOptions.md +3 -3
  64. package/docs/wiki/Interface.OpenApiMetaData.md +7 -7
  65. package/docs/wiki/Interface.OperationObjectWithMetadata.md +3 -3
  66. package/docs/wiki/Interface.SchemaValidationResponse.md +5 -5
  67. package/docs/wiki/TypeAlias.OperationMap.md +1 -1
  68. package/docs/wiki/Variable.DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +1 -1
  69. package/docs/wiki/Variable.DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +1 -1
  70. package/docs/wiki/Variable.DISABLE_SCHEMA_VALIDATION.md +1 -1
  71. package/docs/wiki/Variable.DISABLE_VALIDATION.md +1 -1
  72. package/docs/wiki/Variable.RXAP_OPEN_API_CONFIG.md +1 -1
  73. package/docs/wiki/Variable.RXAP_OPEN_API_STRICT_VALIDATOR.md +1 -1
  74. package/docs/wiki/globals.md +1 -1
  75. package/fesm2022/rxap-open-api-data-source-table.mjs +10 -10
  76. package/fesm2022/rxap-open-api-data-source-table.mjs.map +1 -1
  77. package/fesm2022/rxap-open-api-data-source.mjs +6 -6
  78. package/fesm2022/rxap-open-api-data-source.mjs.map +1 -1
  79. package/fesm2022/rxap-open-api-http-resource.mjs +13 -1
  80. package/fesm2022/rxap-open-api-http-resource.mjs.map +1 -1
  81. package/fesm2022/rxap-open-api-remote-method.mjs +6 -6
  82. package/fesm2022/rxap-open-api-remote-method.mjs.map +1 -1
  83. package/fesm2022/rxap-open-api.mjs +23 -7
  84. package/fesm2022/rxap-open-api.mjs.map +1 -1
  85. package/http-resource/index.d.ts +1 -0
  86. package/http-resource/lib/to-http-headers.d.ts +3 -0
  87. package/lib/schema-validation.mixin.d.ts +1 -0
  88. package/package.json +8 -8
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.4](https://gitlab.com/rxap/packages/compare/@rxap/open-api@19.2.0-dev.3...@rxap/open-api@19.2.0-dev.4) (2025-12-08)
7
+
8
+ **Note:** Version bump only for package @rxap/open-api
9
+
10
+ # [19.2.0-dev.3](https://gitlab.com/rxap/packages/compare/@rxap/open-api@19.2.0-dev.2...@rxap/open-api@19.2.0-dev.3) (2025-10-13)
11
+
12
+ ### Bug Fixes
13
+
14
+ - **schema-validation:** improve path parameter handling and validation ([9b06d23](https://gitlab.com/rxap/packages/commit/9b06d2355eb2a50383bd17325b8c213be8890ade))
15
+
6
16
  # [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
17
 
8
18
  ### Features
@@ -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.3...@rxap/open-api@19.2.0-dev.4">19.2.0-dev.4</a> (2025-12-08)</h1>
89
+ <p><strong>Note:</strong> Version bump only for package @rxap/open-api</p>
90
+ <h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/open-api@19.2.0-dev.2...@rxap/open-api@19.2.0-dev.3">19.2.0-dev.3</a> (2025-10-13)</h1>
91
+ <h3>Bug Fixes</h3>
92
+ <ul>
93
+ <li><strong>schema-validation:</strong> improve path parameter handling and validation (<a href="https://gitlab.com/rxap/packages/commit/9b06d2355eb2a50383bd17325b8c213be8890ade">9b06d23</a>)</li>
94
+ </ul>
88
95
  <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
96
  <h3>Features</h3>
90
97
  <ul>
@@ -176,6 +176,10 @@
176
176
  <span class="modifier">Public</span>
177
177
  <a href="#buildHttpPathParams" >buildHttpPathParams</a>
178
178
  </li>
179
+ <li>
180
+ <span class="modifier">Protected</span>
181
+ <a href="#normalizePathParamValue" >normalizePathParamValue</a>
182
+ </li>
179
183
  <li>
180
184
  <span class="modifier">Public</span>
181
185
  <a href="#validateParameters" >validateParameters</a>
@@ -374,8 +378,8 @@
374
378
 
375
379
  <tr>
376
380
  <td class="col-md-4">
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>
381
+ <div class="io-line">Defined in <a href="" data-line="377"
382
+ class="link-to-prism">src/lib/schema-validation.mixin.ts:377</a></div>
379
383
  </td>
380
384
  </tr>
381
385
 
@@ -650,6 +654,87 @@ create a http request. The transformation is guided by the openapi definition</p
650
654
  </tr>
651
655
  </tbody>
652
656
  </table>
657
+ <table class="table table-sm table-bordered">
658
+ <tbody>
659
+ <tr>
660
+ <td class="col-md-4">
661
+ <a name="normalizePathParamValue"></a>
662
+ <span class="name">
663
+ <span class="modifier">Protected</span>
664
+ <span ><b>normalizePathParamValue</b></span>
665
+ <a href="#normalizePathParamValue"><span class="icon ion-ios-link"></span></a>
666
+ </span>
667
+ </td>
668
+ </tr>
669
+ <tr>
670
+ <td class="col-md-4">
671
+ <span class="modifier-icon icon ion-ios-reset"></span>
672
+ <code>normalizePathParamValue(value: <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank">any</a>, paramName: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>)</code>
673
+ </td>
674
+ </tr>
675
+
676
+
677
+ <tr>
678
+ <td class="col-md-4">
679
+ <div class="io-line">Defined in <a href="" data-line="351"
680
+ class="link-to-prism">src/lib/schema-validation.mixin.ts:351</a></div>
681
+ </td>
682
+ </tr>
683
+
684
+
685
+ <tr>
686
+ <td class="col-md-4">
687
+
688
+ <div class="io-description">
689
+ <b>Parameters :</b>
690
+
691
+ <table class="params">
692
+ <thead>
693
+ <tr>
694
+ <td>Name</td>
695
+ <td>Type</td>
696
+ <td>Optional</td>
697
+ </tr>
698
+ </thead>
699
+ <tbody>
700
+ <tr>
701
+ <td>value</td>
702
+ <td>
703
+ <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>
704
+ </td>
705
+
706
+ <td>
707
+ No
708
+ </td>
709
+
710
+
711
+ </tr>
712
+ <tr>
713
+ <td>paramName</td>
714
+ <td>
715
+ <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
716
+ </td>
717
+
718
+ <td>
719
+ No
720
+ </td>
721
+
722
+
723
+ </tr>
724
+ </tbody>
725
+ </table>
726
+ </div>
727
+ <div class="io-description">
728
+ <b>Returns : </b> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
729
+
730
+ </div>
731
+ <div class="io-description">
732
+
733
+ </div>
734
+ </td>
735
+ </tr>
736
+ </tbody>
737
+ </table>
653
738
  <table class="table table-sm table-bordered">
654
739
  <tbody>
655
740
  <tr>
@@ -1407,10 +1492,8 @@ export class SchemaValidationMixin&lt;Response &#x3D; any, Parameters extends Re
1407
1492
 
1408
1493
  for (const parameter of operationParameters.filter(p &#x3D;&gt; p.in &#x3D;&#x3D;&#x3D; &#x27;path&#x27;)) {
1409
1494
 
1410
- if (parameters.hasOwnProperty(parameter.name)) {
1411
- pathParams[parameter.name] &#x3D; encodeURIComponent(typeof parameters[parameter.name] &#x3D;&#x3D;&#x3D; &#x27;object&#x27; ?
1412
- JSON.stringify(parameters[parameter.name]) :
1413
- parameters[parameter.name]);
1495
+ if (parameter.name in parameters) {
1496
+ pathParams[parameter.name] &#x3D; this.normalizePathParamValue(parameters[parameter.name], parameter.name);
1414
1497
  }
1415
1498
 
1416
1499
  }
@@ -1421,6 +1504,23 @@ export class SchemaValidationMixin&lt;Response &#x3D; any, Parameters extends Re
1421
1504
 
1422
1505
  }
1423
1506
 
1507
+ protected normalizePathParamValue(value: any, paramName: string): string {
1508
+ if (!value) {
1509
+ throw new Error(&#x60;The path parameter &#x27;${paramName}&#x27; is empty or undefined!&#x60;);
1510
+ }
1511
+ if (Array.isArray(value)) {
1512
+ if (value.length &#x3D;&#x3D;&#x3D; 0) {
1513
+ throw new Error(&#x60;The path parameter &#x27;${paramName}&#x27; is an empty array!&#x60;);
1514
+ }
1515
+ return value.map((item, index) &#x3D;&gt; this.normalizePathParamValue(item, &#x60;${ paramName }[${index}]&#x60;)).join(&#x27;/&#x27;);
1516
+ } else if (typeof value &#x3D;&#x3D;&#x3D; &#x27;object&#x27;) {
1517
+ return encodeURIComponent(JSON.stringify(value));
1518
+ } else if (typeof value &#x3D;&#x3D;&#x3D; &#x60;string&#x60;) {
1519
+ return encodeURIComponent(value);
1520
+ }
1521
+ return value.toString();
1522
+ }
1523
+
1424
1524
  /**
1425
1525
  * Converts open api parameters into the corresponding http options to
1426
1526
  * create a http request. The transformation is guided by the openapi definition
@@ -117,7 +117,7 @@
117
117
  <li>
118
118
  <b>@angular/core</b> : ^19.2.1</li>
119
119
  <li>
120
- <b>@rxap/config</b> : ^19.2.0-dev.0</li>
120
+ <b>@rxap/config</b> : ^19.2.0-dev.2</li>
121
121
  <li>
122
122
  <b>@rxap/data-source</b> : ^19.1.1-dev.1</li>
123
123
  <li>
@@ -662,10 +662,8 @@ export class SchemaValidationMixin&lt;Response &#x3D; any, Parameters extends Re
662
662
 
663
663
  for (const parameter of operationParameters.filter(p &#x3D;&gt; p.in &#x3D;&#x3D;&#x3D; &#x27;path&#x27;)) {
664
664
 
665
- if (parameters.hasOwnProperty(parameter.name)) {
666
- pathParams[parameter.name] &#x3D; encodeURIComponent(typeof parameters[parameter.name] &#x3D;&#x3D;&#x3D; &#x27;object&#x27; ?
667
- JSON.stringify(parameters[parameter.name]) :
668
- parameters[parameter.name]);
665
+ if (parameter.name in parameters) {
666
+ pathParams[parameter.name] &#x3D; this.normalizePathParamValue(parameters[parameter.name], parameter.name);
669
667
  }
670
668
 
671
669
  }
@@ -676,6 +674,23 @@ export class SchemaValidationMixin&lt;Response &#x3D; any, Parameters extends Re
676
674
 
677
675
  }
678
676
 
677
+ protected normalizePathParamValue(value: any, paramName: string): string {
678
+ if (!value) {
679
+ throw new Error(&#x60;The path parameter &#x27;${paramName}&#x27; is empty or undefined!&#x60;);
680
+ }
681
+ if (Array.isArray(value)) {
682
+ if (value.length &#x3D;&#x3D;&#x3D; 0) {
683
+ throw new Error(&#x60;The path parameter &#x27;${paramName}&#x27; is an empty array!&#x60;);
684
+ }
685
+ return value.map((item, index) &#x3D;&gt; this.normalizePathParamValue(item, &#x60;${ paramName }[${index}]&#x60;)).join(&#x27;/&#x27;);
686
+ } else if (typeof value &#x3D;&#x3D;&#x3D; &#x27;object&#x27;) {
687
+ return encodeURIComponent(JSON.stringify(value));
688
+ } else if (typeof value &#x3D;&#x3D;&#x3D; &#x60;string&#x60;) {
689
+ return encodeURIComponent(value);
690
+ }
691
+ return value.toString();
692
+ }
693
+
679
694
  /**
680
695
  * Converts open api parameters into the corresponding http options to
681
696
  * create a http request. The transformation is guided by the openapi definition