@rapidrest/core 1.3.1 → 1.3.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 (64) hide show
  1. package/dist/lib/StringUtils.js +3 -3
  2. package/dist/types/StringUtils.d.ts +3 -3
  3. package/package.json +2 -7
  4. package/docs/Makefile +0 -20
  5. package/docs/conf.py +0 -58
  6. package/docs/index.rst +0 -17
  7. package/docs/make.bat +0 -35
  8. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/README.md +0 -21
  9. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Config.md +0 -33
  10. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Destroy.md +0 -27
  11. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Init.md +0 -33
  12. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Inject.md +0 -33
  13. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Logger.md +0 -27
  14. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Nullable.md +0 -27
  15. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/functions/Validator.md +0 -25
  16. package/docs/reference/@rapidrest/namespaces/ObjectDecorators/type-aliases/ValidatorFunction.md +0 -31
  17. package/docs/reference/README.md +0 -35
  18. package/docs/reference/classes/AlertUtils.md +0 -158
  19. package/docs/reference/classes/ApiError.md +0 -251
  20. package/docs/reference/classes/ClassLoader.md +0 -224
  21. package/docs/reference/classes/Event.md +0 -109
  22. package/docs/reference/classes/EventUtils.md +0 -123
  23. package/docs/reference/classes/FileUtils.md +0 -193
  24. package/docs/reference/classes/JWTUtils.md +0 -139
  25. package/docs/reference/classes/MessagingUtils.md +0 -167
  26. package/docs/reference/classes/OASUtils.md +0 -227
  27. package/docs/reference/classes/ObjectFactory.md +0 -276
  28. package/docs/reference/classes/ObjectUtils.md +0 -60
  29. package/docs/reference/classes/StringUtils.md +0 -169
  30. package/docs/reference/classes/ThreadPool.md +0 -249
  31. package/docs/reference/classes/ThreadWorker.md +0 -91
  32. package/docs/reference/classes/UserUtils.md +0 -185
  33. package/docs/reference/classes/ValidationUtils.md +0 -294
  34. package/docs/reference/enumerations/AlertPriority.md +0 -61
  35. package/docs/reference/enumerations/JWTUtilsCompressionMethods.md +0 -21
  36. package/docs/reference/enumerations/WorkerMessageType.md +0 -43
  37. package/docs/reference/functions/sleep.md +0 -25
  38. package/docs/reference/globals.md +0 -73
  39. package/docs/reference/interfaces/Alert.md +0 -101
  40. package/docs/reference/interfaces/AlertAttachment.md +0 -51
  41. package/docs/reference/interfaces/AlertClose.md +0 -31
  42. package/docs/reference/interfaces/AlertUtilsAttachmentOptions.md +0 -42
  43. package/docs/reference/interfaces/AlertUtilsOptions.md +0 -41
  44. package/docs/reference/interfaces/InstanceOptions.md +0 -41
  45. package/docs/reference/interfaces/JWTPayload.md +0 -143
  46. package/docs/reference/interfaces/JWTUser.md +0 -55
  47. package/docs/reference/interfaces/JWTUtilsConfig.md +0 -45
  48. package/docs/reference/interfaces/JWTUtilsPayloadKeyOptions.md +0 -68
  49. package/docs/reference/interfaces/JWTUtilsPayloadOptions.md +0 -40
  50. package/docs/reference/interfaces/JWTUtilsPayloadPasswordOptions.md +0 -78
  51. package/docs/reference/interfaces/NewEvent.md +0 -25
  52. package/docs/reference/interfaces/OriginSettings.md +0 -25
  53. package/docs/reference/interfaces/SlackConfig.md +0 -33
  54. package/docs/reference/interfaces/SmtpAuth.md +0 -25
  55. package/docs/reference/interfaces/SmtpConfig.md +0 -41
  56. package/docs/reference/interfaces/Template.md +0 -105
  57. package/docs/reference/interfaces/TemplateMapBase.md +0 -13
  58. package/docs/reference/interfaces/TwilioConfig.md +0 -33
  59. package/docs/reference/interfaces/WorkerMessage.md +0 -31
  60. package/docs/reference/interfaces/WorkerOptions.md +0 -61
  61. package/docs/reference/type-aliases/BooleanFunc.md +0 -23
  62. package/docs/reference/type-aliases/TemplateMap.md +0 -17
  63. package/docs/reference/type-aliases/WorkerCallback.md +0 -31
  64. package/docs/reference/variables/Logger.md +0 -25
