@rxap/open-api 19.3.0-dev.0 → 19.3.0-dev.1

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 (108) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/compodoc/changelog.html +5 -0
  3. package/compodoc/classes/SchemaValidationMixin.html +37 -32
  4. package/compodoc/dependencies.html +1 -1
  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/properties.html +1 -1
  9. package/docs/documentation.json +648 -149
  10. package/docs/html/assets/navigation.js +1 -1
  11. package/docs/html/assets/search.js +1 -1
  12. package/docs/html/classes/OpenApiConfigService.html +3 -3
  13. package/docs/html/classes/OpenApiHttpResponseError.html +4 -4
  14. package/docs/html/classes/RxapOpenApiError.html +5 -5
  15. package/docs/html/classes/SchemaValidationMixin.html +5 -5
  16. package/docs/html/functions/AssertOpenApiV3.html +1 -1
  17. package/docs/html/functions/IsOpenApiV3.html +1 -1
  18. package/docs/html/functions/IsReferenceObject.html +1 -1
  19. package/docs/html/functions/NotContainsReferenceObjects.html +1 -1
  20. package/docs/html/functions/OpenApiInit.html +1 -1
  21. package/docs/html/functions/getJsonContentSchema.html +1 -0
  22. package/docs/html/functions/getJsonSchema.html +1 -0
  23. package/docs/html/functions/hasJsonContentSchema.html +1 -0
  24. package/docs/html/functions/hasJsonSchema.html +1 -0
  25. package/docs/html/functions/injectOpenApiBaseUrlHttpInterceptorFn.html +1 -1
  26. package/docs/html/index.html +2 -2
  27. package/docs/html/interfaces/OpenApiInitOptions.html +3 -3
  28. package/docs/html/interfaces/OpenApiMetaData.html +5 -5
  29. package/docs/html/interfaces/OperationObjectWithMetadata.html +2 -2
  30. package/docs/html/interfaces/SchemaValidationResponse.html +2 -2
  31. package/docs/html/modules.html +1 -1
  32. package/docs/html/types/OperationMap.html +1 -1
  33. package/docs/html/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.html +1 -1
  34. package/docs/html/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.html +1 -1
  35. package/docs/html/variables/DISABLE_SCHEMA_VALIDATION.html +1 -1
  36. package/docs/html/variables/DISABLE_VALIDATION.html +1 -1
  37. package/docs/html/variables/OPEN_API_OPERATION.html +1 -1
  38. package/docs/html/variables/OPEN_API_OPERATION_ID.html +1 -1
  39. package/docs/html/variables/OPEN_API_SERVER_ID.html +1 -1
  40. package/docs/html/variables/OPEN_API_SERVER_INDEX.html +1 -1
  41. package/docs/html/variables/RXAP_OPEN_API_CONFIG.html +1 -1
  42. package/docs/html/variables/RXAP_OPEN_API_STRICT_VALIDATOR.html +1 -1
  43. package/docs/markdown/README.md +1 -1
  44. package/docs/markdown/classes/OpenApiConfigService.md +14 -14
  45. package/docs/markdown/classes/OpenApiHttpResponseError.md +7 -7
  46. package/docs/markdown/classes/RxapOpenApiError.md +13 -13
  47. package/docs/markdown/classes/SchemaValidationMixin.md +13 -13
  48. package/docs/markdown/functions/AssertOpenApiV3.md +2 -2
  49. package/docs/markdown/functions/IsOpenApiV3.md +2 -2
  50. package/docs/markdown/functions/IsReferenceObject.md +2 -2
  51. package/docs/markdown/functions/NotContainsReferenceObjects.md +2 -2
  52. package/docs/markdown/functions/OpenApiInit.md +2 -2
  53. package/docs/markdown/functions/getJsonContentSchema.md +21 -0
  54. package/docs/markdown/functions/getJsonSchema.md +21 -0
  55. package/docs/markdown/functions/hasJsonContentSchema.md +25 -0
  56. package/docs/markdown/functions/hasJsonSchema.md +21 -0
  57. package/docs/markdown/functions/injectOpenApiBaseUrlHttpInterceptorFn.md +2 -2
  58. package/docs/markdown/globals.md +6 -2
  59. package/docs/markdown/interfaces/OpenApiInitOptions.md +4 -4
  60. package/docs/markdown/interfaces/OpenApiMetaData.md +7 -7
  61. package/docs/markdown/interfaces/OperationObjectWithMetadata.md +4 -4
  62. package/docs/markdown/interfaces/SchemaValidationResponse.md +6 -6
  63. package/docs/markdown/type-aliases/OperationMap.md +2 -2
  64. package/docs/markdown/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +2 -2
  65. package/docs/markdown/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +2 -2
  66. package/docs/markdown/variables/DISABLE_SCHEMA_VALIDATION.md +2 -2
  67. package/docs/markdown/variables/DISABLE_VALIDATION.md +2 -2
  68. package/docs/markdown/variables/OPEN_API_OPERATION.md +2 -2
  69. package/docs/markdown/variables/OPEN_API_OPERATION_ID.md +2 -2
  70. package/docs/markdown/variables/OPEN_API_SERVER_ID.md +2 -2
  71. package/docs/markdown/variables/OPEN_API_SERVER_INDEX.md +2 -2
  72. package/docs/markdown/variables/RXAP_OPEN_API_CONFIG.md +2 -2
  73. package/docs/markdown/variables/RXAP_OPEN_API_STRICT_VALIDATOR.md +2 -2
  74. package/docs/wiki/Class.OpenApiConfigService.md +13 -13
  75. package/docs/wiki/Class.OpenApiHttpResponseError.md +6 -6
  76. package/docs/wiki/Class.RxapOpenApiError.md +12 -12
  77. package/docs/wiki/Class.SchemaValidationMixin.md +12 -12
  78. package/docs/wiki/Function.AssertOpenApiV3.md +1 -1
  79. package/docs/wiki/Function.IsOpenApiV3.md +1 -1
  80. package/docs/wiki/Function.IsReferenceObject.md +1 -1
  81. package/docs/wiki/Function.NotContainsReferenceObjects.md +1 -1
  82. package/docs/wiki/Function.OpenApiInit.md +1 -1
  83. package/docs/wiki/Function.getJsonContentSchema.md +17 -0
  84. package/docs/wiki/Function.getJsonSchema.md +17 -0
  85. package/docs/wiki/Function.hasJsonContentSchema.md +21 -0
  86. package/docs/wiki/Function.hasJsonSchema.md +17 -0
  87. package/docs/wiki/Function.injectOpenApiBaseUrlHttpInterceptorFn.md +1 -1
  88. package/docs/wiki/Interface.OpenApiInitOptions.md +3 -3
  89. package/docs/wiki/Interface.OpenApiMetaData.md +6 -6
  90. package/docs/wiki/Interface.OperationObjectWithMetadata.md +3 -3
  91. package/docs/wiki/Interface.SchemaValidationResponse.md +5 -5
  92. package/docs/wiki/TypeAlias.OperationMap.md +1 -1
  93. package/docs/wiki/Variable.DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +1 -1
  94. package/docs/wiki/Variable.DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +1 -1
  95. package/docs/wiki/Variable.DISABLE_SCHEMA_VALIDATION.md +1 -1
  96. package/docs/wiki/Variable.DISABLE_VALIDATION.md +1 -1
  97. package/docs/wiki/Variable.OPEN_API_OPERATION.md +1 -1
  98. package/docs/wiki/Variable.OPEN_API_OPERATION_ID.md +1 -1
  99. package/docs/wiki/Variable.OPEN_API_SERVER_ID.md +1 -1
  100. package/docs/wiki/Variable.OPEN_API_SERVER_INDEX.md +1 -1
  101. package/docs/wiki/Variable.RXAP_OPEN_API_CONFIG.md +1 -1
  102. package/docs/wiki/Variable.RXAP_OPEN_API_STRICT_VALIDATOR.md +1 -1
  103. package/docs/wiki/_Sidebar.md +4 -0
  104. package/docs/wiki/globals.md +5 -1
  105. package/fesm2022/rxap-open-api.mjs +45 -13
  106. package/fesm2022/rxap-open-api.mjs.map +1 -1
  107. package/lib/utilities.d.ts +6 -0
  108. package/package.json +4 -4
