@rxap/open-api 19.2.0-dev.4 → 19.3.0-dev.0
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/dependencies.html +6 -6
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/miscellaneous/variables.html +146 -0
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +842 -566
- package/docs/html/assets/navigation.js +1 -1
- package/docs/html/assets/search.js +1 -1
- 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/functions/injectOpenApiBaseUrlHttpInterceptorFn.html +1 -0
- 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/OPEN_API_OPERATION.html +1 -0
- package/docs/html/variables/OPEN_API_OPERATION_ID.html +1 -0
- package/docs/html/variables/OPEN_API_SERVER_ID.html +1 -0
- package/docs/html/variables/OPEN_API_SERVER_INDEX.html +1 -0
- 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 +13 -13
- 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/functions/injectOpenApiBaseUrlHttpInterceptorFn.md +25 -0
- package/docs/markdown/globals.md +7 -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/OPEN_API_OPERATION.md +11 -0
- package/docs/markdown/variables/OPEN_API_OPERATION_ID.md +11 -0
- package/docs/markdown/variables/OPEN_API_SERVER_ID.md +11 -0
- package/docs/markdown/variables/OPEN_API_SERVER_INDEX.md +11 -0
- 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 +12 -12
- 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/Function.injectOpenApiBaseUrlHttpInterceptorFn.md +21 -0
- 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.OPEN_API_OPERATION.md +7 -0
- package/docs/wiki/Variable.OPEN_API_OPERATION_ID.md +7 -0
- package/docs/wiki/Variable.OPEN_API_SERVER_ID.md +7 -0
- package/docs/wiki/Variable.OPEN_API_SERVER_INDEX.md +7 -0
- 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/_Sidebar.md +5 -0
- package/docs/wiki/globals.md +6 -1
- package/fesm2022/rxap-open-api-http-resource.mjs +8 -16
- package/fesm2022/rxap-open-api-http-resource.mjs.map +1 -1
- package/fesm2022/rxap-open-api-remote-method.mjs +6 -2
- package/fesm2022/rxap-open-api-remote-method.mjs.map +1 -1
- package/fesm2022/rxap-open-api.mjs +26 -3
- package/fesm2022/rxap-open-api.mjs.map +1 -1
- package/http-resource/lib/http-context-tokens.d.ts +4 -4
- package/http-resource/lib/http-interceptors.d.ts +4 -2
- package/index.d.ts +2 -0
- package/lib/http-context-tokens.d.ts +5 -0
- package/lib/http-interceptors.d.ts +2 -0
- package/package.json +26 -26
|
@@ -123,6 +123,21 @@
|
|
|
123
123
|
<li>
|
|
124
124
|
<a href="#DISABLE_VALIDATION" title="src/lib/tokens.ts" ><b>DISABLE_VALIDATION</b> (src/.../tokens.ts)</a>
|
|
125
125
|
</li>
|
|
126
|
+
<li>
|
|
127
|
+
<a href="#injectOpenApiBaseUrlHttpInterceptorFn" title="src/lib/http-interceptors.ts" ><b>injectOpenApiBaseUrlHttpInterceptorFn</b> (src/.../http-interceptors.ts)</a>
|
|
128
|
+
</li>
|
|
129
|
+
<li>
|
|
130
|
+
<a href="#OPEN_API_OPERATION" title="src/lib/http-context-tokens.ts" ><b>OPEN_API_OPERATION</b> (src/.../http-context-tokens.ts)</a>
|
|
131
|
+
</li>
|
|
132
|
+
<li>
|
|
133
|
+
<a href="#OPEN_API_OPERATION_ID" title="src/lib/http-context-tokens.ts" ><b>OPEN_API_OPERATION_ID</b> (src/.../http-context-tokens.ts)</a>
|
|
134
|
+
</li>
|
|
135
|
+
<li>
|
|
136
|
+
<a href="#OPEN_API_SERVER_ID" title="src/lib/http-context-tokens.ts" ><b>OPEN_API_SERVER_ID</b> (src/.../http-context-tokens.ts)</a>
|
|
137
|
+
</li>
|
|
138
|
+
<li>
|
|
139
|
+
<a href="#OPEN_API_SERVER_INDEX" title="src/lib/http-context-tokens.ts" ><b>OPEN_API_SERVER_INDEX</b> (src/.../http-context-tokens.ts)</a>
|
|
140
|
+
</li>
|
|
126
141
|
<li>
|
|
127
142
|
<a href="#RXAP_OPEN_API_CONFIG" title="src/lib/tokens.ts" ><b>RXAP_OPEN_API_CONFIG</b> (src/.../tokens.ts)</a>
|
|
128
143
|
</li>
|
|
@@ -266,6 +281,137 @@
|
|
|
266
281
|
</tr>
|
|
267
282
|
|
|
268
283
|
|
|
284
|
+
</tbody>
|
|
285
|
+
</table>
|
|
286
|
+
</section>
|
|
287
|
+
<h3>src/lib/http-interceptors.ts</h3>
|
|
288
|
+
<section data-compodoc="block-properties">
|
|
289
|
+
<h3></h3> <table class="table table-sm table-bordered">
|
|
290
|
+
<tbody>
|
|
291
|
+
<tr>
|
|
292
|
+
<td class="col-md-4">
|
|
293
|
+
<a name="injectOpenApiBaseUrlHttpInterceptorFn"></a>
|
|
294
|
+
<span class="name">
|
|
295
|
+
<span ><b>injectOpenApiBaseUrlHttpInterceptorFn</b></span>
|
|
296
|
+
<a href="#injectOpenApiBaseUrlHttpInterceptorFn"><span class="icon ion-ios-link"></span></a>
|
|
297
|
+
</span>
|
|
298
|
+
</td>
|
|
299
|
+
</tr>
|
|
300
|
+
<tr>
|
|
301
|
+
<td class="col-md-4">
|
|
302
|
+
<i>Type : </i> <code>HttpInterceptorFn</code>
|
|
303
|
+
|
|
304
|
+
</td>
|
|
305
|
+
</tr>
|
|
306
|
+
<tr>
|
|
307
|
+
<td class="col-md-4">
|
|
308
|
+
<i>Default value : </i><code>(
|
|
309
|
+
req,
|
|
310
|
+
next
|
|
311
|
+
) => {
|
|
312
|
+
const serverId = req.context.get(OPEN_API_SERVER_ID);
|
|
313
|
+
const serverIndex = req.context.get(OPEN_API_SERVER_INDEX);
|
|
314
|
+
const openApiConfigService = inject(OpenApiConfigService);
|
|
315
|
+
if (serverId) {
|
|
316
|
+
const baseUrl = openApiConfigService.getBaseUrl(serverIndex, serverId);
|
|
317
|
+
if (req.url.startsWith('http')) {
|
|
318
|
+
if (!req.url.startsWith(baseUrl)) {
|
|
319
|
+
console.warn(`The url ${req.url} is not a valid url for the server ${serverId}. Expected base url ${baseUrl}`);
|
|
320
|
+
}
|
|
321
|
+
} else {
|
|
322
|
+
return next(req.clone({ url: new URL(req.url, baseUrl).toString() }));
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return next(req);
|
|
327
|
+
}</code>
|
|
328
|
+
</td>
|
|
329
|
+
</tr>
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
</tbody>
|
|
333
|
+
</table>
|
|
334
|
+
</section>
|
|
335
|
+
<h3>src/lib/http-context-tokens.ts</h3>
|
|
336
|
+
<section data-compodoc="block-properties">
|
|
337
|
+
<h3></h3> <table class="table table-sm table-bordered">
|
|
338
|
+
<tbody>
|
|
339
|
+
<tr>
|
|
340
|
+
<td class="col-md-4">
|
|
341
|
+
<a name="OPEN_API_OPERATION"></a>
|
|
342
|
+
<span class="name">
|
|
343
|
+
<span ><b>OPEN_API_OPERATION</b></span>
|
|
344
|
+
<a href="#OPEN_API_OPERATION"><span class="icon ion-ios-link"></span></a>
|
|
345
|
+
</span>
|
|
346
|
+
</td>
|
|
347
|
+
</tr>
|
|
348
|
+
<tr>
|
|
349
|
+
<td class="col-md-4">
|
|
350
|
+
<i>Default value : </i><code>new HttpContextToken<string>(() => '')</code>
|
|
351
|
+
</td>
|
|
352
|
+
</tr>
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
</tbody>
|
|
356
|
+
</table>
|
|
357
|
+
<table class="table table-sm table-bordered">
|
|
358
|
+
<tbody>
|
|
359
|
+
<tr>
|
|
360
|
+
<td class="col-md-4">
|
|
361
|
+
<a name="OPEN_API_OPERATION_ID"></a>
|
|
362
|
+
<span class="name">
|
|
363
|
+
<span ><b>OPEN_API_OPERATION_ID</b></span>
|
|
364
|
+
<a href="#OPEN_API_OPERATION_ID"><span class="icon ion-ios-link"></span></a>
|
|
365
|
+
</span>
|
|
366
|
+
</td>
|
|
367
|
+
</tr>
|
|
368
|
+
<tr>
|
|
369
|
+
<td class="col-md-4">
|
|
370
|
+
<i>Default value : </i><code>new HttpContextToken<string>(() => '')</code>
|
|
371
|
+
</td>
|
|
372
|
+
</tr>
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
</tbody>
|
|
376
|
+
</table>
|
|
377
|
+
<table class="table table-sm table-bordered">
|
|
378
|
+
<tbody>
|
|
379
|
+
<tr>
|
|
380
|
+
<td class="col-md-4">
|
|
381
|
+
<a name="OPEN_API_SERVER_ID"></a>
|
|
382
|
+
<span class="name">
|
|
383
|
+
<span ><b>OPEN_API_SERVER_ID</b></span>
|
|
384
|
+
<a href="#OPEN_API_SERVER_ID"><span class="icon ion-ios-link"></span></a>
|
|
385
|
+
</span>
|
|
386
|
+
</td>
|
|
387
|
+
</tr>
|
|
388
|
+
<tr>
|
|
389
|
+
<td class="col-md-4">
|
|
390
|
+
<i>Default value : </i><code>new HttpContextToken<string | null>(() => null)</code>
|
|
391
|
+
</td>
|
|
392
|
+
</tr>
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
</tbody>
|
|
396
|
+
</table>
|
|
397
|
+
<table class="table table-sm table-bordered">
|
|
398
|
+
<tbody>
|
|
399
|
+
<tr>
|
|
400
|
+
<td class="col-md-4">
|
|
401
|
+
<a name="OPEN_API_SERVER_INDEX"></a>
|
|
402
|
+
<span class="name">
|
|
403
|
+
<span ><b>OPEN_API_SERVER_INDEX</b></span>
|
|
404
|
+
<a href="#OPEN_API_SERVER_INDEX"><span class="icon ion-ios-link"></span></a>
|
|
405
|
+
</span>
|
|
406
|
+
</td>
|
|
407
|
+
</tr>
|
|
408
|
+
<tr>
|
|
409
|
+
<td class="col-md-4">
|
|
410
|
+
<i>Default value : </i><code>new HttpContextToken<number>(() => 0)</code>
|
|
411
|
+
</td>
|
|
412
|
+
</tr>
|
|
413
|
+
|
|
414
|
+
|
|
269
415
|
</tbody>
|
|
270
416
|
</table>
|
|
271
417
|
</section>
|
package/compodoc/properties.html
CHANGED
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
</ol>
|
|
103
103
|
<ul class="properties-list">
|
|
104
104
|
<li>
|
|
105
|
-
<b>Version</b> : 19.
|
|
105
|
+
<b>Version</b> : 19.3.0-dev.0</li>
|
|
106
106
|
<li>
|
|
107
107
|
<b>Description</b> : This package provides tools for working with OpenAPI specifications in Angular applications. It includes services for configuring and loading OpenAPI definitions, validating requests and responses against schemas, and handling errors. It also offers utilities for building HTTP requests based on OpenAPI definitions.
|
|
108
108
|
</li>
|