@rxap/open-api 19.3.0-dev.0 → 19.3.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/compodoc/changelog.html +14 -0
  3. package/compodoc/classes/SchemaValidationMixin.html +37 -32
  4. package/compodoc/dependencies.html +2 -2
  5. package/compodoc/interfaces/SchemaValidationResponse.html +17 -12
  6. package/compodoc/js/search/search_index.js +2 -2
  7. package/compodoc/miscellaneous/functions.html +223 -0
  8. package/compodoc/miscellaneous/variables.html +2 -1
  9. package/compodoc/properties.html +1 -1
  10. package/docs/documentation.json +650 -151
  11. package/docs/html/assets/navigation.js +1 -1
  12. package/docs/html/assets/search.js +1 -1
  13. package/docs/html/classes/OpenApiConfigService.html +3 -3
  14. package/docs/html/classes/OpenApiHttpResponseError.html +4 -4
  15. package/docs/html/classes/RxapOpenApiError.html +5 -5
  16. package/docs/html/classes/SchemaValidationMixin.html +5 -5
  17. package/docs/html/functions/AssertOpenApiV3.html +1 -1
  18. package/docs/html/functions/IsOpenApiV3.html +1 -1
  19. package/docs/html/functions/IsReferenceObject.html +1 -1
  20. package/docs/html/functions/NotContainsReferenceObjects.html +1 -1
  21. package/docs/html/functions/OpenApiInit.html +1 -1
  22. package/docs/html/functions/getJsonContentSchema.html +1 -0
  23. package/docs/html/functions/getJsonSchema.html +1 -0
  24. package/docs/html/functions/hasJsonContentSchema.html +1 -0
  25. package/docs/html/functions/hasJsonSchema.html +1 -0
  26. package/docs/html/functions/injectOpenApiBaseUrlHttpInterceptorFn.html +1 -1
  27. package/docs/html/index.html +2 -2
  28. package/docs/html/interfaces/OpenApiInitOptions.html +3 -3
  29. package/docs/html/interfaces/OpenApiMetaData.html +5 -5
  30. package/docs/html/interfaces/OperationObjectWithMetadata.html +2 -2
  31. package/docs/html/interfaces/SchemaValidationResponse.html +2 -2
  32. package/docs/html/modules.html +1 -1
  33. package/docs/html/types/OperationMap.html +1 -1
  34. package/docs/html/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.html +1 -1
  35. package/docs/html/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.html +1 -1
  36. package/docs/html/variables/DISABLE_SCHEMA_VALIDATION.html +1 -1
  37. package/docs/html/variables/DISABLE_VALIDATION.html +1 -1
  38. package/docs/html/variables/OPEN_API_OPERATION.html +1 -1
  39. package/docs/html/variables/OPEN_API_OPERATION_ID.html +1 -1
  40. package/docs/html/variables/OPEN_API_SERVER_ID.html +1 -1
  41. package/docs/html/variables/OPEN_API_SERVER_INDEX.html +1 -1
  42. package/docs/html/variables/RXAP_OPEN_API_CONFIG.html +1 -1
  43. package/docs/html/variables/RXAP_OPEN_API_STRICT_VALIDATOR.html +1 -1
  44. package/docs/markdown/README.md +1 -1
  45. package/docs/markdown/classes/OpenApiConfigService.md +14 -14
  46. package/docs/markdown/classes/OpenApiHttpResponseError.md +7 -7
  47. package/docs/markdown/classes/RxapOpenApiError.md +13 -13
  48. package/docs/markdown/classes/SchemaValidationMixin.md +13 -13
  49. package/docs/markdown/functions/AssertOpenApiV3.md +2 -2
  50. package/docs/markdown/functions/IsOpenApiV3.md +2 -2
  51. package/docs/markdown/functions/IsReferenceObject.md +2 -2
  52. package/docs/markdown/functions/NotContainsReferenceObjects.md +2 -2
  53. package/docs/markdown/functions/OpenApiInit.md +2 -2
  54. package/docs/markdown/functions/getJsonContentSchema.md +21 -0
  55. package/docs/markdown/functions/getJsonSchema.md +21 -0
  56. package/docs/markdown/functions/hasJsonContentSchema.md +25 -0
  57. package/docs/markdown/functions/hasJsonSchema.md +21 -0
  58. package/docs/markdown/functions/injectOpenApiBaseUrlHttpInterceptorFn.md +2 -2
  59. package/docs/markdown/globals.md +6 -2
  60. package/docs/markdown/interfaces/OpenApiInitOptions.md +4 -4
  61. package/docs/markdown/interfaces/OpenApiMetaData.md +7 -7
  62. package/docs/markdown/interfaces/OperationObjectWithMetadata.md +4 -4
  63. package/docs/markdown/interfaces/SchemaValidationResponse.md +6 -6
  64. package/docs/markdown/type-aliases/OperationMap.md +2 -2
  65. package/docs/markdown/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +2 -2
  66. package/docs/markdown/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +2 -2
  67. package/docs/markdown/variables/DISABLE_SCHEMA_VALIDATION.md +2 -2
  68. package/docs/markdown/variables/DISABLE_VALIDATION.md +2 -2
  69. package/docs/markdown/variables/OPEN_API_OPERATION.md +2 -2
  70. package/docs/markdown/variables/OPEN_API_OPERATION_ID.md +2 -2
  71. package/docs/markdown/variables/OPEN_API_SERVER_ID.md +2 -2
  72. package/docs/markdown/variables/OPEN_API_SERVER_INDEX.md +2 -2
  73. package/docs/markdown/variables/RXAP_OPEN_API_CONFIG.md +2 -2
  74. package/docs/markdown/variables/RXAP_OPEN_API_STRICT_VALIDATOR.md +2 -2
  75. package/docs/wiki/Class.OpenApiConfigService.md +13 -13
  76. package/docs/wiki/Class.OpenApiHttpResponseError.md +6 -6
  77. package/docs/wiki/Class.RxapOpenApiError.md +12 -12
  78. package/docs/wiki/Class.SchemaValidationMixin.md +12 -12
  79. package/docs/wiki/Function.AssertOpenApiV3.md +1 -1
  80. package/docs/wiki/Function.IsOpenApiV3.md +1 -1
  81. package/docs/wiki/Function.IsReferenceObject.md +1 -1
  82. package/docs/wiki/Function.NotContainsReferenceObjects.md +1 -1
  83. package/docs/wiki/Function.OpenApiInit.md +1 -1
  84. package/docs/wiki/Function.getJsonContentSchema.md +17 -0
  85. package/docs/wiki/Function.getJsonSchema.md +17 -0
  86. package/docs/wiki/Function.hasJsonContentSchema.md +21 -0
  87. package/docs/wiki/Function.hasJsonSchema.md +17 -0
  88. package/docs/wiki/Function.injectOpenApiBaseUrlHttpInterceptorFn.md +1 -1
  89. package/docs/wiki/Interface.OpenApiInitOptions.md +3 -3
  90. package/docs/wiki/Interface.OpenApiMetaData.md +6 -6
  91. package/docs/wiki/Interface.OperationObjectWithMetadata.md +3 -3
  92. package/docs/wiki/Interface.SchemaValidationResponse.md +5 -5
  93. package/docs/wiki/TypeAlias.OperationMap.md +1 -1
  94. package/docs/wiki/Variable.DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +1 -1
  95. package/docs/wiki/Variable.DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +1 -1
  96. package/docs/wiki/Variable.DISABLE_SCHEMA_VALIDATION.md +1 -1
  97. package/docs/wiki/Variable.DISABLE_VALIDATION.md +1 -1
  98. package/docs/wiki/Variable.OPEN_API_OPERATION.md +1 -1
  99. package/docs/wiki/Variable.OPEN_API_OPERATION_ID.md +1 -1
  100. package/docs/wiki/Variable.OPEN_API_SERVER_ID.md +1 -1
  101. package/docs/wiki/Variable.OPEN_API_SERVER_INDEX.md +1 -1
  102. package/docs/wiki/Variable.RXAP_OPEN_API_CONFIG.md +1 -1
  103. package/docs/wiki/Variable.RXAP_OPEN_API_STRICT_VALIDATOR.md +1 -1
  104. package/docs/wiki/_Sidebar.md +4 -0
  105. package/docs/wiki/globals.md +5 -1
  106. package/fesm2022/rxap-open-api.mjs +47 -14
  107. package/fesm2022/rxap-open-api.mjs.map +1 -1
  108. package/http-resource/lib/types.d.ts +1 -1
  109. package/lib/utilities.d.ts +6 -0
  110. package/package.json +6 -6
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **NotContainsReferenceObjects**\<`T`\>(`array`?): `array is T[]`
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/utilities.ts:8](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/utilities.ts#L8)
7
+ Defined in: [packages/angular/open-api/src/lib/utilities.ts:10](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/utilities.ts#L10)
8
8
 
9
9
  ## Type Parameters
10
10
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **OpenApiInit**(`environment`, `options`): `undefined` \| `Promise`\<`void`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/open-api-init.ts:20](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api-init.ts#L20)
7
+ Defined in: [packages/angular/open-api/src/lib/open-api-init.ts:20](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api-init.ts#L20)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -0,0 +1,17 @@
1
+ [@rxap/open-api](../wiki/globals) / getJsonContentSchema
2
+
3
+ # Function: getJsonContentSchema()
4
+
5
+ > **getJsonContentSchema**(`data`): `null` \| `SchemaObject`
6
+
7
+ Defined in: [packages/angular/open-api/src/lib/utilities.ts:32](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/utilities.ts#L32)
8
+
9
+ ## Parameters
10
+
11
+ ### data
12
+
13
+ `RequestBodyObject` | `ResponseObject`
14
+
15
+ ## Returns
16
+
17
+ `null` \| `SchemaObject`
@@ -0,0 +1,17 @@
1
+ [@rxap/open-api](../wiki/globals) / getJsonSchema
2
+
3
+ # Function: getJsonSchema()
4
+
5
+ > **getJsonSchema**(`map`): `null` \| `SchemaObject`
6
+
7
+ Defined in: [packages/angular/open-api/src/lib/utilities.ts:45](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/utilities.ts#L45)
8
+
9
+ ## Parameters
10
+
11
+ ### map
12
+
13
+ `Record`\<`string`, `MediaTypeObject`\>
14
+
15
+ ## Returns
16
+
17
+ `null` \| `SchemaObject`
@@ -0,0 +1,21 @@
1
+ [@rxap/open-api](../wiki/globals) / hasJsonContentSchema
2
+
3
+ # Function: hasJsonContentSchema()
4
+
5
+ > **hasJsonContentSchema**\<`T`\>(`data`): `data is T & { content: Record<string, MediaTypeObject> }`
6
+
7
+ Defined in: [packages/angular/open-api/src/lib/utilities.ts:26](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/utilities.ts#L26)
8
+
9
+ ## Type Parameters
10
+
11
+ • **T** *extends* `RequestBodyObject` \| `ResponseObject`
12
+
13
+ ## Parameters
14
+
15
+ ### data
16
+
17
+ `undefined` | `ReferenceObject` | `T`
18
+
19
+ ## Returns
20
+
21
+ `data is T & { content: Record<string, MediaTypeObject> }`
@@ -0,0 +1,17 @@
1
+ [@rxap/open-api](../wiki/globals) / hasJsonSchema
2
+
3
+ # Function: hasJsonSchema()
4
+
5
+ > **hasJsonSchema**(`map`): `boolean`
6
+
7
+ Defined in: [packages/angular/open-api/src/lib/utilities.ts:41](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/utilities.ts#L41)
8
+
9
+ ## Parameters
10
+
11
+ ### map
12
+
13
+ `undefined` | `Record`\<`string`, `MediaTypeObject`\>
14
+
15
+ ## Returns
16
+
17
+ `boolean`
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **injectOpenApiBaseUrlHttpInterceptorFn**(`req`, `next`): `Observable`\<`HttpEvent`\<`unknown`\>\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/http-interceptors.ts:8](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/http-interceptors.ts#L8)
7
+ Defined in: [packages/angular/open-api/src/lib/http-interceptors.ts:9](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/http-interceptors.ts#L9)
8
8
 
9
9
  ## Parameters
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: OpenApiInitOptions
4
4
 
5
- Defined in: [packages/angular/open-api/src/lib/open-api-init.ts:6](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api-init.ts#L6)
5
+ Defined in: [packages/angular/open-api/src/lib/open-api-init.ts:6](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api-init.ts#L6)
6
6
 
7
7
  ## Properties
8
8
 
@@ -10,7 +10,7 @@ Defined in: [packages/angular/open-api/src/lib/open-api-init.ts:6](https://gitla
10
10
 
11
11
  > `optional` **load**: `boolean` \| \{ `openApiUrl`: `string`; \}
12
12
 
13
- Defined in: [packages/angular/open-api/src/lib/open-api-init.ts:11](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api-init.ts#L11)
13
+ Defined in: [packages/angular/open-api/src/lib/open-api-init.ts:11](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api-init.ts#L11)
14
14
 
15
15
  true - load the open api config file from the default url
16
16
  default url: openapi.json
@@ -21,6 +21,6 @@ default url: openapi.json
21
21
 
22
22
  > `optional` **origin**: `string`
23
23
 
24
- Defined in: [packages/angular/open-api/src/lib/open-api-init.ts:17](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api-init.ts#L17)
24
+ Defined in: [packages/angular/open-api/src/lib/open-api-init.ts:17](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api-init.ts#L17)
25
25
 
26
26
  The location origin prefix for the open api base urls if the base url is not absolute. defaults to location.origin
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: OpenApiMetaData
4
4
 
5
- Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:4](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api.meta-data.ts#L4)
5
+ Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:4](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api.meta-data.ts#L4)
6
6
 
7
7
  ## Extends
8
8
 
@@ -18,7 +18,7 @@ Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:4](https://
18
18
 
19
19
  > **id**: `string`
20
20
 
21
- Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:17](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api.meta-data.ts#L17)
21
+ Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:17](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api.meta-data.ts#L17)
22
22
 
23
23
  #### Overrides
24
24
 
@@ -30,7 +30,7 @@ Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:17](https:/
30
30
 
31
31
  > `optional` **operation**: `string` \| [`OperationObjectWithMetadata`](../wiki/Interface.OperationObjectWithMetadata)
32
32
 
33
- Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:8](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api.meta-data.ts#L8)
33
+ Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:8](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api.meta-data.ts#L8)
34
34
 
35
35
  The operation object with path and method
36
36
 
@@ -40,7 +40,7 @@ The operation object with path and method
40
40
 
41
41
  > `optional` **refresh**: (`Type$1`\<`Refreshable`\> \| `InjectionToken`\<`Refreshable`\> \| `AbstractType`\<`Refreshable`\>)[]
42
42
 
43
- Defined in: [packages/angular/remote-method/src/lib/base.remote-method.ts:26](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/remote-method/src/lib/base.remote-method.ts#L26)
43
+ Defined in: [packages/angular/remote-method/src/lib/base.remote-method.ts:26](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/remote-method/src/lib/base.remote-method.ts#L26)
44
44
 
45
45
  #### Inherited from
46
46
 
@@ -52,7 +52,7 @@ Defined in: [packages/angular/remote-method/src/lib/base.remote-method.ts:26](ht
52
52
 
53
53
  > `optional` **serverId**: `string`
54
54
 
55
- Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:16](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api.meta-data.ts#L16)
55
+ Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:16](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api.meta-data.ts#L16)
56
56
 
57
57
  used to specify the target server for the reset api operation
58
58
 
@@ -62,6 +62,6 @@ used to specify the target server for the reset api operation
62
62
 
63
63
  > `optional` **serverIndex**: `number`
64
64
 
65
- Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:12](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api.meta-data.ts#L12)
65
+ Defined in: [packages/angular/open-api/src/lib/open-api.meta-data.ts:12](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api.meta-data.ts#L12)
66
66
 
67
67
  The index of the server object in the servers array in the open api config
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: OperationObjectWithMetadata
4
4
 
5
- Defined in: [packages/angular/open-api/src/lib/open-api.ts:3](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api.ts#L3)
5
+ Defined in: [packages/angular/open-api/src/lib/open-api.ts:3](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api.ts#L3)
6
6
 
7
7
  ## Extends
8
8
 
@@ -66,7 +66,7 @@ Defined in: node\_modules/openapi-types/dist/index.d.ts:219
66
66
 
67
67
  > **method**: `string`
68
68
 
69
- Defined in: [packages/angular/open-api/src/lib/open-api.ts:5](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api.ts#L5)
69
+ Defined in: [packages/angular/open-api/src/lib/open-api.ts:5](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api.ts#L5)
70
70
 
71
71
  ***
72
72
 
@@ -98,7 +98,7 @@ Defined in: node\_modules/openapi-types/dist/index.d.ts:221
98
98
 
99
99
  > **path**: `string`
100
100
 
101
- Defined in: [packages/angular/open-api/src/lib/open-api.ts:4](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api.ts#L4)
101
+ Defined in: [packages/angular/open-api/src/lib/open-api.ts:4](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api.ts#L4)
102
102
 
103
103
  ***
104
104
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: SchemaValidationResponse\<Data\>
4
4
 
5
- Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:22](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L22)
5
+ Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:24](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L24)
6
6
 
7
7
  ## Type Parameters
8
8
 
@@ -14,7 +14,7 @@ Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:22](ht
14
14
 
15
15
  > `optional` **body**: `null` \| `Data`
16
16
 
17
- Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:25](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L25)
17
+ Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:27](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L27)
18
18
 
19
19
  ***
20
20
 
@@ -22,7 +22,7 @@ Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:25](ht
22
22
 
23
23
  > `optional` **data**: `Data`
24
24
 
25
- Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:26](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L26)
25
+ Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:28](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L28)
26
26
 
27
27
  ***
28
28
 
@@ -30,7 +30,7 @@ Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:26](ht
30
30
 
31
31
  > **headers**: `HttpHeaders`
32
32
 
33
- Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:23](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L23)
33
+ Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:25](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L25)
34
34
 
35
35
  ***
36
36
 
@@ -38,4 +38,4 @@ Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:23](ht
38
38
 
39
39
  > **status**: `number`
40
40
 
41
- Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:24](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L24)
41
+ Defined in: [packages/angular/open-api/src/lib/schema-validation.mixin.ts:26](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/schema-validation.mixin.ts#L26)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > **OperationMap**: `Map`\<`string`, [`OperationObjectWithMetadata`](../wiki/Interface.OperationObjectWithMetadata)\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:15](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/open-api-config.service.ts#L15)
7
+ Defined in: [packages/angular/open-api/src/lib/open-api-config.service.ts:15](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/open-api-config.service.ts#L15)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **DEFAULT\_OPEN\_API\_DATA\_SOURCE\_META\_DATA**: `InjectionToken`\<`unknown`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/tokens.ts:7](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/tokens.ts#L7)
7
+ Defined in: [packages/angular/open-api/src/lib/tokens.ts:7](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/tokens.ts#L7)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **DEFAULT\_OPEN\_API\_REMOTE\_METHOD\_META\_DATA**: `InjectionToken`\<`unknown`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/tokens.ts:5](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/tokens.ts#L5)
7
+ Defined in: [packages/angular/open-api/src/lib/tokens.ts:5](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/tokens.ts#L5)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **DISABLE\_SCHEMA\_VALIDATION**: `InjectionToken`\<`boolean`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/tokens.ts:8](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/tokens.ts#L8)
7
+ Defined in: [packages/angular/open-api/src/lib/tokens.ts:8](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/tokens.ts#L8)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **DISABLE\_VALIDATION**: `InjectionToken`\<`boolean`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/tokens.ts:12](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/tokens.ts#L12)
7
+ Defined in: [packages/angular/open-api/src/lib/tokens.ts:12](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/tokens.ts#L12)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **OPEN\_API\_OPERATION**: `HttpContextToken`\<`string`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/http-context-tokens.ts:6](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/http-context-tokens.ts#L6)
7
+ Defined in: [packages/angular/open-api/src/lib/http-context-tokens.ts:6](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/http-context-tokens.ts#L6)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **OPEN\_API\_OPERATION\_ID**: `HttpContextToken`\<`string`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/http-context-tokens.ts:3](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/http-context-tokens.ts#L3)
7
+ Defined in: [packages/angular/open-api/src/lib/http-context-tokens.ts:3](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/http-context-tokens.ts#L3)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **OPEN\_API\_SERVER\_ID**: `HttpContextToken`\<`null` \| `string`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/http-context-tokens.ts:4](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/http-context-tokens.ts#L4)
7
+ Defined in: [packages/angular/open-api/src/lib/http-context-tokens.ts:4](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/http-context-tokens.ts#L4)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **OPEN\_API\_SERVER\_INDEX**: `HttpContextToken`\<`number`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/http-context-tokens.ts:5](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/http-context-tokens.ts#L5)
7
+ Defined in: [packages/angular/open-api/src/lib/http-context-tokens.ts:5](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/http-context-tokens.ts#L5)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **RXAP\_OPEN\_API\_CONFIG**: `InjectionToken`\<`unknown`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/tokens.ts:3](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/tokens.ts#L3)
7
+ Defined in: [packages/angular/open-api/src/lib/tokens.ts:3](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/tokens.ts#L3)
@@ -4,4 +4,4 @@
4
4
 
5
5
  > `const` **RXAP\_OPEN\_API\_STRICT\_VALIDATOR**: `InjectionToken`\<`unknown`\>
6
6
 
7
- Defined in: [packages/angular/open-api/src/lib/tokens.ts:4](https://gitlab.com/rxap/packages/-/blob/30fb042ed61f3148d2437139b171e7b42cc8d544/packages/angular/open-api/src/lib/tokens.ts#L4)
7
+ Defined in: [packages/angular/open-api/src/lib/tokens.ts:4](https://gitlab.com/rxap/packages/-/blob/d0e1721200ad5e4c24c684ffa7e213d46aefaf05/packages/angular/open-api/src/lib/tokens.ts#L4)
@@ -34,6 +34,10 @@
34
34
  ### Functions
35
35
 
36
36
  - [AssertOpenApiV3](../wiki/Function.AssertOpenApiV3)
37
+ - [getJsonContentSchema](../wiki/Function.getJsonContentSchema)
38
+ - [getJsonSchema](../wiki/Function.getJsonSchema)
39
+ - [hasJsonContentSchema](../wiki/Function.hasJsonContentSchema)
40
+ - [hasJsonSchema](../wiki/Function.hasJsonSchema)
37
41
  - [injectOpenApiBaseUrlHttpInterceptorFn](../wiki/Function.injectOpenApiBaseUrlHttpInterceptorFn)
38
42
  - [IsOpenApiV3](../wiki/Function.IsOpenApiV3)
39
43
  - [IsReferenceObject](../wiki/Function.IsReferenceObject)
@@ -1,4 +1,4 @@
1
- # @rxap/open-api v19.3.0-dev.0
1
+ # @rxap/open-api v19.3.0-dev.2
2
2
 
3
3
  ## Classes
4
4
 
@@ -34,6 +34,10 @@
34
34
  ## Functions
35
35
 
36
36
  - [AssertOpenApiV3](../wiki/Function.AssertOpenApiV3)
37
+ - [getJsonContentSchema](../wiki/Function.getJsonContentSchema)
38
+ - [getJsonSchema](../wiki/Function.getJsonSchema)
39
+ - [hasJsonContentSchema](../wiki/Function.hasJsonContentSchema)
40
+ - [hasJsonSchema](../wiki/Function.hasJsonSchema)
37
41
  - [injectOpenApiBaseUrlHttpInterceptorFn](../wiki/Function.injectOpenApiBaseUrlHttpInterceptorFn)
38
42
  - [IsOpenApiV3](../wiki/Function.IsOpenApiV3)
39
43
  - [IsReferenceObject](../wiki/Function.IsReferenceObject)
@@ -43,6 +43,37 @@ function AssertOpenApiV3(obj) {
43
43
  throw new RxapOpenApiError('Only openapi version 3.x.x is supported');
44
44
  }
45
45
  }
46
+ function hasJsonContentSchema(data) {
47
+ return !!data && !IsReferenceObject(data) && 'content' in data && !!data.content && hasJsonSchema(data.content);
48
+ }
49
+ function getJsonContentSchema(data) {
50
+ if (hasJsonContentSchema(data)) {
51
+ return getJsonSchema(data.content);
52
+ }
53
+ return null;
54
+ }
55
+ function hasJsonSchema(map) {
56
+ return !!map && Object.keys(map).some(key => key.match(/^application\/(.+\+)?json/));
57
+ }
58
+ function getJsonSchema(map) {
59
+ if (!hasJsonSchema(map)) {
60
+ return null;
61
+ }
62
+ let schema;
63
+ if ('application/json' in map) {
64
+ schema = map['application/json'].schema;
65
+ }
66
+ else {
67
+ schema = Object.entries(map).find(([key]) => key.match(/^application\/(.+\+)?json/))?.[1]?.schema;
68
+ }
69
+ if (!schema) {
70
+ return null;
71
+ }
72
+ if (IsReferenceObject(schema)) {
73
+ return null;
74
+ }
75
+ return schema;
76
+ }
46
77
 
47
78
  class OpenApiConfigService {
48
79
  static { this.Config = null; }
@@ -224,7 +255,8 @@ const injectOpenApiBaseUrlHttpInterceptorFn = (req, next) => {
224
255
  }
225
256
  }
226
257
  else {
227
- return next(req.clone({ url: new URL(req.url, baseUrl).toString() }));
258
+ const url = JoinPath(baseUrl, req.url);
259
+ return next(req.clone({ url }));
228
260
  }
229
261
  }
230
262
  return next(req);
@@ -347,11 +379,11 @@ class SchemaValidationMixin {
347
379
  * @protected
348
380
  */
349
381
  validateResponse(operation, response, strict = false) {
350
- // region only validate the response if the content type is undefined or application/json
382
+ // region only validate the response if the content type is undefined or json like
351
383
  const contentType = response.headers.get('Content-Type');
352
- if (contentType && contentType !== 'application/json') {
384
+ if (contentType && contentType.match(/^application\/(.+\+)?json/)) {
353
385
  if (isDevMode()) {
354
- console.warn('Response validation is only supported for content type application/json');
386
+ console.warn('Response validation is only supported for content types that are json like.');
355
387
  }
356
388
  return;
357
389
  }
@@ -374,13 +406,13 @@ class SchemaValidationMixin {
374
406
  }
375
407
  // region validate the response against the schema if defined
376
408
  // TODO : create schema that validates all parameters at once
377
- if (responseObject.content &&
378
- responseObject.content['application/json'] &&
379
- responseObject.content['application/json'].schema) {
380
- const schema = responseObject.content['application/json'].schema;
381
- const data = response.body ?? response.data;
382
- if (!this.validate(schema, data)) {
383
- this.validationError('The response is not valid ageist the operation schema!', strict, schema, data);
409
+ if (hasJsonContentSchema(responseObject)) {
410
+ const schema = getJsonContentSchema(responseObject);
411
+ if (schema) {
412
+ const data = response.body ?? response.data;
413
+ if (!this.validate(schema, data)) {
414
+ this.validationError('The response is not valid ageist the operation schema!', strict, schema, data);
415
+ }
384
416
  }
385
417
  }
386
418
  // endregion
@@ -399,8 +431,8 @@ class SchemaValidationMixin {
399
431
  if (body === undefined && operation.requestBody.required) {
400
432
  this.validationError('The request body is required!', strict);
401
433
  }
402
- if (operation.requestBody.content && operation.requestBody.content['application/json']) {
403
- const schema = operation.requestBody.content['application/json'].schema;
434
+ if (hasJsonContentSchema(operation.requestBody)) {
435
+ const schema = getJsonContentSchema(operation.requestBody);
404
436
  if (schema) {
405
437
  if (!this.validate(schema, body)) {
406
438
  this.validationError('The request body is not valid!', strict, schema, body);
@@ -564,6 +596,7 @@ class SchemaValidationMixin {
564
596
  const contentType = accept[0];
565
597
  switch (contentType) {
566
598
  case 'application/json':
599
+ case 'application/ld+json':
567
600
  assertsObject(requestBody);
568
601
  return [requestBody, contentType];
569
602
  case 'application/x-www-form-urlencoded':
@@ -621,5 +654,5 @@ class SchemaValidationMixin {
621
654
  * Generated bundle index. Do not edit.
622
655
  */
623
656
 
624
- export { AssertOpenApiV3, DEFAULT_OPEN_API_DATA_SOURCE_META_DATA, DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA, DISABLE_SCHEMA_VALIDATION, DISABLE_VALIDATION, IsOpenApiV3, IsReferenceObject, NotContainsReferenceObjects, OPEN_API_OPERATION, OPEN_API_OPERATION_ID, OPEN_API_SERVER_ID, OPEN_API_SERVER_INDEX, OpenApiConfigService, OpenApiHttpResponseError, OpenApiInit, RXAP_OPEN_API_CONFIG, RXAP_OPEN_API_STRICT_VALIDATOR, RxapOpenApiError, SchemaValidationMixin, injectOpenApiBaseUrlHttpInterceptorFn };
657
+ export { AssertOpenApiV3, DEFAULT_OPEN_API_DATA_SOURCE_META_DATA, DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA, DISABLE_SCHEMA_VALIDATION, DISABLE_VALIDATION, IsOpenApiV3, IsReferenceObject, NotContainsReferenceObjects, OPEN_API_OPERATION, OPEN_API_OPERATION_ID, OPEN_API_SERVER_ID, OPEN_API_SERVER_INDEX, OpenApiConfigService, OpenApiHttpResponseError, OpenApiInit, RXAP_OPEN_API_CONFIG, RXAP_OPEN_API_STRICT_VALIDATOR, RxapOpenApiError, SchemaValidationMixin, getJsonContentSchema, getJsonSchema, hasJsonContentSchema, hasJsonSchema, injectOpenApiBaseUrlHttpInterceptorFn };
625
658
  //# sourceMappingURL=rxap-open-api.mjs.map