@@ -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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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:8](https://gitlab.com/rxap/packages/-/blob/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/packages/angular/open-api/src/lib/http-interceptors.ts#L8)
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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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/30fb31a5d06e5ba70b4df4fc2cc10ac0965aae4a/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.1
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; }
@@ -347,11 +378,11 @@ class SchemaValidationMixin {
347
378
  * @protected
348
379
  */
349
380
  validateResponse(operation, response, strict = false) {
350
- // region only validate the response if the content type is undefined or application/json
381
+ // region only validate the response if the content type is undefined or json like
351
382
  const contentType = response.headers.get('Content-Type');
352
- if (contentType && contentType !== 'application/json') {
383
+ if (contentType && contentType.match(/^application\/(.+\+)?json/)) {
353
384
  if (isDevMode()) {
354
- console.warn('Response validation is only supported for content type application/json');
385
+ console.warn('Response validation is only supported for content types that are json like.');
355
386
  }
356
387
  return;
357
388
  }
@@ -374,13 +405,13 @@ class SchemaValidationMixin {
374
405
  }
375
406
  // region validate the response against the schema if defined
376
407
  // 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);
408
+ if (hasJsonContentSchema(responseObject)) {
409
+ const schema = getJsonContentSchema(responseObject);
410
+ if (schema) {
411
+ const data = response.body ?? response.data;
412
+ if (!this.validate(schema, data)) {
413
+ this.validationError('The response is not valid ageist the operation schema!', strict, schema, data);
414
+ }
384
415
  }
385
416
  }
386
417
  // endregion
@@ -399,8 +430,8 @@ class SchemaValidationMixin {
399
430
  if (body === undefined && operation.requestBody.required) {
400
431
  this.validationError('The request body is required!', strict);
401
432
  }
402
- if (operation.requestBody.content && operation.requestBody.content['application/json']) {
403
- const schema = operation.requestBody.content['application/json'].schema;
433
+ if (hasJsonContentSchema(operation.requestBody)) {
434
+ const schema = getJsonContentSchema(operation.requestBody);
404
435
  if (schema) {
405
436
  if (!this.validate(schema, body)) {
406
437
  this.validationError('The request body is not valid!', strict, schema, body);
@@ -564,6 +595,7 @@ class SchemaValidationMixin {
564
595
  const contentType = accept[0];
565
596
  switch (contentType) {
566
597
  case 'application/json':
598
+ case 'application/ld+json':
567
599
  assertsObject(requestBody);
568
600
  return [requestBody, contentType];
569
601
  case 'application/x-www-form-urlencoded':
@@ -621,5 +653,5 @@ class SchemaValidationMixin {
621
653
  * Generated bundle index. Do not edit.
622
654
  */
623
655
 
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 };
656
+ 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
657
  //# sourceMappingURL=rxap-open-api.mjs.map