@@ -1,193 +0,0 @@
1
- [**@rapidrest/core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/core](../globals.md) / FileUtils
6
-
7
- # Class: FileUtils
8
-
9
- Defined in: [src/FileUtils.ts:17](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/FileUtils.ts#L17)
10
-
11
- Utility functions for working with files.
12
-
13
- ## Author
14
-
15
- Jean-Philippe Steinmetz
16
-
17
- ## Constructors
18
-
19
- ### Constructor
20
-
21
- > **new FileUtils**(): `FileUtils`
22
-
23
- #### Returns
24
-
25
- `FileUtils`
26
-
27
- ## Methods
28
-
29
- ### copyBinaryFile()
30
-
31
- > `static` **copyBinaryFile**(`srcPath`, `outPath`, `variables?`): `Promise`\<`void`\>
32
-
33
- Defined in: [src/FileUtils.ts:159](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/FileUtils.ts#L159)
34
-
35
- Generates a copy of the source file at the desired output destination using binary copy mode.
36
-
37
- #### Parameters
38
-
39
- ##### srcPath
40
-
41
- `string`
42
-
43
- The source file to copy.
44
-
45
- ##### outPath
46
-
47
- `string`
48
-
49
- The destination file to generate.
50
-
51
- ##### variables?
52
-
53
- `any` = `{}`
54
-
55
- The map of variable names to values to swap. Applies to outPath only.
56
-
57
- #### Returns
58
-
59
- `Promise`\<`void`\>
60
-
61
- ***
62
-
63
- ### copyDirectory()
64
-
65
- > `static` **copyDirectory**(`srcPath`, `outPath`, `vars?`, `excludeFilters?`, `binaryFilters?`, `force?`): `Promise`\<`void`\>
66
-
67
- Defined in: [src/FileUtils.ts:187](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/FileUtils.ts#L187)
68
-
69
- Performs a deep copy of a directory tree at the given srcPath to the specified output directory. Performs
70
- template replacement for all variables given and skips any files in the specified filter.
71
-
72
- #### Parameters
73
-
74
- ##### srcPath
75
-
76
- `string`
77
-
78
- The path to the source directory to copy files from.
79
-
80
- ##### outPath
81
-
82
- `string`
83
-
84
- The path to the destination directory to copy files to.
85
-
86
- ##### vars?
87
-
88
- `any` = `{}`
89
-
90
- The map of template variables to perform replacement on.
91
-
92
- ##### excludeFilters?
93
-
94
- `string`[] = `[]`
95
-
96
- The list of file extension filters to exclude during the copy process.
97
-
98
- ##### binaryFilters?
99
-
100
- `string`[] = `[]`
101
-
102
- The list of file extension filters to copy as binary only.
103
-
104
- ##### force?
105
-
106
- `boolean` = `false`
107
-
108
- Set to `true` to force writing over any existing files.
109
-
110
- #### Returns
111
-
112
- `Promise`\<`void`\>
113
-
114
- ***
115
-
116
- ### copyFile()
117
-
118
- > `static` **copyFile**(`srcPath`, `outPath`, `variables?`, `overwrite?`): `Promise`\<`void`\>
119
-
120
- Defined in: [src/FileUtils.ts:123](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/FileUtils.ts#L123)
121
-
122
- Generates a copy of the source file at the desired output destination and performs a swap of all values of the
123
- variables specified.
124
-
125
- #### Parameters
126
-
127
- ##### srcPath
128
-
129
- `string`
130
-
131
- The source file to copy.
132
-
133
- ##### outPath
134
-
135
- `string`
136
-
137
- The destination file to generate.
138
-
139
- ##### variables?
140
-
141
- `any` = `{}`
142
-
143
- The map of variable names to values to swap.
144
-
145
- ##### overwrite?
146
-
147
- `boolean` = `false`
148
-
149
- #### Returns
150
-
151
- `Promise`\<`void`\>
152
-
153
- ***
154
-
155
- ### writeFile()
156
-
157
- > `static` **writeFile**(`srcPath`, `outPath`, `contents`, `overwrite?`): `Promise`\<`void`\>
158
-
159
- Defined in: [src/FileUtils.ts:28](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/FileUtils.ts#L28)
160
-
161
- Attempts to write the provided contents to the file path given. If a file already exists the user is prompted to
162
- allow the file to be overwritten or merged. In the case of a merge, srcPath is used as a baseline in order to
163
- perform a 3-way merge.
164
-
165
- #### Parameters
166
-
167
- ##### srcPath
168
-
169
- `string`
170
-
171
- The baseline template file to use during a merge.
172
-
173
- ##### outPath
174
-
175
- `string`
176
-
177
- The destination file path to be written.
178
-
179
- ##### contents
180
-
181
- `any`
182
-
183
- The contents of the file to write.
184
-
185
- ##### overwrite?
186
-
187
- `boolean` = `false`
188
-
189
- Set to `true` to overwite the file and not perform a merge.
190
-
191
- #### Returns
192
-
193
- `Promise`\<`void`\>
@@ -1,139 +0,0 @@
1
- [**@rapidrest/core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/core](../globals.md) / JWTUtils
6
-
7
- # Class: JWTUtils
8
-
9
- Defined in: [src/JWTUtils.ts:145](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/JWTUtils.ts#L145)
10
-
11
- Utility class for working with Json Web Token (JWT) authentication tokens.
12
-
13
- ## Author
14
-
15
- Jean-Philippe Steinmetz <rapidrests@gmail.com>
16
-
17
- ## Constructors
18
-
19
- ### Constructor
20
-
21
- > **new JWTUtils**(): `JWTUtils`
22
-
23
- #### Returns
24
-
25
- `JWTUtils`
26
-
27
- ## Methods
28
-
29
- ### createToken()
30
-
31
- > `static` **createToken**(`config`, `user`, `data?`): `Promise`\<`string`\>
32
-
33
- Defined in: [src/JWTUtils.ts:172](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/JWTUtils.ts#L172)
34
-
35
- #### Parameters
36
-
37
- ##### config
38
-
39
- [`JWTUtilsConfig`](../interfaces/JWTUtilsConfig.md)
40
-
41
- ##### user
42
-
43
- [`JWTUser`](../interfaces/JWTUser.md)
44
-
45
- ##### data?
46
-
47
- `any`
48
-
49
- #### Returns
50
-
51
- `Promise`\<`string`\>
52
-
53
- ***
54
-
55
- ### createTokenSync()
56
-
57
- > `static` **createTokenSync**(`config`, `user`, `data?`): `string`
58
-
59
- Defined in: [src/JWTUtils.ts:218](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/JWTUtils.ts#L218)
60
-
61
- #### Parameters
62
-
63
- ##### config
64
-
65
- [`JWTUtilsConfig`](../interfaces/JWTUtilsConfig.md)
66
-
67
- ##### user
68
-
69
- [`JWTUser`](../interfaces/JWTUser.md)
70
-
71
- ##### data?
72
-
73
- `any`
74
-
75
- #### Returns
76
-
77
- `string`
78
-
79
- ***
80
-
81
- ### decodeToken()
82
-
83
- > `static` **decodeToken**(`config`, `token`): `Promise`\<[`JWTPayload`](../interfaces/JWTPayload.md)\>
84
-
85
- Defined in: [src/JWTUtils.ts:272](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/JWTUtils.ts#L272)
86
-
87
- Decodes the given JWT authentication token using the provided configuration. If the token is not valid an
88
- error is thrown with the reason. Returns the encoded user object payload upon success.
89
-
90
- #### Parameters
91
-
92
- ##### config
93
-
94
- [`JWTUtilsConfig`](../interfaces/JWTUtilsConfig.md)
95
-
96
- The JWT configuration to use when validating the token.
97
-
98
- ##### token
99
-
100
- `string`
101
-
102
- The JWT token to validate.
103
-
104
- #### Returns
105
-
106
- `Promise`\<[`JWTPayload`](../interfaces/JWTPayload.md)\>
107
-
108
- The data encoded in the token's payload.
109
-
110
- ***
111
-
112
- ### decodeTokenSync()
113
-
114
- > `static` **decodeTokenSync**(`config`, `token`): [`JWTPayload`](../interfaces/JWTPayload.md)
115
-
116
- Defined in: [src/JWTUtils.ts:322](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/JWTUtils.ts#L322)
117
-
118
- Decodes the given JWT authentication token using the provided configuration. If the token is not valid an
119
- error is thrown with the reason. Returns the encoded user object payload upon success.
120
-
121
- #### Parameters
122
-
123
- ##### config
124
-
125
- [`JWTUtilsConfig`](../interfaces/JWTUtilsConfig.md)
126
-
127
- The JWT configuration to use when validating the token.
128
-
129
- ##### token
130
-
131
- `string`
132
-
133
- The JWT token to validate.
134
-
135
- #### Returns
136
-
137
- [`JWTPayload`](../interfaces/JWTPayload.md)
138
-
139
- The data encoded in the token's payload.
@@ -1,167 +0,0 @@
1
- [**@rapidrest/core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/core](../globals.md) / MessagingUtils
6
-
7
- # Class: MessagingUtils
8
-
9
- Defined in: [src/MessagingUtils.ts:75](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/MessagingUtils.ts#L75)
10
-
11
- Simple utility class for sending templated messages via e-mail, SMS and more.
12
-
13
- ## Constructors
14
-
15
- ### Constructor
16
-
17
- > **new MessagingUtils**(): `MessagingUtils`
18
-
19
- #### Returns
20
-
21
- `MessagingUtils`
22
-
23
- ## Properties
24
-
25
- ### slackApps
26
-
27
- > `protected` **slackApps**: `any`[] = `[]`
28
-
29
- Defined in: [src/MessagingUtils.ts:76](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/MessagingUtils.ts#L76)
30
-
31
- ***
32
-
33
- ### slackConfigs
34
-
35
- > `protected` **slackConfigs**: `any`[] = `[]`
36
-
37
- Defined in: [src/MessagingUtils.ts:78](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/MessagingUtils.ts#L78)
38
-
39
- ## Methods
40
-
41
- ### init()
42
-
43
- > **init**(): `Promise`\<`void`\>
44
-
45
- Defined in: [src/MessagingUtils.ts:96](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/MessagingUtils.ts#L96)
46
-
47
- #### Returns
48
-
49
- `Promise`\<`void`\>
50
-
51
- ***
52
-
53
- ### loadTemplate()
54
-
55
- > **loadTemplate**(`name`): [`Template`](../interfaces/Template.md)
56
-
57
- Defined in: [src/MessagingUtils.ts:160](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/MessagingUtils.ts#L160)
58
-
59
- Loads the template with the given name and returns its contents as a string.
60
-
61
- #### Parameters
62
-
63
- ##### name
64
-
65
- `string`
66
-
67
- The name of the template to load.
68
-
69
- #### Returns
70
-
71
- [`Template`](../interfaces/Template.md)
72
-
73
- ***
74
-
75
- ### sendEmail()
76
-
77
- > **sendEmail**(`templateName`, `templateVars`, `options?`): `Promise`\<`any`\>
78
-
79
- Defined in: [src/MessagingUtils.ts:199](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/MessagingUtils.ts#L199)
80
-
81
- Sends an email using the given template name and variables.
82
-
83
- #### Parameters
84
-
85
- ##### templateName
86
-
87
- `string`
88
-
89
- The name of the email template to send.
90
-
91
- ##### templateVars
92
-
93
- `any`
94
-
95
- The map of variables to inject into the template.
96
-
97
- ##### options?
98
-
99
- `any` = `{}`
100
-
101
- The map of additional options to pass into the sendMail function.
102
-
103
- #### Returns
104
-
105
- `Promise`\<`any`\>
106
-
107
- ***
108
-
109
- ### sendSlack()
110
-
111
- > **sendSlack**(`templateName`, `templateVars`): `Promise`\<`any`[] \| `undefined`\>
112
-
113
- Defined in: [src/MessagingUtils.ts:243](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/MessagingUtils.ts#L243)
114
-
115
- Sends an Slack message using the given template name and variables.
116
-
117
- #### Parameters
118
-
119
- ##### templateName
120
-
121
- `string`
122
-
123
- The name of the Slack template to send.
124
-
125
- ##### templateVars
126
-
127
- `any`
128
-
129
- The map of variables to inject into the template.
130
-
131
- #### Returns
132
-
133
- `Promise`\<`any`[] \| `undefined`\>
134
-
135
- ***
136
-
137
- ### sendSMS()
138
-
139
- > **sendSMS**(`templateName`, `templateVars`, `options?`): `Promise`\<`any`\>
140
-
141
- Defined in: [src/MessagingUtils.ts:276](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/MessagingUtils.ts#L276)
142
-
143
- Sends an SMS using the given template name and variables.
144
-
145
- #### Parameters
146
-
147
- ##### templateName
148
-
149
- `string`
150
-
151
- The name of the SMS template to send.
152
-
153
- ##### templateVars
154
-
155
- `any`
156
-
157
- The map of variables to inject into the template.
158
-
159
- ##### options?
160
-
161
- `any` = `{}`
162
-
163
- The map of additional options to pass into the sendMail function.
164
-
165
- #### Returns
166
-
167
- `Promise`\<`any`\>
@@ -1,227 +0,0 @@
1
- [**@rapidrest/core**](../README.md)
2
-
3
- ***
4
-
5
- [@rapidrest/core](../globals.md) / OASUtils
6
-
7
- # Class: OASUtils
8
-
9
- Defined in: [src/OASUtils.ts:17](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/OASUtils.ts#L17)
10
-
11
- ## Constructors
12
-
13
- ### Constructor
14
-
15
- > **new OASUtils**(): `OASUtils`
16
-
17
- #### Returns
18
-
19
- `OASUtils`
20
-
21
- ## Methods
22
-
23
- ### clearSpecCache()
24
-
25
- > `static` **clearSpecCache**(): `void`
26
-
27
- Defined in: [src/OASUtils.ts:230](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/OASUtils.ts#L230)
28
-
29
- Clears the spec parse cache. Useful in tests to force re-loading of specs.
30
-
31
- #### Returns
32
-
33
- `void`
34
-
35
- ***
36
-
37
- ### getDatastore()
38
-
39
- > `static` **getDatastore**(`spec`, `name`): `any`
40
-
41
- Defined in: [src/OASUtils.ts:25](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/OASUtils.ts#L25)
42
-
43
- Gets the datastore definition with the specified name.
44
-
45
- #### Parameters
46
-
47
- ##### spec
48
-
49
- `any`
50
-
51
- The OpenAPI specification to search.
52
-
53
- ##### name
54
-
55
- `string`
56
-
57
- The name of the datastore to retrieve.
58
-
59
- #### Returns
60
-
61
- `any`
62
-
63
- The definition for the datastore with the given name if found, otherwise `undefined`.
64
-
65
- ***
66
-
67
- ### getObject()
68
-
69
- > `static` **getObject**(`spec`, `path`): `any`
70
-
71
- Defined in: [src/OASUtils.ts:42](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/OASUtils.ts#L42)
72
-
73
- Gets the specification object at the specified path.
74
-
75
- #### Parameters
76
-
77
- ##### spec
78
-
79
- `any`
80
-
81
- The OpenAPI specification to reference.
82
-
83
- ##### path
84
-
85
- `string`
86
-
87
- The path of the object to retrieve.
88
-
89
- #### Returns
90
-
91
- `any`
92
-
93
- The object at the specified path if found, otherwise `undefined`.
94
-
95
- ***
96
-
97
- ### getResponse()
98
-
99
- > `static` **getResponse**(`obj`): `any`
100
-
101
- Defined in: [src/OASUtils.ts:69](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/OASUtils.ts#L69)
102
-
103
- Returns the first available response object for a 2XX response as defined by the provided Operation schema object.
104
-
105
- #### Parameters
106
-
107
- ##### obj
108
-
109
- `any`
110
-
111
- The Operation schema object to search.
112
-
113
- #### Returns
114
-
115
- `any`
116
-
117
- ***
118
-
119
- ### getResponseContent()
120
-
121
- > `static` **getResponseContent**(`obj`): `any`
122
-
123
- Defined in: [src/OASUtils.ts:88](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/OASUtils.ts#L88)
124
-
125
- Returns the first available response content object for a 2XX response as defined by the provided Operation schema object.
126
-
127
- #### Parameters
128
-
129
- ##### obj
130
-
131
- `any`
132
-
133
- The Operation schema object to search.
134
-
135
- #### Returns
136
-
137
- `any`
138
-
139
- ***
140
-
141
- ### getSchema()
142
-
143
- > `static` **getSchema**(`spec`, `name`): `any`
144
-
145
- Defined in: [src/OASUtils.ts:100](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/OASUtils.ts#L100)
146
-
147
- Retrieves the schema definition with the given name.
148
-
149
- #### Parameters
150
-
151
- ##### spec
152
-
153
- `any`
154
-
155
- The OpenAPI specification object to reference.
156
-
157
- ##### name
158
-
159
- `string`
160
-
161
- The name of the schema to retrieve.
162
-
163
- #### Returns
164
-
165
- `any`
166
-
167
- The schema definition with the given name.
168
-
169
- ***
170
-
171
- ### getTypeInfo()
172
-
173
- > `static` **getTypeInfo**(`schemaDef`, `spec`, `convertDataType`): `any`
174
-
175
- Defined in: [src/OASUtils.ts:124](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/OASUtils.ts#L124)
176
-
177
- Extracts the type information for a given schema Object definition.
178
-
179
- #### Parameters
180
-
181
- ##### schemaDef
182
-
183
- `any`
184
-
185
- The schema definition object to extract type information from.
186
-
187
- ##### spec
188
-
189
- `any`
190
-
191
- The entire OpenAPI specification object.
192
-
193
- ##### convertDataType
194
-
195
- `Function`
196
-
197
- The function that converts OpenAPI Specification types to native types.
198
-
199
- #### Returns
200
-
201
- `any`
202
-
203
- A tuple containing the type, subType and subSchemaRef information.
204
-
205
- ***
206
-
207
- ### loadSpec()
208
-
209
- > `static` **loadSpec**(`file`): `Promise`\<`any`\>
210
-
211
- Defined in: [src/OASUtils.ts:179](https://github.com/rapidrest/core/blob/a4c031c9927a28230ae2f4bc0d881f4d5a54cdeb/src/OASUtils.ts#L179)
212
-
213
- Attempts to load the Open API specification at the given path or URL.
214
-
215
- #### Parameters
216
-
217
- ##### file
218
-
219
- `string`
220
-
221
- The path or URL of the OpenAPI Specification file to load.
222
-
223
- #### Returns
224
-
225
- `Promise`\<`any`\>
226
-
227
- A promise whose result will be the loaded OpenAPI Specification as an object.