@twin.org/tools-core 0.0.3-next.9 → 0.0.3
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/README.md +2 -2
- package/dist/es/index.js +21 -11
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/ITypeScriptToSchemaContext.js +2 -0
- package/dist/es/models/ITypeScriptToSchemaContext.js.map +1 -0
- package/dist/es/models/ITypeScriptToSchemaDiagnostics.js +4 -0
- package/dist/es/models/ITypeScriptToSchemaDiagnostics.js.map +1 -0
- package/dist/es/models/ITypeScriptToSchemaOptions.js +4 -0
- package/dist/es/models/ITypeScriptToSchemaOptions.js.map +1 -0
- package/dist/es/models/embeddedSchemaMode.js +17 -0
- package/dist/es/models/embeddedSchemaMode.js.map +1 -0
- package/dist/es/utils/constants.js +43 -0
- package/dist/es/utils/constants.js.map +1 -0
- package/dist/es/utils/diagnosticReporter.js +32 -0
- package/dist/es/utils/diagnosticReporter.js.map +1 -0
- package/dist/es/utils/disallowedTypeGuard.js +151 -0
- package/dist/es/utils/disallowedTypeGuard.js.map +1 -0
- package/dist/es/utils/enum.js +152 -0
- package/dist/es/utils/enum.js.map +1 -0
- package/dist/es/utils/fileUtils.js +132 -0
- package/dist/es/utils/fileUtils.js.map +1 -0
- package/dist/es/utils/importTypeQuerySchemaResolver.js +363 -0
- package/dist/es/utils/importTypeQuerySchemaResolver.js.map +1 -0
- package/dist/es/utils/indexSignaturePatternResolver.js +94 -0
- package/dist/es/utils/indexSignaturePatternResolver.js.map +1 -0
- package/dist/es/utils/intersectionSchemaMerger.js +85 -0
- package/dist/es/utils/intersectionSchemaMerger.js.map +1 -0
- package/dist/es/utils/jsDoc.js +138 -0
- package/dist/es/utils/jsDoc.js.map +1 -0
- package/dist/es/utils/jsonSchemaBuilder.js +3415 -0
- package/dist/es/utils/jsonSchemaBuilder.js.map +1 -0
- package/dist/es/utils/mappedTypeSchemaResolver.js +265 -0
- package/dist/es/utils/mappedTypeSchemaResolver.js.map +1 -0
- package/dist/es/utils/objectTransformer.js +161 -0
- package/dist/es/utils/objectTransformer.js.map +1 -0
- package/dist/es/utils/regEx.js +128 -0
- package/dist/es/utils/regEx.js.map +1 -0
- package/dist/es/utils/resolver.js +177 -0
- package/dist/es/utils/resolver.js.map +1 -0
- package/dist/es/utils/templateLiteralPatternBuilder.js +94 -0
- package/dist/es/utils/templateLiteralPatternBuilder.js.map +1 -0
- package/dist/es/utils/typeScriptToSchema.js +319 -0
- package/dist/es/utils/typeScriptToSchema.js.map +1 -0
- package/dist/es/utils/utilityTypeSchemaMapper.js +475 -0
- package/dist/es/utils/utilityTypeSchemaMapper.js.map +1 -0
- package/dist/types/index.d.ts +21 -11
- package/dist/types/models/ITypeScriptToSchemaContext.d.ts +71 -0
- package/dist/types/models/ITypeScriptToSchemaDiagnostics.d.ts +31 -0
- package/dist/types/models/ITypeScriptToSchemaOptions.d.ts +22 -0
- package/dist/types/models/embeddedSchemaMode.d.ts +17 -0
- package/dist/types/utils/constants.d.ts +13 -0
- package/dist/types/utils/diagnosticReporter.d.ts +17 -0
- package/dist/types/utils/disallowedTypeGuard.d.ts +16 -0
- package/dist/types/utils/enum.d.ts +42 -0
- package/dist/types/utils/fileUtils.d.ts +66 -0
- package/dist/types/utils/importTypeQuerySchemaResolver.d.ts +87 -0
- package/dist/types/utils/indexSignaturePatternResolver.d.ts +21 -0
- package/dist/types/utils/intersectionSchemaMerger.d.ts +16 -0
- package/dist/types/utils/jsDoc.d.ts +53 -0
- package/dist/types/utils/jsonSchemaBuilder.d.ts +671 -0
- package/dist/types/utils/mappedTypeSchemaResolver.d.ts +81 -0
- package/dist/types/utils/objectTransformer.d.ts +33 -0
- package/dist/types/utils/regEx.d.ts +24 -0
- package/dist/types/utils/resolver.d.ts +22 -0
- package/dist/types/utils/templateLiteralPatternBuilder.d.ts +12 -0
- package/dist/types/utils/typeScriptToSchema.d.ts +92 -0
- package/dist/types/utils/utilityTypeSchemaMapper.d.ts +141 -0
- package/docs/changelog.md +337 -40
- package/docs/examples.md +87 -1
- package/docs/reference/classes/Constants.md +29 -0
- package/docs/reference/classes/DiagnosticReporter.md +49 -0
- package/docs/reference/classes/DisallowedTypeGuard.md +35 -0
- package/docs/reference/classes/Enum.md +93 -0
- package/docs/reference/classes/FileUtils.md +237 -0
- package/docs/reference/classes/ImportTypeQuerySchemaResolver.md +109 -0
- package/docs/reference/classes/IndexSignaturePatternResolver.md +69 -0
- package/docs/reference/classes/IntersectionSchemaMerger.md +48 -0
- package/docs/reference/classes/JsDoc.md +169 -0
- package/docs/reference/classes/JsonSchemaBuilder.md +2578 -0
- package/docs/reference/classes/MappedTypeSchemaResolver.md +275 -0
- package/docs/reference/classes/ObjectTransformer.md +119 -0
- package/docs/reference/classes/RegEx.md +99 -0
- package/docs/reference/classes/Resolver.md +52 -0
- package/docs/reference/classes/TemplateLiteralPatternBuilder.md +35 -0
- package/docs/reference/classes/TypeScriptToSchema.md +91 -0
- package/docs/reference/classes/UtilityTypeSchemaMapper.md +343 -0
- package/docs/reference/index.md +25 -11
- package/docs/reference/interfaces/ITypeScriptToSchemaContext.md +125 -0
- package/docs/reference/interfaces/ITypeScriptToSchemaDiagnostics.md +55 -0
- package/docs/reference/interfaces/ITypeScriptToSchemaOptions.md +44 -0
- package/docs/reference/type-aliases/EmbeddedSchemaMode.md +5 -0
- package/docs/reference/variables/EmbeddedSchemaMode.md +19 -0
- package/locales/en.json +32 -1
- package/package.json +8 -7
- package/dist/es/models/IJsonSchema.js +0 -2
- package/dist/es/models/IJsonSchema.js.map +0 -1
- package/dist/es/models/IOpenApi.js +0 -2
- package/dist/es/models/IOpenApi.js.map +0 -1
- package/dist/es/models/IOpenApiExample.js +0 -4
- package/dist/es/models/IOpenApiExample.js.map +0 -1
- package/dist/es/models/IOpenApiHeader.js +0 -4
- package/dist/es/models/IOpenApiHeader.js.map +0 -1
- package/dist/es/models/IOpenApiPathMethod.js +0 -2
- package/dist/es/models/IOpenApiPathMethod.js.map +0 -1
- package/dist/es/models/IOpenApiResponse.js +0 -2
- package/dist/es/models/IOpenApiResponse.js.map +0 -1
- package/dist/es/models/IOpenApiSecurityScheme.js +0 -4
- package/dist/es/models/IOpenApiSecurityScheme.js.map +0 -1
- package/dist/es/models/IPackageJson.js +0 -4
- package/dist/es/models/IPackageJson.js.map +0 -1
- package/dist/es/models/jsonTypeName.js +0 -2
- package/dist/es/models/jsonTypeName.js.map +0 -1
- package/dist/es/utils/jsonSchemaHelper.js +0 -258
- package/dist/es/utils/jsonSchemaHelper.js.map +0 -1
- package/dist/es/utils/openApiHelper.js +0 -12
- package/dist/es/utils/openApiHelper.js.map +0 -1
- package/dist/types/models/IJsonSchema.d.ts +0 -5
- package/dist/types/models/IOpenApi.d.ts +0 -54
- package/dist/types/models/IOpenApiExample.d.ts +0 -13
- package/dist/types/models/IOpenApiHeader.d.ts +0 -19
- package/dist/types/models/IOpenApiPathMethod.d.ts +0 -65
- package/dist/types/models/IOpenApiResponse.d.ts +0 -32
- package/dist/types/models/IOpenApiSecurityScheme.d.ts +0 -25
- package/dist/types/models/IPackageJson.d.ts +0 -15
- package/dist/types/models/jsonTypeName.d.ts +0 -5
- package/dist/types/utils/jsonSchemaHelper.d.ts +0 -78
- package/dist/types/utils/openApiHelper.d.ts +0 -9
- package/docs/reference/classes/JsonSchemaHelper.md +0 -233
- package/docs/reference/classes/OpenApiHelper.md +0 -21
- package/docs/reference/interfaces/IOpenApi.md +0 -103
- package/docs/reference/interfaces/IOpenApiExample.md +0 -19
- package/docs/reference/interfaces/IOpenApiHeader.md +0 -31
- package/docs/reference/interfaces/IOpenApiPathMethod.md +0 -119
- package/docs/reference/interfaces/IOpenApiResponse.md +0 -35
- package/docs/reference/interfaces/IOpenApiSecurityScheme.md +0 -43
- package/docs/reference/interfaces/IPackageJson.md +0 -23
- package/docs/reference/type-aliases/IJsonSchema.md +0 -5
- package/docs/reference/type-aliases/JsonTypeName.md +0 -5
package/docs/changelog.md
CHANGED
|
@@ -1,145 +1,442 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.0.3
|
|
3
|
+
## [0.0.3](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3...tools-core-v0.0.3) (2026-05-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* release to production ([ad24b7e](https://github.com/iotaledger/twin-tools/commit/ad24b7eb16784165b6c93b5c48788199f0e17526))
|
|
9
|
+
* release to production ([#119](https://github.com/iotaledger/twin-tools/issues/119)) ([cc2828a](https://github.com/iotaledger/twin-tools/commit/cc2828a6c68466bfdeaf75b507bc980dddac2cf0))
|
|
10
|
+
|
|
11
|
+
## [0.0.3-next.31](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.30...tools-core-v0.0.3-next.31) (2026-05-19)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* update dependencies ([5bdd8be](https://github.com/iotaledger/twin-tools/commit/5bdd8becf9f08b35342ea8f298f74578951f4bac))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Dependencies
|
|
20
|
+
|
|
21
|
+
* The following workspace dependencies were updated
|
|
22
|
+
* dependencies
|
|
23
|
+
* @twin.org/tools-models bumped from 0.0.3-next.30 to 0.0.3-next.31
|
|
24
|
+
|
|
25
|
+
## [0.0.3-next.30](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.29...tools-core-v0.0.3-next.30) (2026-05-18)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* ajv stack overflow for oneOf on large enums ([#112](https://github.com/iotaledger/twin-tools/issues/112)) ([6be32a3](https://github.com/iotaledger/twin-tools/commit/6be32a3ae5b3cf188c0d1caf1080f497b648705c))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Dependencies
|
|
34
|
+
|
|
35
|
+
* The following workspace dependencies were updated
|
|
36
|
+
* dependencies
|
|
37
|
+
* @twin.org/tools-models bumped from 0.0.3-next.29 to 0.0.3-next.30
|
|
38
|
+
|
|
39
|
+
## [0.0.3-next.29](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.28...tools-core-v0.0.3-next.29) (2026-05-14)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Features
|
|
43
|
+
|
|
44
|
+
* add examples to json schema ([#109](https://github.com/iotaledger/twin-tools/issues/109)) ([def5b13](https://github.com/iotaledger/twin-tools/commit/def5b1312e7a0ffefe662fb14575cb655d1c0774))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Dependencies
|
|
48
|
+
|
|
49
|
+
* The following workspace dependencies were updated
|
|
50
|
+
* dependencies
|
|
51
|
+
* @twin.org/tools-models bumped from 0.0.3-next.28 to 0.0.3-next.29
|
|
52
|
+
|
|
53
|
+
## [0.0.3-next.28](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.27...tools-core-v0.0.3-next.28) (2026-05-11)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
* typescript 6 update ([02d2e47](https://github.com/iotaledger/twin-tools/commit/02d2e47859a1d64c81e840626cc2d443816af45b))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Dependencies
|
|
62
|
+
|
|
63
|
+
* The following workspace dependencies were updated
|
|
64
|
+
* dependencies
|
|
65
|
+
* @twin.org/tools-models bumped from 0.0.3-next.27 to 0.0.3-next.28
|
|
66
|
+
|
|
67
|
+
## [0.0.3-next.27](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.26...tools-core-v0.0.3-next.27) (2026-03-27)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
### Miscellaneous Chores
|
|
71
|
+
|
|
72
|
+
* **tools-core:** Synchronize repo versions
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Dependencies
|
|
76
|
+
|
|
77
|
+
* The following workspace dependencies were updated
|
|
78
|
+
* dependencies
|
|
79
|
+
* @twin.org/tools-models bumped from 0.0.3-next.26 to 0.0.3-next.27
|
|
80
|
+
|
|
81
|
+
## [0.0.3-next.26](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.25...tools-core-v0.0.3-next.26) (2026-03-27)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Features
|
|
85
|
+
|
|
86
|
+
* add json-schema embedded mode ([#102](https://github.com/iotaledger/twin-tools/issues/102)) ([f070967](https://github.com/iotaledger/twin-tools/commit/f070967f8f3308e0b5320eab278a319c9d229e3e))
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
### Dependencies
|
|
90
|
+
|
|
91
|
+
* The following workspace dependencies were updated
|
|
92
|
+
* dependencies
|
|
93
|
+
* @twin.org/tools-models bumped from 0.0.3-next.25 to 0.0.3-next.26
|
|
94
|
+
|
|
95
|
+
## [0.0.3-next.25](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.24...tools-core-v0.0.3-next.25) (2026-03-23)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Bug Fixes
|
|
99
|
+
|
|
100
|
+
* module resolution ([f3aa10c](https://github.com/iotaledger/twin-tools/commit/f3aa10c9c9af073de392a2ef6b8411e947e991c2))
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### Dependencies
|
|
104
|
+
|
|
105
|
+
* The following workspace dependencies were updated
|
|
106
|
+
* dependencies
|
|
107
|
+
* @twin.org/tools-models bumped from 0.0.3-next.24 to 0.0.3-next.25
|
|
108
|
+
|
|
109
|
+
## [0.0.3-next.24](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.23...tools-core-v0.0.3-next.24) (2026-03-20)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### Features
|
|
113
|
+
|
|
114
|
+
* use correct json-ld context schema ([c831486](https://github.com/iotaledger/twin-tools/commit/c8314864a63635556cd5f2912162a2989056e974))
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Dependencies
|
|
118
|
+
|
|
119
|
+
* The following workspace dependencies were updated
|
|
120
|
+
* dependencies
|
|
121
|
+
* @twin.org/tools-models bumped from 0.0.3-next.23 to 0.0.3-next.24
|
|
122
|
+
|
|
123
|
+
## [0.0.3-next.23](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.22...tools-core-v0.0.3-next.23) (2026-03-20)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Features
|
|
127
|
+
|
|
128
|
+
* improve inheritance redefinition optionality ([e7024f6](https://github.com/iotaledger/twin-tools/commit/e7024f699988c0b3de8315a0dbe455a13268e75d))
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
### Dependencies
|
|
132
|
+
|
|
133
|
+
* The following workspace dependencies were updated
|
|
134
|
+
* dependencies
|
|
135
|
+
* @twin.org/tools-models bumped from 0.0.3-next.22 to 0.0.3-next.23
|
|
136
|
+
|
|
137
|
+
## [0.0.3-next.22](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.21...tools-core-v0.0.3-next.22) (2026-03-20)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
### Features
|
|
141
|
+
|
|
142
|
+
* add context id features ([#54](https://github.com/iotaledger/twin-tools/issues/54)) ([41ad65d](https://github.com/iotaledger/twin-tools/commit/41ad65d5ae33d0533d32a2864cd94e5c35e56c76))
|
|
143
|
+
* add jsdoc default value to schema ([7886a84](https://github.com/iotaledger/twin-tools/commit/7886a84961e692d2054f223e2e99205a654b76a6))
|
|
144
|
+
* add jsdoc tag validation ([971b8d3](https://github.com/iotaledger/twin-tools/commit/971b8d3817d40467bfd7549c99af602f0c590299))
|
|
145
|
+
* add support for auto expand types ([dd1e10a](https://github.com/iotaledger/twin-tools/commit/dd1e10a5b2fea6f80890ff6f3971f48e239cb4c1))
|
|
146
|
+
* add validate-locales ([97bb11f](https://github.com/iotaledger/twin-tools/commit/97bb11fd9e6ed400e7fa69671075ba78f36ca6e6))
|
|
147
|
+
* correctly handle auto expand types ([57fce0f](https://github.com/iotaledger/twin-tools/commit/57fce0f9ec4a0876665d70adc6e885f6feb3caf7))
|
|
148
|
+
* eslint migration to flat config ([25acfcf](https://github.com/iotaledger/twin-tools/commit/25acfcf4c4e0c496fffeaf67659fe171bc15199a))
|
|
149
|
+
* improve auto expand types ([6181d1d](https://github.com/iotaledger/twin-tools/commit/6181d1daded1f91323195cf7efbc2f1881f38b41))
|
|
150
|
+
* improve discriminated unions ([9c36ea7](https://github.com/iotaledger/twin-tools/commit/9c36ea7283230089ff19085ddc4b4c30a4e3f8a2))
|
|
151
|
+
* improve type name normalisation ([1fe28e5](https://github.com/iotaledger/twin-tools/commit/1fe28e567593e46a41a833fbba95fe4cd958f525))
|
|
152
|
+
* remove additionalProperties ([f9b5d81](https://github.com/iotaledger/twin-tools/commit/f9b5d81e952468f9579593cb979f2b84db6f0dfa))
|
|
153
|
+
* remove auto expanded types from final output ([18e05dc](https://github.com/iotaledger/twin-tools/commit/18e05dc88f71a0a27b79d1d076b1261b42d2c4c2))
|
|
154
|
+
* tighten the types included with the regex matching ([e54909b](https://github.com/iotaledger/twin-tools/commit/e54909bded4a19d00560dd3ec783e9146580bda3))
|
|
155
|
+
* ts to schema ([#86](https://github.com/iotaledger/twin-tools/issues/86)) ([ffebda5](https://github.com/iotaledger/twin-tools/commit/ffebda5f14ab5ec734bf37c9fb70a7ec3d4012c3))
|
|
156
|
+
* update framework core ([559cb98](https://github.com/iotaledger/twin-tools/commit/559cb98612c05a05458b37462cda806b9591b18a))
|
|
157
|
+
* use jsdoc tags for json-ld markup ([1ea872e](https://github.com/iotaledger/twin-tools/commit/1ea872e07a1cc0e94178158a57383d64008e02e3))
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
### Bug Fixes
|
|
161
|
+
|
|
162
|
+
* additionalItems object check ([ca81668](https://github.com/iotaledger/twin-tools/commit/ca81668e1ee0d2b1a479215265e651932d7b76de))
|
|
163
|
+
* improve schema output ([9e53cbe](https://github.com/iotaledger/twin-tools/commit/9e53cbe26e6272323d72c65e277b7d24521fdbba))
|
|
164
|
+
* missing type definitions when importing relative from dynamic node_modules ([52d9fc5](https://github.com/iotaledger/twin-tools/commit/52d9fc5f2618a09c02b9f5dbe585b37cf60c9f20))
|
|
165
|
+
* work for schema generator spread defect ([1a705ff](https://github.com/iotaledger/twin-tools/commit/1a705ffc74b353f652e74ea43454164a2f6740bf))
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
### Dependencies
|
|
169
|
+
|
|
170
|
+
* The following workspace dependencies were updated
|
|
171
|
+
* dependencies
|
|
172
|
+
* @twin.org/tools-models bumped from 0.0.3-next.21 to 0.0.3-next.22
|
|
173
|
+
|
|
174
|
+
## [0.0.3-next.21](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.20...tools-core-v0.0.3-next.21) (2026-03-20)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
### Features
|
|
178
|
+
|
|
179
|
+
* add jsdoc tag validation ([971b8d3](https://github.com/iotaledger/twin-tools/commit/971b8d3817d40467bfd7549c99af602f0c590299))
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
### Dependencies
|
|
183
|
+
|
|
184
|
+
* The following workspace dependencies were updated
|
|
185
|
+
* dependencies
|
|
186
|
+
* @twin.org/tools-models bumped from 0.0.3-next.20 to 0.0.3-next.21
|
|
187
|
+
|
|
188
|
+
## [0.0.3-next.20](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.19...tools-core-v0.0.3-next.20) (2026-03-20)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Miscellaneous Chores
|
|
192
|
+
|
|
193
|
+
* **tools-core:** Synchronize repo versions
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
### Dependencies
|
|
197
|
+
|
|
198
|
+
* The following workspace dependencies were updated
|
|
199
|
+
* dependencies
|
|
200
|
+
* @twin.org/tools-models bumped from 0.0.3-next.19 to 0.0.3-next.20
|
|
201
|
+
|
|
202
|
+
## [0.0.3-next.19](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.18...tools-core-v0.0.3-next.19) (2026-03-19)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
### Miscellaneous Chores
|
|
206
|
+
|
|
207
|
+
* **tools-core:** Synchronize repo versions
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
### Dependencies
|
|
211
|
+
|
|
212
|
+
* The following workspace dependencies were updated
|
|
213
|
+
* dependencies
|
|
214
|
+
* @twin.org/tools-models bumped from 0.0.3-next.18 to 0.0.3-next.19
|
|
215
|
+
|
|
216
|
+
## [0.0.3-next.18](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.17...tools-core-v0.0.3-next.18) (2026-03-19)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
### Features
|
|
220
|
+
|
|
221
|
+
* add jsdoc default value to schema ([7886a84](https://github.com/iotaledger/twin-tools/commit/7886a84961e692d2054f223e2e99205a654b76a6))
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### Dependencies
|
|
225
|
+
|
|
226
|
+
* The following workspace dependencies were updated
|
|
227
|
+
* dependencies
|
|
228
|
+
* @twin.org/tools-models bumped from 0.0.3-next.17 to 0.0.3-next.18
|
|
229
|
+
|
|
230
|
+
## [0.0.3-next.17](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.16...tools-core-v0.0.3-next.17) (2026-03-19)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
### Features
|
|
234
|
+
|
|
235
|
+
* improve discriminated unions ([9c36ea7](https://github.com/iotaledger/twin-tools/commit/9c36ea7283230089ff19085ddc4b4c30a4e3f8a2))
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
### Dependencies
|
|
239
|
+
|
|
240
|
+
* The following workspace dependencies were updated
|
|
241
|
+
* dependencies
|
|
242
|
+
* @twin.org/tools-models bumped from 0.0.3-next.16 to 0.0.3-next.17
|
|
243
|
+
|
|
244
|
+
## [0.0.3-next.16](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.15...tools-core-v0.0.3-next.16) (2026-03-19)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
### Features
|
|
248
|
+
|
|
249
|
+
* ts to schema ([#86](https://github.com/iotaledger/twin-tools/issues/86)) ([ffebda5](https://github.com/iotaledger/twin-tools/commit/ffebda5f14ab5ec734bf37c9fb70a7ec3d4012c3))
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
### Dependencies
|
|
253
|
+
|
|
254
|
+
* The following workspace dependencies were updated
|
|
255
|
+
* dependencies
|
|
256
|
+
* @twin.org/tools-models bumped from 0.0.3-next.15 to 0.0.3-next.16
|
|
257
|
+
|
|
258
|
+
## [0.0.3-next.15](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.14...tools-core-v0.0.3-next.15) (2026-03-10)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### Features
|
|
262
|
+
|
|
263
|
+
* use jsdoc tags for json-ld markup ([1ea872e](https://github.com/iotaledger/twin-tools/commit/1ea872e07a1cc0e94178158a57383d64008e02e3))
|
|
264
|
+
|
|
265
|
+
## [0.0.3-next.14](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.13...tools-core-v0.0.3-next.14) (2026-03-06)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
### Bug Fixes
|
|
269
|
+
|
|
270
|
+
* improve schema output ([9e53cbe](https://github.com/iotaledger/twin-tools/commit/9e53cbe26e6272323d72c65e277b7d24521fdbba))
|
|
271
|
+
|
|
272
|
+
## [0.0.3-next.13](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.12...tools-core-v0.0.3-next.13) (2026-03-05)
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
### Bug Fixes
|
|
276
|
+
|
|
277
|
+
* work for schema generator spread defect ([1a705ff](https://github.com/iotaledger/twin-tools/commit/1a705ffc74b353f652e74ea43454164a2f6740bf))
|
|
278
|
+
|
|
279
|
+
## [0.0.3-next.12](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.11...tools-core-v0.0.3-next.12) (2026-02-27)
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
### Miscellaneous Chores
|
|
283
|
+
|
|
284
|
+
* **tools-core:** Synchronize repo versions
|
|
285
|
+
|
|
286
|
+
## [0.0.3-next.11](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.10...tools-core-v0.0.3-next.11) (2026-02-25)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
### Miscellaneous Chores
|
|
290
|
+
|
|
291
|
+
* **tools-core:** Synchronize repo versions
|
|
292
|
+
|
|
293
|
+
## [0.0.3-next.10](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.9...tools-core-v0.0.3-next.10) (2026-02-25)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
### Features
|
|
297
|
+
|
|
298
|
+
* remove additionalProperties ([f9b5d81](https://github.com/iotaledger/twin-tools/commit/f9b5d81e952468f9579593cb979f2b84db6f0dfa))
|
|
299
|
+
|
|
300
|
+
## [0.0.3-next.9](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.8...tools-core-v0.0.3-next.9) (2026-02-24)
|
|
4
301
|
|
|
5
302
|
|
|
6
303
|
### Miscellaneous Chores
|
|
7
304
|
|
|
8
305
|
* **tools-core:** Synchronize repo versions
|
|
9
306
|
|
|
10
|
-
## [0.0.3-next.8](https://github.com/
|
|
307
|
+
## [0.0.3-next.8](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.7...tools-core-v0.0.3-next.8) (2026-02-23)
|
|
11
308
|
|
|
12
309
|
|
|
13
310
|
### Miscellaneous Chores
|
|
14
311
|
|
|
15
312
|
* **tools-core:** Synchronize repo versions
|
|
16
313
|
|
|
17
|
-
## [0.0.3-next.7](https://github.com/
|
|
314
|
+
## [0.0.3-next.7](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.6...tools-core-v0.0.3-next.7) (2026-02-04)
|
|
18
315
|
|
|
19
316
|
|
|
20
317
|
### Miscellaneous Chores
|
|
21
318
|
|
|
22
319
|
* **tools-core:** Synchronize repo versions
|
|
23
320
|
|
|
24
|
-
## [0.0.3-next.6](https://github.com/
|
|
321
|
+
## [0.0.3-next.6](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.5...tools-core-v0.0.3-next.6) (2026-01-28)
|
|
25
322
|
|
|
26
323
|
|
|
27
324
|
### Miscellaneous Chores
|
|
28
325
|
|
|
29
326
|
* **tools-core:** Synchronize repo versions
|
|
30
327
|
|
|
31
|
-
## [0.0.3-next.5](https://github.com/
|
|
328
|
+
## [0.0.3-next.5](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.4...tools-core-v0.0.3-next.5) (2026-01-06)
|
|
32
329
|
|
|
33
330
|
|
|
34
331
|
### Miscellaneous Chores
|
|
35
332
|
|
|
36
333
|
* **tools-core:** Synchronize repo versions
|
|
37
334
|
|
|
38
|
-
## [0.0.3-next.4](https://github.com/
|
|
335
|
+
## [0.0.3-next.4](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.3...tools-core-v0.0.3-next.4) (2026-01-05)
|
|
39
336
|
|
|
40
337
|
|
|
41
338
|
### Miscellaneous Chores
|
|
42
339
|
|
|
43
340
|
* **tools-core:** Synchronize repo versions
|
|
44
341
|
|
|
45
|
-
## [0.0.3-next.3](https://github.com/
|
|
342
|
+
## [0.0.3-next.3](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.2...tools-core-v0.0.3-next.3) (2025-11-11)
|
|
46
343
|
|
|
47
344
|
|
|
48
345
|
### Miscellaneous Chores
|
|
49
346
|
|
|
50
347
|
* **tools-core:** Synchronize repo versions
|
|
51
348
|
|
|
52
|
-
## [0.0.3-next.2](https://github.com/
|
|
349
|
+
## [0.0.3-next.2](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.1...tools-core-v0.0.3-next.2) (2025-11-11)
|
|
53
350
|
|
|
54
351
|
|
|
55
352
|
### Bug Fixes
|
|
56
353
|
|
|
57
|
-
* additionalItems object check ([ca81668](https://github.com/
|
|
354
|
+
* additionalItems object check ([ca81668](https://github.com/iotaledger/twin-tools/commit/ca81668e1ee0d2b1a479215265e651932d7b76de))
|
|
58
355
|
|
|
59
|
-
## [0.0.3-next.1](https://github.com/
|
|
356
|
+
## [0.0.3-next.1](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.3-next.0...tools-core-v0.0.3-next.1) (2025-11-10)
|
|
60
357
|
|
|
61
358
|
|
|
62
359
|
### Features
|
|
63
360
|
|
|
64
|
-
* add context id features ([#54](https://github.com/
|
|
65
|
-
* add support for auto expand types ([dd1e10a](https://github.com/
|
|
66
|
-
* add validate-locales ([97bb11f](https://github.com/
|
|
67
|
-
* correctly handle auto expand types ([57fce0f](https://github.com/
|
|
68
|
-
* eslint migration to flat config ([25acfcf](https://github.com/
|
|
69
|
-
* improve auto expand types ([6181d1d](https://github.com/
|
|
70
|
-
* improve type name normalisation ([1fe28e5](https://github.com/
|
|
71
|
-
* remove auto expanded types from final output ([18e05dc](https://github.com/
|
|
72
|
-
* tighten the types included with the regex matching ([e54909b](https://github.com/
|
|
73
|
-
* update framework core ([559cb98](https://github.com/
|
|
361
|
+
* add context id features ([#54](https://github.com/iotaledger/twin-tools/issues/54)) ([41ad65d](https://github.com/iotaledger/twin-tools/commit/41ad65d5ae33d0533d32a2864cd94e5c35e56c76))
|
|
362
|
+
* add support for auto expand types ([dd1e10a](https://github.com/iotaledger/twin-tools/commit/dd1e10a5b2fea6f80890ff6f3971f48e239cb4c1))
|
|
363
|
+
* add validate-locales ([97bb11f](https://github.com/iotaledger/twin-tools/commit/97bb11fd9e6ed400e7fa69671075ba78f36ca6e6))
|
|
364
|
+
* correctly handle auto expand types ([57fce0f](https://github.com/iotaledger/twin-tools/commit/57fce0f9ec4a0876665d70adc6e885f6feb3caf7))
|
|
365
|
+
* eslint migration to flat config ([25acfcf](https://github.com/iotaledger/twin-tools/commit/25acfcf4c4e0c496fffeaf67659fe171bc15199a))
|
|
366
|
+
* improve auto expand types ([6181d1d](https://github.com/iotaledger/twin-tools/commit/6181d1daded1f91323195cf7efbc2f1881f38b41))
|
|
367
|
+
* improve type name normalisation ([1fe28e5](https://github.com/iotaledger/twin-tools/commit/1fe28e567593e46a41a833fbba95fe4cd958f525))
|
|
368
|
+
* remove auto expanded types from final output ([18e05dc](https://github.com/iotaledger/twin-tools/commit/18e05dc88f71a0a27b79d1d076b1261b42d2c4c2))
|
|
369
|
+
* tighten the types included with the regex matching ([e54909b](https://github.com/iotaledger/twin-tools/commit/e54909bded4a19d00560dd3ec783e9146580bda3))
|
|
370
|
+
* update framework core ([559cb98](https://github.com/iotaledger/twin-tools/commit/559cb98612c05a05458b37462cda806b9591b18a))
|
|
74
371
|
|
|
75
|
-
## [0.0.2-next.10](https://github.com/
|
|
372
|
+
## [0.0.2-next.10](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.9...tools-core-v0.0.2-next.10) (2025-10-09)
|
|
76
373
|
|
|
77
374
|
|
|
78
375
|
### Features
|
|
79
376
|
|
|
80
|
-
* add validate-locales ([97bb11f](https://github.com/
|
|
377
|
+
* add validate-locales ([97bb11f](https://github.com/iotaledger/twin-tools/commit/97bb11fd9e6ed400e7fa69671075ba78f36ca6e6))
|
|
81
378
|
|
|
82
|
-
## [0.0.2-next.9](https://github.com/
|
|
379
|
+
## [0.0.2-next.9](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.8...tools-core-v0.0.2-next.9) (2025-09-23)
|
|
83
380
|
|
|
84
381
|
|
|
85
382
|
### Miscellaneous Chores
|
|
86
383
|
|
|
87
384
|
* **tools-core:** Synchronize repo versions
|
|
88
385
|
|
|
89
|
-
## [0.0.2-next.8](https://github.com/
|
|
386
|
+
## [0.0.2-next.8](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.7...tools-core-v0.0.2-next.8) (2025-09-05)
|
|
90
387
|
|
|
91
388
|
|
|
92
389
|
### Features
|
|
93
390
|
|
|
94
|
-
* tighten the types included with the regex matching ([e54909b](https://github.com/
|
|
391
|
+
* tighten the types included with the regex matching ([e54909b](https://github.com/iotaledger/twin-tools/commit/e54909bded4a19d00560dd3ec783e9146580bda3))
|
|
95
392
|
|
|
96
|
-
## [0.0.2-next.7](https://github.com/
|
|
393
|
+
## [0.0.2-next.7](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.6...tools-core-v0.0.2-next.7) (2025-08-29)
|
|
97
394
|
|
|
98
395
|
|
|
99
396
|
### Features
|
|
100
397
|
|
|
101
|
-
* eslint migration to flat config ([25acfcf](https://github.com/
|
|
398
|
+
* eslint migration to flat config ([25acfcf](https://github.com/iotaledger/twin-tools/commit/25acfcf4c4e0c496fffeaf67659fe171bc15199a))
|
|
102
399
|
|
|
103
|
-
## [0.0.2-next.6](https://github.com/
|
|
400
|
+
## [0.0.2-next.6](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.5...tools-core-v0.0.2-next.6) (2025-08-21)
|
|
104
401
|
|
|
105
402
|
|
|
106
403
|
### Features
|
|
107
404
|
|
|
108
|
-
* remove auto expanded types from final output ([18e05dc](https://github.com/
|
|
405
|
+
* remove auto expanded types from final output ([18e05dc](https://github.com/iotaledger/twin-tools/commit/18e05dc88f71a0a27b79d1d076b1261b42d2c4c2))
|
|
109
406
|
|
|
110
|
-
## [0.0.2-next.5](https://github.com/
|
|
407
|
+
## [0.0.2-next.5](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.4...tools-core-v0.0.2-next.5) (2025-08-19)
|
|
111
408
|
|
|
112
409
|
|
|
113
410
|
### Features
|
|
114
411
|
|
|
115
|
-
* correctly handle auto expand types ([57fce0f](https://github.com/
|
|
412
|
+
* correctly handle auto expand types ([57fce0f](https://github.com/iotaledger/twin-tools/commit/57fce0f9ec4a0876665d70adc6e885f6feb3caf7))
|
|
116
413
|
|
|
117
|
-
## [0.0.2-next.4](https://github.com/
|
|
414
|
+
## [0.0.2-next.4](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.3...tools-core-v0.0.2-next.4) (2025-08-19)
|
|
118
415
|
|
|
119
416
|
|
|
120
417
|
### Features
|
|
121
418
|
|
|
122
|
-
* update framework core ([559cb98](https://github.com/
|
|
419
|
+
* update framework core ([559cb98](https://github.com/iotaledger/twin-tools/commit/559cb98612c05a05458b37462cda806b9591b18a))
|
|
123
420
|
|
|
124
|
-
## [0.0.2-next.3](https://github.com/
|
|
421
|
+
## [0.0.2-next.3](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.2...tools-core-v0.0.2-next.3) (2025-08-05)
|
|
125
422
|
|
|
126
423
|
|
|
127
424
|
### Features
|
|
128
425
|
|
|
129
|
-
* improve type name normalisation ([1fe28e5](https://github.com/
|
|
426
|
+
* improve type name normalisation ([1fe28e5](https://github.com/iotaledger/twin-tools/commit/1fe28e567593e46a41a833fbba95fe4cd958f525))
|
|
130
427
|
|
|
131
|
-
## [0.0.2-next.2](https://github.com/
|
|
428
|
+
## [0.0.2-next.2](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.1...tools-core-v0.0.2-next.2) (2025-07-17)
|
|
132
429
|
|
|
133
430
|
|
|
134
431
|
### Features
|
|
135
432
|
|
|
136
|
-
* improve auto expand types ([6181d1d](https://github.com/
|
|
433
|
+
* improve auto expand types ([6181d1d](https://github.com/iotaledger/twin-tools/commit/6181d1daded1f91323195cf7efbc2f1881f38b41))
|
|
137
434
|
|
|
138
|
-
## [0.0.2-next.1](https://github.com/
|
|
435
|
+
## [0.0.2-next.1](https://github.com/iotaledger/twin-tools/compare/tools-core-v0.0.2-next.0...tools-core-v0.0.2-next.1) (2025-07-14)
|
|
139
436
|
|
|
140
437
|
|
|
141
438
|
### Features
|
|
142
439
|
|
|
143
|
-
* add support for auto expand types ([dd1e10a](https://github.com/
|
|
440
|
+
* add support for auto expand types ([dd1e10a](https://github.com/iotaledger/twin-tools/commit/dd1e10a5b2fea6f80890ff6f3971f48e239cb4c1))
|
|
144
441
|
|
|
145
|
-
##
|
|
442
|
+
## Changelog
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,87 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Tools Core Examples
|
|
2
|
+
|
|
3
|
+
This package provides the lower-level building blocks used by the CLI applications. The most common entry point is `TypeScriptToSchema`, which parses TypeScript declarations and returns JSON Schema documents keyed by title.
|
|
4
|
+
|
|
5
|
+
## Generate Schemas From TypeScript
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import type { IJsonSchema } from '@twin.org/tools-models';
|
|
9
|
+
import { TypeScriptToSchema } from '@twin.org/tools-core';
|
|
10
|
+
|
|
11
|
+
const converter = new TypeScriptToSchema();
|
|
12
|
+
const packageSchemas: { [id: string]: { [id: string]: IJsonSchema } } = {};
|
|
13
|
+
|
|
14
|
+
const generatedSchemas = await converter.generateSchema(
|
|
15
|
+
'https://schema.example.com/demo/',
|
|
16
|
+
'@example/demo-package',
|
|
17
|
+
packageSchemas,
|
|
18
|
+
'./dist/types/models.d.ts'
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
console.log(Object.keys(generatedSchemas));
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
When you already know the exported type you want, pass the type name instead of a file path. The helper resolves the declaration and returns the generated schema for that type together with any dependent schemas.
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import type { IJsonSchema } from '@twin.org/tools-models';
|
|
28
|
+
import { TypeScriptToSchema } from '@twin.org/tools-core';
|
|
29
|
+
|
|
30
|
+
const converter = new TypeScriptToSchema();
|
|
31
|
+
const packageSchemas: { [id: string]: { [id: string]: IJsonSchema } } = {};
|
|
32
|
+
|
|
33
|
+
const generatedSchemas = await converter.generateSchema(
|
|
34
|
+
'https://schema.example.com/demo/',
|
|
35
|
+
'@example/demo-package',
|
|
36
|
+
packageSchemas,
|
|
37
|
+
'DemoRequest'
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const requestSchema = generatedSchemas.DemoRequest;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Transform Generated Object Schemas
|
|
44
|
+
|
|
45
|
+
`TypeScriptSchemaObjectTransformer` helps when you need to adapt object schemas produced by the builder for utility types such as `Pick` and `Omit`, or when you want cleaner description text before serialising the result.
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import type { IJsonSchema } from '@twin.org/tools-models';
|
|
49
|
+
import { TypeScriptSchemaObjectTransformer } from '@twin.org/tools-core';
|
|
50
|
+
|
|
51
|
+
const transformer = new TypeScriptSchemaObjectTransformer();
|
|
52
|
+
|
|
53
|
+
const personSchema: IJsonSchema = {
|
|
54
|
+
title: 'Person',
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {
|
|
57
|
+
id: { type: 'string' },
|
|
58
|
+
name: { type: 'string' },
|
|
59
|
+
email: { type: 'string', format: 'email' }
|
|
60
|
+
},
|
|
61
|
+
required: ['id', 'name', 'email']
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const publicPersonSchema = transformer.omitKeysFromObjectSchema(personSchema, ['email']);
|
|
65
|
+
const personSummarySchema = transformer.pickKeysFromObjectSchema(personSchema, ['id', 'name']);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If your schema descriptions come from multiline source comments, `normalizeSchemaDescriptions` removes duplicated whitespace while keeping intentional line breaks intact.
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import type { IJsonSchema } from '@twin.org/tools-models';
|
|
72
|
+
import { TypeScriptSchemaObjectTransformer } from '@twin.org/tools-core';
|
|
73
|
+
|
|
74
|
+
const transformer = new TypeScriptSchemaObjectTransformer();
|
|
75
|
+
|
|
76
|
+
const schemaWithDescription: IJsonSchema = {
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
status: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'Current status.\n\n Used in responses.'
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const normalisedSchema = transformer.normalizeSchemaDescriptions(schemaWithDescription);
|
|
87
|
+
```
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Class: Constants
|
|
2
|
+
|
|
3
|
+
Shared constants for TypeScript to JSON schema generation.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new Constants**(): `Constants`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`Constants`
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### UNSUPPORTED\_UTILITY\_TYPE\_NAMES {#unsupported_utility_type_names}
|
|
18
|
+
|
|
19
|
+
> `readonly` `static` **UNSUPPORTED\_UTILITY\_TYPE\_NAMES**: `string`[]
|
|
20
|
+
|
|
21
|
+
Utility type names currently unsupported and mapped to open schemas with diagnostics.
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### ARRAY\_NUMBER\_TYPE\_NAMES {#array_number_type_names}
|
|
26
|
+
|
|
27
|
+
> `readonly` `static` **ARRAY\_NUMBER\_TYPE\_NAMES**: `string`[]
|
|
28
|
+
|
|
29
|
+
Native typed-array and binary type names mapped to JSON number arrays.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Class: DiagnosticReporter
|
|
2
|
+
|
|
3
|
+
Emits non-fatal diagnostics during schema mapping.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new DiagnosticReporter**(): `DiagnosticReporter`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`DiagnosticReporter`
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
### report() {#report}
|
|
18
|
+
|
|
19
|
+
> `static` **report**(`context`, `node`, `code`, `properties?`): `void`
|
|
20
|
+
|
|
21
|
+
Emit an optional non-fatal schema generation diagnostic.
|
|
22
|
+
|
|
23
|
+
#### Parameters
|
|
24
|
+
|
|
25
|
+
##### context
|
|
26
|
+
|
|
27
|
+
[`ITypeScriptToSchemaContext`](../interfaces/ITypeScriptToSchemaContext.md)
|
|
28
|
+
|
|
29
|
+
The generation context.
|
|
30
|
+
|
|
31
|
+
##### node
|
|
32
|
+
|
|
33
|
+
`Node`
|
|
34
|
+
|
|
35
|
+
The related AST node.
|
|
36
|
+
|
|
37
|
+
##### code
|
|
38
|
+
|
|
39
|
+
`string`
|
|
40
|
+
|
|
41
|
+
The diagnostic code.
|
|
42
|
+
|
|
43
|
+
##### properties?
|
|
44
|
+
|
|
45
|
+
The values to substitute into the localised message.
|
|
46
|
+
|
|
47
|
+
#### Returns
|
|
48
|
+
|
|
49
|
+
`void`
|