angular-toolbox 1.3.3 → 1.4.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 (47) hide show
  1. package/README.md +1 -1
  2. package/esm2022/lib/framework/index.mjs +2 -1
  3. package/esm2022/lib/framework/mock/documentation/component/atx-mock-description/atx-mock-description.component.mjs +27 -0
  4. package/esm2022/lib/framework/mock/documentation/component/atx-mock-documentation/atx-mock-documentation.component.mjs +77 -0
  5. package/esm2022/lib/framework/mock/documentation/component/atx-mock-full-description/atx-mock-full-description.component.mjs +27 -0
  6. package/esm2022/lib/framework/mock/documentation/component/atx-mock-methods/atx-mock-methods.component.mjs +71 -0
  7. package/esm2022/lib/framework/mock/documentation/component/atx-mock-param/atx-mock-param.component.mjs +27 -0
  8. package/esm2022/lib/framework/mock/documentation/index.mjs +2 -0
  9. package/esm2022/lib/framework/mock/documentation/model/business/full-description.type.mjs +9 -0
  10. package/esm2022/lib/framework/mock/documentation/model/business/method-doc-descriptor.type.mjs +9 -0
  11. package/esm2022/lib/framework/mock/http/util/http-mock-response.builder.mjs +5 -17
  12. package/esm2022/lib/framework/mock/http/util/http-status-text-finder.mjs +146 -0
  13. package/esm2022/lib/framework/mock/http/util/http-status-text.enum.mjs +260 -0
  14. package/esm2022/lib/framework/mock/http/util/index.mjs +3 -1
  15. package/esm2022/lib/model/business/mock/http/http-method-mock.mjs +1 -1
  16. package/esm2022/lib/model/business/mock/http/http-mock-config.mjs +1 -1
  17. package/esm2022/lib/model/business/mock/http/http-mock-endpoint-descriptor.mjs +9 -0
  18. package/esm2022/lib/model/business/mock/http/http-mock-endpoint.mjs +1 -1
  19. package/esm2022/lib/model/business/mock/http/http-mock-interceptor.mjs +1 -1
  20. package/esm2022/lib/model/business/mock/http/http-mock-method-descriptor.mjs +9 -0
  21. package/esm2022/lib/model/business/mock/http/http-mock-parameter-descriptor.mjs +9 -0
  22. package/esm2022/lib/model/business/mock/http/index.mjs +4 -1
  23. package/esm2022/lib/model/service/version/angular-toolbox-version.service.mjs +4 -4
  24. package/fesm2022/angular-toolbox.mjs +640 -17
  25. package/fesm2022/angular-toolbox.mjs.map +1 -1
  26. package/lib/framework/index.d.ts +1 -0
  27. package/lib/framework/mock/documentation/component/atx-mock-description/atx-mock-description.component.d.ts +14 -0
  28. package/lib/framework/mock/documentation/component/atx-mock-documentation/atx-mock-documentation.component.d.ts +43 -0
  29. package/lib/framework/mock/documentation/component/atx-mock-full-description/atx-mock-full-description.component.d.ts +15 -0
  30. package/lib/framework/mock/documentation/component/atx-mock-methods/atx-mock-methods.component.d.ts +29 -0
  31. package/lib/framework/mock/documentation/component/atx-mock-param/atx-mock-param.component.d.ts +15 -0
  32. package/lib/framework/mock/documentation/index.d.ts +1 -0
  33. package/lib/framework/mock/documentation/model/business/full-description.type.d.ts +21 -0
  34. package/lib/framework/mock/documentation/model/business/method-doc-descriptor.type.d.ts +22 -0
  35. package/lib/framework/mock/http/util/http-mock-response.builder.d.ts +0 -8
  36. package/lib/framework/mock/http/util/http-status-text-finder.d.ts +23 -0
  37. package/lib/framework/mock/http/util/http-status-text.enum.d.ts +252 -0
  38. package/lib/framework/mock/http/util/index.d.ts +2 -0
  39. package/lib/model/business/mock/http/http-method-mock.d.ts +5 -0
  40. package/lib/model/business/mock/http/http-mock-config.d.ts +4 -0
  41. package/lib/model/business/mock/http/http-mock-endpoint-descriptor.d.ts +21 -0
  42. package/lib/model/business/mock/http/http-mock-endpoint.d.ts +5 -0
  43. package/lib/model/business/mock/http/http-mock-interceptor.d.ts +4 -0
  44. package/lib/model/business/mock/http/http-mock-method-descriptor.d.ts +29 -0
  45. package/lib/model/business/mock/http/http-mock-parameter-descriptor.d.ts +20 -0
  46. package/lib/model/business/mock/http/index.d.ts +3 -0
  47. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
