@rxap/open-api 19.0.3 → 19.1.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 +10 -10
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +116 -116
- package/docs/html/classes/OpenApiConfigService.html +3 -3
- package/docs/html/classes/OpenApiHttpResponseError.html +8 -8
- package/docs/html/classes/RxapOpenApiError.html +5 -5
- package/docs/html/classes/SchemaValidationMixin.html +5 -5
- package/docs/html/functions/AssertOpenApiV3.html +1 -1
- package/docs/html/functions/IsOpenApiV3.html +1 -1
- package/docs/html/functions/IsReferenceObject.html +1 -1
- package/docs/html/functions/NotContainsReferenceObjects.html +1 -1
- package/docs/html/functions/OpenApiInit.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/OpenApiInitOptions.html +3 -3
- package/docs/html/interfaces/OpenApiMetaData.html +5 -5
- package/docs/html/interfaces/OperationObjectWithMetadata.html +2 -2
- package/docs/html/interfaces/SchemaValidationResponse.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/types/OperationMap.html +1 -1
- package/docs/html/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.html +1 -1
- package/docs/html/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.html +1 -1
- package/docs/html/variables/DISABLE_SCHEMA_VALIDATION.html +1 -1
- package/docs/html/variables/DISABLE_VALIDATION.html +1 -1
- package/docs/html/variables/RXAP_OPEN_API_CONFIG.html +1 -1
- package/docs/html/variables/RXAP_OPEN_API_STRICT_VALIDATOR.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/OpenApiConfigService.md +14 -14
- package/docs/markdown/classes/OpenApiHttpResponseError.md +16 -16
- package/docs/markdown/classes/RxapOpenApiError.md +13 -13
- package/docs/markdown/classes/SchemaValidationMixin.md +12 -12
- package/docs/markdown/functions/AssertOpenApiV3.md +2 -2
- package/docs/markdown/functions/IsOpenApiV3.md +2 -2
- package/docs/markdown/functions/IsReferenceObject.md +2 -2
- package/docs/markdown/functions/NotContainsReferenceObjects.md +2 -2
- package/docs/markdown/functions/OpenApiInit.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/OpenApiInitOptions.md +4 -4
- package/docs/markdown/interfaces/OpenApiMetaData.md +7 -7
- package/docs/markdown/interfaces/OperationObjectWithMetadata.md +4 -4
- package/docs/markdown/interfaces/SchemaValidationResponse.md +6 -6
- package/docs/markdown/type-aliases/OperationMap.md +2 -2
- package/docs/markdown/variables/DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +2 -2
- package/docs/markdown/variables/DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +2 -2
- package/docs/markdown/variables/DISABLE_SCHEMA_VALIDATION.md +2 -2
- package/docs/markdown/variables/DISABLE_VALIDATION.md +2 -2
- package/docs/markdown/variables/RXAP_OPEN_API_CONFIG.md +2 -2
- package/docs/markdown/variables/RXAP_OPEN_API_STRICT_VALIDATOR.md +2 -2
- package/docs/wiki/Class.OpenApiConfigService.md +13 -13
- package/docs/wiki/Class.OpenApiHttpResponseError.md +15 -15
- package/docs/wiki/Class.RxapOpenApiError.md +12 -12
- package/docs/wiki/Class.SchemaValidationMixin.md +11 -11
- package/docs/wiki/Function.AssertOpenApiV3.md +1 -1
- package/docs/wiki/Function.IsOpenApiV3.md +1 -1
- package/docs/wiki/Function.IsReferenceObject.md +1 -1
- package/docs/wiki/Function.NotContainsReferenceObjects.md +1 -1
- package/docs/wiki/Function.OpenApiInit.md +1 -1
- package/docs/wiki/Interface.OpenApiInitOptions.md +3 -3
- package/docs/wiki/Interface.OpenApiMetaData.md +6 -6
- package/docs/wiki/Interface.OperationObjectWithMetadata.md +3 -3
- package/docs/wiki/Interface.SchemaValidationResponse.md +5 -5
- package/docs/wiki/TypeAlias.OperationMap.md +1 -1
- package/docs/wiki/Variable.DEFAULT_OPEN_API_DATA_SOURCE_META_DATA.md +1 -1
- package/docs/wiki/Variable.DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA.md +1 -1
- package/docs/wiki/Variable.DISABLE_SCHEMA_VALIDATION.md +1 -1
- package/docs/wiki/Variable.DISABLE_VALIDATION.md +1 -1
- package/docs/wiki/Variable.RXAP_OPEN_API_CONFIG.md +1 -1
- package/docs/wiki/Variable.RXAP_OPEN_API_STRICT_VALIDATOR.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-open-api-data-source-table.mjs +10 -10
- package/fesm2022/rxap-open-api-data-source.mjs +6 -6
- package/fesm2022/rxap-open-api-http-resource.mjs +39 -0
- package/fesm2022/rxap-open-api-http-resource.mjs.map +1 -0
- package/fesm2022/rxap-open-api-remote-method.mjs +6 -6
- package/fesm2022/rxap-open-api.mjs +3 -3
- package/http-resource/README.md +3 -0
- package/http-resource/index.d.ts +4 -0
- package/http-resource/lib/http-context-tokens.d.ts +4 -0
- package/http-resource/lib/http-interceptors.d.ts +2 -0
- package/http-resource/lib/to-http-params.d.ts +3 -0
- package/http-resource/lib/types.d.ts +11 -0
- package/package.json +33 -33
|
@@ -93,10 +93,10 @@ class OpenApiTableDataSource extends AbstractTableDataSource {
|
|
|
93
93
|
() => this.dataSource.disconnect(viewer),
|
|
94
94
|
];
|
|
95
95
|
}
|
|
96
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
97
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiTableDataSource, deps: [{ token: RXAP_TABLE_DATA_SOURCE }, { token: RXAP_TABLE_DATA_SOURCE_PAGINATOR, optional: true }, { token: RXAP_OPEN_API_TABLE_DATA_SOURCE_TO_PARAMETERS_FUNCTION, optional: true }, { token: RXAP_TABLE_DATA_SOURCE_SORT, optional: true }, { token: RXAP_TABLE_DATA_SOURCE_FILTER, optional: true }, { token: RXAP_TABLE_DATA_SOURCE_PARAMETERS, optional: true }, { token: RXAP_DATA_SOURCE_METADATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
97
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiTableDataSource }); }
|
|
98
98
|
}
|
|
99
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiTableDataSource, decorators: [{
|
|
100
100
|
type: Injectable
|
|
101
101
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
102
102
|
type: Inject,
|
|
@@ -142,10 +142,10 @@ class ToOpenApiTableDataSourcePipe {
|
|
|
142
142
|
transform(dataSource, paginator, tableEventToOpenApiParameters, sort, filter) {
|
|
143
143
|
return new OpenApiTableDataSource(dataSource, paginator, tableEventToOpenApiParameters, sort, filter);
|
|
144
144
|
}
|
|
145
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
146
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1
|
|
145
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ToOpenApiTableDataSourcePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
146
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: ToOpenApiTableDataSourcePipe, isStandalone: false, name: "toOpenApiTableDataSource" }); }
|
|
147
147
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ToOpenApiTableDataSourcePipe, decorators: [{
|
|
149
149
|
type: Pipe,
|
|
150
150
|
args: [{
|
|
151
151
|
name: 'toOpenApiTableDataSource',
|
|
@@ -153,11 +153,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
153
153
|
}]
|
|
154
154
|
}] });
|
|
155
155
|
class ToOpenApiTableDataSourcePipeModule {
|
|
156
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
157
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1
|
|
158
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1
|
|
156
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ToOpenApiTableDataSourcePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
157
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: ToOpenApiTableDataSourcePipeModule, declarations: [ToOpenApiTableDataSourcePipe], exports: [ToOpenApiTableDataSourcePipe] }); }
|
|
158
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ToOpenApiTableDataSourcePipeModule }); }
|
|
159
159
|
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: ToOpenApiTableDataSourcePipeModule, decorators: [{
|
|
161
161
|
type: NgModule,
|
|
162
162
|
args: [{
|
|
163
163
|
exports: [ToOpenApiTableDataSourcePipe],
|
|
@@ -117,15 +117,15 @@ let OpenApiDataSource = class OpenApiDataSource extends BaseHttpDataSource {
|
|
|
117
117
|
}));
|
|
118
118
|
}), map((event) => event.body), isDefined(), take(1), timeout(this.timeout));
|
|
119
119
|
}
|
|
120
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
121
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
120
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiDataSource, deps: [{ token: HttpClient }, { token: OpenApiConfigService }, { token: DEFAULT_OPEN_API_DATA_SOURCE_META_DATA, optional: true }, { token: RXAP_DATA_SOURCE_REFRESH, optional: true }, { token: RXAP_OPEN_API_STRICT_VALIDATOR, optional: true }, { token: DISABLE_SCHEMA_VALIDATION, optional: true }, { token: DISABLE_VALIDATION, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
121
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiDataSource }); }
|
|
122
122
|
};
|
|
123
123
|
OpenApiDataSource = OpenApiDataSource_1 = __decorate([
|
|
124
124
|
Mixin(SchemaValidationMixin),
|
|
125
125
|
__metadata("design:paramtypes", [HttpClient,
|
|
126
126
|
OpenApiConfigService, Object, Object, Object, Object, Object])
|
|
127
127
|
], OpenApiDataSource);
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiDataSource, decorators: [{
|
|
129
129
|
type: Injectable
|
|
130
130
|
}], ctorParameters: () => [{ type: i1.HttpClient, decorators: [{
|
|
131
131
|
type: Inject,
|
|
@@ -175,10 +175,10 @@ class OpenApiDataSourceLoader {
|
|
|
175
175
|
}
|
|
176
176
|
return null;
|
|
177
177
|
}
|
|
178
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
179
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
178
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiDataSourceLoader, deps: [{ token: OpenApiConfigService }, { token: HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
179
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiDataSourceLoader, providedIn: 'root' }); }
|
|
180
180
|
}
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiDataSourceLoader, decorators: [{
|
|
182
182
|
type: Injectable,
|
|
183
183
|
args: [{ providedIn: 'root' }]
|
|
184
184
|
}], ctorParameters: () => [{ type: i2.OpenApiConfigService, decorators: [{
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { HttpContextToken } from '@angular/common/http';
|
|
2
|
+
import { inject } from '@angular/core';
|
|
3
|
+
import { OpenApiConfigService } from '@rxap/open-api';
|
|
4
|
+
|
|
5
|
+
const OPEN_API_OPERATION_ID = new HttpContextToken(() => '');
|
|
6
|
+
const OPEN_API_SERVER_ID = new HttpContextToken(() => '');
|
|
7
|
+
const OPEN_API_OPERATION = new HttpContextToken(() => '');
|
|
8
|
+
|
|
9
|
+
const injectOpenApiBaseUrlHttpInterceptorFn = (req, next) => {
|
|
10
|
+
const serverId = req.context.get(OPEN_API_SERVER_ID);
|
|
11
|
+
const openApiConfigService = inject(OpenApiConfigService);
|
|
12
|
+
if (serverId) {
|
|
13
|
+
const baseUrl = openApiConfigService.getBaseUrl(undefined, serverId);
|
|
14
|
+
return next(req.clone({ url: baseUrl + req.url }));
|
|
15
|
+
}
|
|
16
|
+
return next(req);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
function toHttpParams(record, include = []) {
|
|
20
|
+
if (!record) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
return Object.entries(record)
|
|
24
|
+
.filter(([key]) => include.includes(key))
|
|
25
|
+
.reduce((acc, [key, signal]) => ({
|
|
26
|
+
...acc,
|
|
27
|
+
[key]: signal(),
|
|
28
|
+
}), {});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// region
|
|
32
|
+
// endregion
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Generated bundle index. Do not edit.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
export { OPEN_API_OPERATION, OPEN_API_OPERATION_ID, OPEN_API_SERVER_ID, injectOpenApiBaseUrlHttpInterceptorFn, toHttpParams };
|
|
39
|
+
//# sourceMappingURL=rxap-open-api-http-resource.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rxap-open-api-http-resource.mjs","sources":["../../../../../packages/angular/open-api/http-resource/src/lib/http-context-tokens.ts","../../../../../packages/angular/open-api/http-resource/src/lib/http-interceptors.ts","../../../../../packages/angular/open-api/http-resource/src/lib/to-http-params.ts","../../../../../packages/angular/open-api/http-resource/src/index.ts","../../../../../packages/angular/open-api/http-resource/src/rxap-open-api-http-resource.ts"],"sourcesContent":["import { HttpContextToken } from '@angular/common/http';\n\nexport const OPEN_API_OPERATION_ID = new HttpContextToken<string>(() => '');\nexport const OPEN_API_SERVER_ID = new HttpContextToken<string>(() => '');\nexport const OPEN_API_OPERATION = new HttpContextToken<string>(() => '');\n","import { HttpInterceptorFn } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { OpenApiConfigService } from '@rxap/open-api';\nimport { OPEN_API_SERVER_ID } from './http-context-tokens';\n\nexport const injectOpenApiBaseUrlHttpInterceptorFn: HttpInterceptorFn = (\n req,\n next\n) => {\n const serverId = req.context.get(OPEN_API_SERVER_ID);\n const openApiConfigService = inject(OpenApiConfigService);\n if (serverId) {\n const baseUrl = openApiConfigService.getBaseUrl(undefined, serverId);\n return next(req.clone({ url: baseUrl + req.url }));\n }\n\n return next(req);\n};\n","import { HttpResourceRequest } from '@angular/common/http';\nimport { Signal } from '@angular/core';\n\nexport function toHttpParams<T extends Record<string, Signal<unknown>>>(\n record: T | undefined | null,\n include: Array<keyof T> = []\n): HttpResourceRequest['params'] | undefined {\n if (!record) {\n return undefined;\n }\n return Object.entries(record as Record<string, Signal<any>>)\n .filter(([key]) => include.includes(key))\n .reduce(\n (acc, [key, signal]: [string, Signal<any>]) => ({\n ...acc,\n [key]: signal(),\n }),\n {} as Record<\n string,\n string | number | boolean | ReadonlyArray<string | number | boolean>\n >\n );\n}\n","// region \nexport * from './lib/http-context-tokens';\nexport * from './lib/http-interceptors';\nexport * from './lib/to-http-params';\nexport * from './lib/types';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAEO,MAAM,qBAAqB,GAAG,IAAI,gBAAgB,CAAS,MAAM,EAAE;AACnE,MAAM,kBAAkB,GAAG,IAAI,gBAAgB,CAAS,MAAM,EAAE;AAChE,MAAM,kBAAkB,GAAG,IAAI,gBAAgB,CAAS,MAAM,EAAE;;MCC1D,qCAAqC,GAAsB,CACtE,GAAG,EACH,IAAI,KACF;IACF,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;AACpD,IAAA,MAAM,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;IACzD,IAAI,QAAQ,EAAE;QACZ,MAAM,OAAO,GAAG,oBAAoB,CAAC,UAAU,CAAC,SAAS,EAAE,QAAQ,CAAC;AACpE,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,OAAO,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;;AAGpD,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC;AAClB;;SCdgB,YAAY,CAC1B,MAA4B,EAC5B,UAA0B,EAAE,EAAA;IAE5B,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,OAAO,SAAS;;AAElB,IAAA,OAAO,MAAM,CAAC,OAAO,CAAC,MAAqC;AACxD,SAAA,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;AACvC,SAAA,MAAM,CACL,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,CAAwB,MAAM;AAC9C,QAAA,GAAG,GAAG;AACN,QAAA,CAAC,GAAG,GAAG,MAAM,EAAE;KAChB,CAAC,EACF,EAGC,CACF;AACL;;ACtBA;AAKA;;ACLA;;AAEG;;;;"}
|
|
@@ -193,8 +193,8 @@ let OpenApiRemoteMethod = class OpenApiRemoteMethod extends BaseHttpRemoteMethod
|
|
|
193
193
|
}
|
|
194
194
|
return null;
|
|
195
195
|
}
|
|
196
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
197
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
196
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiRemoteMethod, deps: [{ token: HttpClient }, { token: Injector }, { token: OpenApiConfigService }, { token: DEFAULT_OPEN_API_REMOTE_METHOD_META_DATA, optional: true }, { token: RXAP_OPEN_API_STRICT_VALIDATOR, optional: true }, { token: DISABLE_SCHEMA_VALIDATION, optional: true }, { token: DISABLE_VALIDATION, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
197
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiRemoteMethod }); }
|
|
198
198
|
};
|
|
199
199
|
OpenApiRemoteMethod = __decorate([
|
|
200
200
|
Mixin(SchemaValidationMixin),
|
|
@@ -202,7 +202,7 @@ OpenApiRemoteMethod = __decorate([
|
|
|
202
202
|
Injector,
|
|
203
203
|
OpenApiConfigService, Object, Object, Object, Object])
|
|
204
204
|
], OpenApiRemoteMethod);
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiRemoteMethod, decorators: [{
|
|
206
206
|
type: Injectable
|
|
207
207
|
}], ctorParameters: () => [{ type: i1.HttpClient, decorators: [{
|
|
208
208
|
type: Inject,
|
|
@@ -251,10 +251,10 @@ class OpenApiRemoteMethodLoader {
|
|
|
251
251
|
}
|
|
252
252
|
return null;
|
|
253
253
|
}
|
|
254
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
255
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
254
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiRemoteMethodLoader, deps: [{ token: OpenApiConfigService }, { token: HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
255
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiRemoteMethodLoader, providedIn: 'root' }); }
|
|
256
256
|
}
|
|
257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiRemoteMethodLoader, decorators: [{
|
|
258
258
|
type: Injectable,
|
|
259
259
|
args: [{ providedIn: 'root' }]
|
|
260
260
|
}], ctorParameters: () => [{ type: i2.OpenApiConfigService, decorators: [{
|
|
@@ -194,10 +194,10 @@ class OpenApiConfigService {
|
|
|
194
194
|
insertServer(serverConfig, index = this.defaultServerIndex, serverId) {
|
|
195
195
|
OpenApiConfigService.InsertServer(serverConfig, index, serverId, this.config);
|
|
196
196
|
}
|
|
197
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1
|
|
198
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1
|
|
197
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiConfigService, deps: [{ token: RXAP_OPEN_API_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
198
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiConfigService, providedIn: 'root' }); }
|
|
199
199
|
}
|
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: OpenApiConfigService, decorators: [{
|
|
201
201
|
type: Injectable,
|
|
202
202
|
args: [{ providedIn: 'root' }]
|
|
203
203
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { HttpResourceRequest } from '@angular/common/http';
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
|
+
export declare function toHttpParams<T extends Record<string, Signal<unknown>>>(record: T | undefined | null, include?: Array<keyof T>): HttpResourceRequest['params'] | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Signal } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* Converts all properties of type T to Signal<T[K]>
|
|
4
|
+
*/
|
|
5
|
+
export type SignalProperties<T> = {
|
|
6
|
+
[K in keyof T]: Signal<T[K]>;
|
|
7
|
+
};
|
|
8
|
+
export interface OpenApiHttpResourceOptions<Parameters extends Record<string, any> | void = any, RequestBody = any> {
|
|
9
|
+
parameters?: SignalProperties<Parameters>;
|
|
10
|
+
requestBody?: Signal<RequestBody>;
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "19.0.
|
|
2
|
+
"version": "19.1.0-dev.0",
|
|
3
3
|
"name": "@rxap/open-api",
|
|
4
4
|
"description": "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.\n",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@nx/devkit": "20.
|
|
7
|
+
"@nx/devkit": "20.5.0",
|
|
8
8
|
"tslib": "2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "^19.1
|
|
12
|
-
"@angular/core": "^19.1
|
|
13
|
-
"@rxap/config": "^19.0.
|
|
14
|
-
"@rxap/data-source": "^19.0.
|
|
15
|
-
"@rxap/environment": "^19.0.
|
|
16
|
-
"@rxap/mixin": "^16.0.
|
|
17
|
-
"@rxap/remote-method": "^19.0.
|
|
18
|
-
"@rxap/rxjs": "^1.1.
|
|
19
|
-
"@rxap/utilities": "^16.4.
|
|
11
|
+
"@angular/common": "^19.2.1",
|
|
12
|
+
"@angular/core": "^19.2.1",
|
|
13
|
+
"@rxap/config": "^19.0.4-dev.0",
|
|
14
|
+
"@rxap/data-source": "^19.0.4-dev.0",
|
|
15
|
+
"@rxap/environment": "^19.0.4-dev.0",
|
|
16
|
+
"@rxap/mixin": "^16.0.14-dev.0",
|
|
17
|
+
"@rxap/remote-method": "^19.0.4-dev.0",
|
|
18
|
+
"@rxap/rxjs": "^1.1.16-dev.0",
|
|
19
|
+
"@rxap/utilities": "^16.4.4-dev.0",
|
|
20
20
|
"ajv": "^8.12.0",
|
|
21
21
|
"openapi-types": "^10.0.0",
|
|
22
22
|
"rxjs": "^7.8.1"
|
|
@@ -42,77 +42,73 @@
|
|
|
42
42
|
],
|
|
43
43
|
"nx-migrations": {
|
|
44
44
|
"packageGroup": [
|
|
45
|
-
{
|
|
46
|
-
"package": "@angular/animations",
|
|
47
|
-
"version": "19.1.3"
|
|
48
|
-
},
|
|
49
45
|
{
|
|
50
46
|
"package": "@angular/cdk",
|
|
51
|
-
"version": "19.
|
|
47
|
+
"version": "19.2.2"
|
|
52
48
|
},
|
|
53
49
|
{
|
|
54
50
|
"package": "@angular/common",
|
|
55
|
-
"version": "19.1
|
|
51
|
+
"version": "19.2.1"
|
|
56
52
|
},
|
|
57
53
|
{
|
|
58
54
|
"package": "@angular/core",
|
|
59
|
-
"version": "19.1
|
|
55
|
+
"version": "19.2.1"
|
|
60
56
|
},
|
|
61
57
|
{
|
|
62
58
|
"package": "@angular/forms",
|
|
63
|
-
"version": "19.1
|
|
59
|
+
"version": "19.2.1"
|
|
64
60
|
},
|
|
65
61
|
{
|
|
66
62
|
"package": "@angular/material",
|
|
67
|
-
"version": "19.
|
|
63
|
+
"version": "19.2.2"
|
|
68
64
|
},
|
|
69
65
|
{
|
|
70
66
|
"package": "@angular/platform-browser",
|
|
71
|
-
"version": "19.1
|
|
67
|
+
"version": "19.2.1"
|
|
72
68
|
},
|
|
73
69
|
{
|
|
74
70
|
"package": "@rxap/config",
|
|
75
|
-
"version": "19.0.
|
|
71
|
+
"version": "19.0.4-dev.0"
|
|
76
72
|
},
|
|
77
73
|
{
|
|
78
74
|
"package": "@rxap/data-source",
|
|
79
|
-
"version": "19.0.
|
|
75
|
+
"version": "19.0.4-dev.0"
|
|
80
76
|
},
|
|
81
77
|
{
|
|
82
78
|
"package": "@rxap/data-structure-tree",
|
|
83
|
-
"version": "1.1.
|
|
79
|
+
"version": "1.1.16-dev.0"
|
|
84
80
|
},
|
|
85
81
|
{
|
|
86
82
|
"package": "@rxap/definition",
|
|
87
|
-
"version": "19.0.
|
|
83
|
+
"version": "19.0.4-dev.0"
|
|
88
84
|
},
|
|
89
85
|
{
|
|
90
86
|
"package": "@rxap/environment",
|
|
91
|
-
"version": "19.0.
|
|
87
|
+
"version": "19.0.4-dev.0"
|
|
92
88
|
},
|
|
93
89
|
{
|
|
94
90
|
"package": "@rxap/mixin",
|
|
95
|
-
"version": "16.0.
|
|
91
|
+
"version": "16.0.14-dev.0"
|
|
96
92
|
},
|
|
97
93
|
{
|
|
98
94
|
"package": "@rxap/pattern",
|
|
99
|
-
"version": "1.1.
|
|
95
|
+
"version": "1.1.14-dev.0"
|
|
100
96
|
},
|
|
101
97
|
{
|
|
102
98
|
"package": "@rxap/reflect-metadata",
|
|
103
|
-
"version": "1.0.
|
|
99
|
+
"version": "1.0.15-dev.0"
|
|
104
100
|
},
|
|
105
101
|
{
|
|
106
102
|
"package": "@rxap/remote-method",
|
|
107
|
-
"version": "19.0.
|
|
103
|
+
"version": "19.0.4-dev.0"
|
|
108
104
|
},
|
|
109
105
|
{
|
|
110
106
|
"package": "@rxap/rxjs",
|
|
111
|
-
"version": "1.1.
|
|
107
|
+
"version": "1.1.16-dev.0"
|
|
112
108
|
},
|
|
113
109
|
{
|
|
114
110
|
"package": "@rxap/utilities",
|
|
115
|
-
"version": "16.4.
|
|
111
|
+
"version": "16.4.4-dev.0"
|
|
116
112
|
}
|
|
117
113
|
]
|
|
118
114
|
},
|
|
@@ -127,7 +123,7 @@
|
|
|
127
123
|
},
|
|
128
124
|
"schematics": "./generators.json",
|
|
129
125
|
"sideEffects": false,
|
|
130
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "146687a6d9632a9f24d12da46224d3eeb40e552b",
|
|
131
127
|
"module": "fesm2022/rxap-open-api.mjs",
|
|
132
128
|
"typings": "index.d.ts",
|
|
133
129
|
"exports": {
|
|
@@ -142,6 +138,10 @@
|
|
|
142
138
|
"types": "./data-source/index.d.ts",
|
|
143
139
|
"default": "./fesm2022/rxap-open-api-data-source.mjs"
|
|
144
140
|
},
|
|
141
|
+
"./http-resource": {
|
|
142
|
+
"types": "./http-resource/index.d.ts",
|
|
143
|
+
"default": "./fesm2022/rxap-open-api-http-resource.mjs"
|
|
144
|
+
},
|
|
145
145
|
"./remote-method": {
|
|
146
146
|
"types": "./remote-method/index.d.ts",
|
|
147
147
|
"default": "./fesm2022/rxap-open-api-remote-method.mjs"
|