1
  export * from './mock/http';
2
2
  export * from './mock/http-monitoring-console';
3
+ export * from './mock/documentation';
3
4
  export * from './logging';
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * @private
4
+ * A conmponent that renders mock config description ppoperties.
5
+ */
6
+ export declare class AtxMockDescriptionComponent {
7
+ /**
8
+ * @private
9
+ * The description to render. Can contains HTML tags.
10
+ */
11
+ description: string;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtxMockDescriptionComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtxMockDescriptionComponent, "atx-mock-description", never, { "description": { "alias": "description"; "required": false; }; }, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { ElementRef } from '@angular/core';
9
+ import { HttpMockConfig } from '../../../../../model';
10
+ import * as i0 from "@angular/core";
11
+ /**
12
+ * An easy-to-use component that displays the documentation of a `HttpMockConfig` object.
13
+ */
14
+ export declare class AtxMockDocumentation {
15
+ private elmRef;
16
+ /**
17
+ * @private
18
+ */
19
+ protected configApi: HttpMockConfig;
20
+ /**
21
+ * @private
22
+ */
23
+ protected expanded: boolean;
24
+ /**
25
+ * Specifies the title of the current display.
26
+ */
27
+ title: string;
28
+ /**
29
+ * Gets or sets the `HttpMockConfig` object for which to display documentation.
30
+ */
31
+ set config(value: HttpMockConfig);
32
+ get config(): HttpMockConfig;
33
+ /**
34
+ * @private
35
+ */
36
+ constructor(elmRef: ElementRef);
37
+ /**
38
+ * @private
39
+ */
40
+ protected toggleExpandState(): void;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtxMockDocumentation, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtxMockDocumentation, "atx-mock-documentation", never, { "title": { "alias": "title"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
43
+ }
@@ -0,0 +1,15 @@
1
+ import { FullDescription } from '../../model/business/full-description.type';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * @private
5
+ * A convenient component that displays the description and the origin of a mock config section.
6
+ */
7
+ export declare class AtxMockFullDescriptionComponent {
8
+ /**
9
+ * @public
10
+ * The config object taht contains the description to display.
11
+ */
12
+ config: FullDescription;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtxMockFullDescriptionComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtxMockFullDescriptionComponent, "atx-mock-full-description", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,29 @@
1
+ import { HttpMockEndpoint } from '../../../../../model';
2
+ import { MethodDocDescriptor } from '../../model/business/method-doc-descriptor.type';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * @private
6
+ * A convenient component that allows to display documentation for HTTP methods of an endpoint.
7
+ */
8
+ export declare class AtxMockMethodsComponent {
9
+ /**
10
+ * @private
11
+ */
12
+ protected methods: MethodDocDescriptor[];
13
+ /**
14
+ * @private
15
+ */
16
+ private _endpoint;
17
+ /**
18
+ * @private
19
+ * The endpoint for which to show HTTP methods documentation.
20
+ */
21
+ set endpoint(value: HttpMockEndpoint);
22
+ get endpoint(): HttpMockEndpoint;
23
+ /**
24
+ * @private
25
+ */
26
+ protected initMethodList(endpoint: HttpMockEndpoint): MethodDocDescriptor[];
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtxMockMethodsComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtxMockMethodsComponent, "atx-mock-methods", never, { "endpoint": { "alias": "endpoint"; "required": false; }; }, {}, never, never, true, never>;
29
+ }
@@ -0,0 +1,15 @@
1
+ import { HttpParameterDescriptor } from '../../../../../model';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * @private
5
+ * Displays documentation for HTTP fragment parameters, or query parameters.
6
+ */
7
+ export declare class AtxMockParamComponent {
8
+ /**
9
+ * @private
10
+ * The list of `HttpParameterDescriptor` object that contains information to display.
11
+ */
12
+ params: HttpParameterDescriptor[];
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtxMockParamComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtxMockParamComponent, "atx-mock-param", never, { "params": { "alias": "params"; "required": false; }; }, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1 @@
1
+ export * from './component/atx-mock-documentation/atx-mock-documentation.component';
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * @private
10
+ * Used internally to manage the full description of a mock config object.
11
+ */
12
+ export type FullDescription = {
13
+ /**
14
+ * @private
15
+ */
16
+ description?: string;
17
+ /**
18
+ * @private
19
+ */
20
+ origin?: string;
21
+ };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { HttpMockMethodDescriptor } from '../../../../../model';
9
+ /**
10
+ * @private
11
+ * Used internally to manage the display of HTTP method descriptor objects.
12
+ */
13
+ export type MethodDocDescriptor = {
14
+ /**
15
+ * @private
16
+ */
17
+ method: string;
18
+ /**
19
+ * @private
20
+ */
21
+ descriptor: HttpMockMethodDescriptor | undefined;
22
+ };
@@ -46,14 +46,6 @@ export declare class HttpResponseMockBuilder {
46
46
  * @returns A reference to this `HttpResponseMockBuilder` instance.
47
47
  */
48
48
  status(status: number): HttpResponseMockBuilder;
49
- /**
50
- * Sets the `statusText` property of the new `HttpResponseMock` instance with the specified `statusText` value.
51
- *
52
- * @param statusText The value used to set the `statusText` property of the new `HttpResponseMock` instance.
53
- *
54
- * @returns A reference to this `HttpResponseMockBuilder` instance.
55
- */
56
- statusText(statusText: string): HttpResponseMockBuilder;
57
49
  /**
58
50
  * Sets the `url` property of the new `HttpResponseMock` instance with the specified `url` value.
59
51
  *
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { HttpStatusCode } from "@angular/common/http";
9
+ import { HttpStatusText } from "./http-status-text.enum";
10
+ /**
11
+ * @private
12
+ * A utility class that helps to retreive a status text depending on its status code.
13
+ */
14
+ export declare class HttpStatusTextFinder {
15
+ /**
16
+ * @private
17
+ * Retreives and return a status text depending on its status code.
18
+ *
19
+ * @param code The status code for which to find the status text.
20
+ * @returns A `HttpStatusText` constant.
21
+ */
22
+ static getStatusText(code: HttpStatusCode): HttpStatusText;
23
+ }
@@ -0,0 +1,252 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * The list of all HTTP status text.
10
+ */
11
+ export declare enum HttpStatusText {
12
+ /**
13
+ * The status text associated with the status code `100`.
14
+ */
15
+ CONTINUE = "Continue",
16
+ /**
17
+ * The status text associated with the status code `101`.
18
+ */
19
+ SWITCHING_PROTOCOLS = "Switching Protocols",
20
+ /**
21
+ * The status text associated with the status code `102`.
22
+ */
23
+ PROCESSING = "Processing",
24
+ /**
25
+ * The status text associated with the status code `103`.
26
+ */
27
+ EARLY_HINTS = "Early Hints",
28
+ /**
29
+ * The status text associated with the status code `200`.
30
+ */
31
+ OK = "OK",
32
+ /**
33
+ * The status text associated with the status code `201`.
34
+ */
35
+ CREATED = "Created",
36
+ /**
37
+ * The status text associated with the status code `202`.
38
+ */
39
+ ACCEPTED = "Accepted",
40
+ /**
41
+ * The status text associated with the status code `203`.
42
+ */
43
+ NON_AUTHORITATIVE_INFORMATION = "Non-authoritative Information",
44
+ /**
45
+ * The status text associated with the status code `204`.
46
+ */
47
+ NO_CONTENT = "No Content",
48
+ /**
49
+ * The status text associated with the status code `205`.
50
+ */
51
+ RESET_CONTENT = "Reset Content",
52
+ /**
53
+ * The status text associated with the status code `206`.
54
+ */
55
+ PARTIAL_CONTENT = "Partial Content",
56
+ /**
57
+ * The status text associated with the status code `207`.
58
+ */
59
+ MULTI_STATUS = "Multi-Status",
60
+ /**
61
+ * The status text associated with the status code `208`.
62
+ */
63
+ ALREADY_REPORTED = "Already Reported",
64
+ /**
65
+ * The status text associated with the status code `226`.
66
+ */
67
+ IM_USED = "IM Used",
68
+ /**
69
+ * The status text associated with the status code `300`.
70
+ */
71
+ MULTIPLE_CHOICES = "Multiple Choices",
72
+ /**
73
+ * The status text associated with the status code `301`.
74
+ */
75
+ MOVED_PERMANENTLY = "Moved Permanently",
76
+ /**
77
+ * The status text associated with the status code `302`.
78
+ */
79
+ FOUND = "Found",
80
+ /**
81
+ * The status text associated with the status code `303`.
82
+ */
83
+ SEE_OTHER = "See Other",
84
+ /**
85
+ * The status text associated with the status code `304`.
86
+ */
87
+ NOT_MODIFIED = "Not Modified",
88
+ /**
89
+ * The status text associated with the status code `307`.
90
+ */
91
+ TEMPORARY_REDIRECT = "Temporary Redirect",
92
+ /**
93
+ * The status text associated with the status code `308`.
94
+ */
95
+ PERMANENT_REDIRECT = "Permanent Redirect",
96
+ /**
97
+ * The status text associated with the status code `400`.
98
+ */
99
+ BAD_REQUEST = "Bad Request",
100
+ /**
101
+ * The status text associated with the status code `401`.
102
+ */
103
+ UNAUTHORIZED = "Unauthorized",
104
+ /**
105
+ * The status text associated with the status code `402`.
106
+ */
107
+ PAYMENT_REQUIRED = "Payment Required",
108
+ /**
109
+ * The status text associated with the status code `403`.
110
+ */
111
+ FORBIDDEN = "Forbidden",
112
+ /**
113
+ * The status text associated with the status code `404`.
114
+ */
115
+ NOT_FOUND = "Not Found",
116
+ /**
117
+ * The status text associated with the status code `405`.
118
+ */
119
+ METHOD_NOT_ALLOWED = "Method Not Allowed",
120
+ /**
121
+ * The status text associated with the status code `406`.
122
+ */
123
+ NOT_ACCEPTABLE = "Not Acceptable",
124
+ /**
125
+ * The status text associated with the status code `407`.
126
+ */
127
+ PROXY_AUTHENTICATION_REQUIRED = "Proxy Authentication Required",
128
+ /**
129
+ * The status text associated with the status code `408`.
130
+ */
131
+ REQUEST_TIMEOUT = "Request Timeout",
132
+ /**
133
+ * The status text associated with the status code `409`.
134
+ */
135
+ CONFLICT = "Conflict",
136
+ /**
137
+ * The status text associated with the status code `410`.
138
+ */
139
+ GONE = "Gone",
140
+ /**
141
+ * The status text associated with the status code `411`.
142
+ */
143
+ LENGTH_REQUIRED = "Length Required",
144
+ /**
145
+ * The status text associated with the status code `412`.
146
+ */
147
+ PRECONDITION_FAILED = "Precondition Failed",
148
+ /**
149
+ * The status text associated with the status code `413`.
150
+ */
151
+ PAYLOAD_TOO_LARGE = "Payload Too Large",
152
+ /**
153
+ * The status text associated with the status code `414`.
154
+ */
155
+ URI_TOO_LONG = "URI Too Long",
156
+ /**
157
+ * The status text associated with the status code `415`.
158
+ */
159
+ UNSUPPORTED_MEDIA_TYPE = "Unsupported Media Type",
160
+ /**
161
+ * The status text associated with the status code `416`.
162
+ */
163
+ RANGE_NOT_SATISFIABLE = "Range Not Satisfiable",
164
+ /**
165
+ * The status text associated with the status code `417`.
166
+ */
167
+ EXPECTATION_FAILED = "Expectation Failed",
168
+ /**
169
+ * The status text associated with the status code `418`.
170
+ */
171
+ I_M_A_TEAPOT = "I'm a teapot",
172
+ /**
173
+ * The status text associated with the status code `421`.
174
+ */
175
+ MISDIRECTED_REQUEST = "Misdirected Request",
176
+ /**
177
+ * The status text associated with the status code `422`.
178
+ */
179
+ UNPROCESSABLE_ENTITY = "Unprocessable Entity",
180
+ /**
181
+ * The status text associated with the status code `423`.
182
+ */
183
+ LOCKED = "Locked",
184
+ /**
185
+ * The status text associated with the status code `424`.
186
+ */
187
+ FAILED_DEPENDENCY = "Failed Dependency",
188
+ /**
189
+ * The status text associated with the status code `426`.
190
+ */
191
+ UPGRADE_REQUIRED = "Upgrade Required",
192
+ /**
193
+ * The status text associated with the status code `428`.
194
+ */
195
+ PRECONDITION_REQUIRED = "Precondition Required",
196
+ /**
197
+ * The status text associated with the status code `429`.
198
+ */
199
+ TOO_MANY_REQUESTS = "Too Many Requests",
200
+ /**
201
+ * The status text associated with the status code `431`.
202
+ */
203
+ REQUEST_HEADER_FIELDS_TOO_LARGE = "Request Header Fields Too Large",
204
+ /**
205
+ * The status text associated with the status code `451`.
206
+ */
207
+ UNAVAILABLE_FOR_LEGAL_REASONS = "Unavailable For Legal Reasons",
208
+ /**
209
+ * The status text associated with the status code `500`.
210
+ */
211
+ INTERNAL_SERVER_ERROR = "Internal Server Error",
212
+ /**
213
+ * The status text associated with the status code `501`.
214
+ */
215
+ NOT_IMPLEMENTED = "Not Implemented",
216
+ /**
217
+ * The status text associated with the status code `502`.
218
+ */
219
+ BAD_GATEWAY = "Bad Gateway",
220
+ /**
221
+ * The status text associated with the status code `503`.
222
+ */
223
+ SERVICE_UNAVAILABLE = "Service Unavailable",
224
+ /**
225
+ * The status text associated with the status code `504`.
226
+ */
227
+ GATEWAY_TIMEOUT = "Gateway Timeout",
228
+ /**
229
+ * The status text associated with the status code `505`.
230
+ */
231
+ HTTP_VERSION_NOT_SUPPORTED = "HTTP Version Not Supported",
232
+ /**
233
+ * The status text associated with the status code `506`.
234
+ */
235
+ VARIANT_ALSO_NEGOTIATES = "Variant Also Negotiates",
236
+ /**
237
+ * The status text associated with the status code `507`.
238
+ */
239
+ INSUFFICIENT_STORAGE = "Insufficient Storage",
240
+ /**
241
+ * The status text associated with the status code `508`.
242
+ */
243
+ LOOP_DETECTED = "Loop Detected",
244
+ /**
245
+ * The status text associated with the status code `510`.
246
+ */
247
+ NOT_EXTENDED = "Not Extended",
248
+ /**
249
+ * The status text associated with the status code `511`.
250
+ */
251
+ NETWORK_AUTHENTICATION_REQUIRED = "Network Authentication Required"
252
+ }
@@ -3,3 +3,5 @@ export * from './http-headers-mock.builder';
3
3
  export * from './fetch-client.builder';
4
4
  export * from './fetch-client-response-type.enum';
5
5
  export * from './http-mock-max-delay';
6
+ export * from './http-status-text.enum';
7
+ export * from './http-status-text-finder';
@@ -8,6 +8,7 @@
8
8
  import { HttpRequest } from "@angular/common/http";
9
9
  import { HttpResponseMock } from "./http-response-mock";
10
10
  import { HttpMockParameters } from "../../../../framework";
11
+ import { HttpMockMethodDescriptor } from "./http-mock-method-descriptor";
11
12
  /**
12
13
  * The `HttpMethodMock` interface defines the behavior of actions invoked each time an Angular
13
14
  * `HttpClient` instance sends requests to a specific API endpoint.
@@ -27,4 +28,8 @@ export interface HttpMethodMock {
27
28
  * @returns A user-defined `HttpResponse` mock object.
28
29
  */
29
30
  data: (request: HttpRequest<any>, parameters?: HttpMockParameters) => HttpResponseMock;
31
+ /**
32
+ * The API descriptor of the associated with this HTTP method.
33
+ */
34
+ descriptor?: HttpMockMethodDescriptor;
30
35
  }
@@ -25,4 +25,8 @@ export interface HttpMockConfig {
25
25
  * The configuration of mocking strategies for each specific API.
26
26
  */
27
27
  interceptors: HttpMockInterceptor[];
28
+ /**
29
+ * The description of this HTTP API.
30
+ */
31
+ description?: string;
28
32
  }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { HttpParameterDescriptor } from "./http-mock-parameter-descriptor";
9
+ /**
10
+ * Provides the API to create documentation for a specific endpoint.
11
+ */
12
+ export interface HttpMockEndpointDescriptor {
13
+ /**
14
+ * The description of the endpoint associated with this descriptor.
15
+ */
16
+ description?: string;
17
+ /**
18
+ * The description all parameters of the endpoint associated with this descriptor.
19
+ */
20
+ params?: HttpParameterDescriptor[];
21
+ }
@@ -6,10 +6,15 @@
6
6
  * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
7
  */
8
8
  import { HttpMethodMock } from "./http-method-mock";
9
+ import { HttpMockEndpointDescriptor } from "./http-mock-endpoint-descriptor";
9
10
  /**
10
11
  * Provides the API to define mocking strategies for a specific endpoint.
11
12
  */
12
13
  export interface HttpMockEndpoint {
14
+ /**
15
+ * The API descriptor for this endpoint.
16
+ */
17
+ descriptor?: HttpMockEndpointDescriptor;
13
18
  /**
14
19
  * The route part of the endpoint to mock.
15
20
  */
@@ -24,4 +24,8 @@ export interface HttpMockInterceptor {
24
24
  * A list of endpoints that must be intercepted by the HTTP Mocking Framework.
25
25
  */
26
26
  endpoints: HttpMockEndpoint[];
27
+ /**
28
+ * The description of this interceptor.
29
+ */
30
+ description?: string;
27
31
  }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ import { HttpParameterDescriptor } from "./http-mock-parameter-descriptor";
9
+ /**
10
+ * Provides the API to create documentation for a specific HTTP method.
11
+ */
12
+ export interface HttpMockMethodDescriptor {
13
+ /**
14
+ * The description of the method associated with this descriptor.
15
+ */
16
+ description?: string;
17
+ /**
18
+ * The payload description for the method associated with this descriptor.
19
+ */
20
+ payload?: string;
21
+ /**
22
+ * The body description for the method associated with this descriptor.
23
+ */
24
+ body?: string;
25
+ /**
26
+ * The list of query string parameters for the method associated with this descriptor.
27
+ */
28
+ queryParams?: HttpParameterDescriptor[];
29
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @license
3
+ * Copyright Pascal ECHEMANN. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be found in
6
+ * the LICENSE file at https://pascalechemann.com/angular-toolbox/resources/license
7
+ */
8
+ /**
9
+ * Provides the API to create documentation for a specific HTTP parameter.
10
+ */
11
+ export interface HttpParameterDescriptor {
12
+ /**
13
+ * The description of the HTTP parameter associated with this descriptor.
14
+ */
15
+ description: string;
16
+ /**
17
+ * The referrence to the HTTP parameter associated with this descriptor.
18
+ */
19
+ ref: string;
20
+ }
@@ -2,6 +2,9 @@ export * from './http-response-mock';
2
2
  export * from './http-method-mock';
3
3
  export * from './http-mock-config';
4
4
  export * from './http-mock-endpoint';
5
+ export * from './http-mock-endpoint-descriptor';
6
+ export * from './http-mock-method-descriptor';
7
+ export * from './http-mock-parameter-descriptor';
5
8
  export * from './http-mock-interceptor';
6
9
  export * from './http-mock-error';
7
10
  export * from './http-mock-request-metadata';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "angular-toolbox",
3
- "version": "1.3.3",
3
+ "version": "1.4.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^18.0.0",