ng-form-foundry-transformers 0.3.1 → 0.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.
- package/README.md +10 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,6 +43,12 @@ For config formats (YAML, JSON) the thing you load and save is the same document
|
|
|
43
43
|
type, so `TData` defaults to `TSource`. Schema formats differ: YANG's `toSchema`
|
|
44
44
|
consumes a model source but its `toSource` reverts to RFC 7951 *data*.
|
|
45
45
|
|
|
46
|
+
**Choice values:** the YAML/JSON `toSource` applies the value's keys verbatim,
|
|
47
|
+
so when the schema contains choices (`anyOf`/`oneOf`) pass the **wire value** —
|
|
48
|
+
the library's `serializeForm(schema, form)`, which strips the `__case`
|
|
49
|
+
discriminators from `getRawValue()`. The YANG adapter is the exception: its
|
|
50
|
+
`toYangData` consumes the form value and flattens `__case` itself.
|
|
51
|
+
|
|
46
52
|
## YAML transformer
|
|
47
53
|
|
|
48
54
|
Edit a **YAML config file**: turn it into a form, then write the edited value
|
|
@@ -181,6 +187,10 @@ npm test # node:test on the compiled output (no Python needed)
|
|
|
181
187
|
|
|
182
188
|
## Status
|
|
183
189
|
|
|
190
|
+
`0.3.2` — documentation release alongside the library's `serializeForm`: the
|
|
191
|
+
YAML/JSON `toSource` examples now take the wire value (choice `__case`
|
|
192
|
+
discriminators stripped); no transformer code changes.
|
|
193
|
+
|
|
184
194
|
`0.3.1` — version alignment with the library's review-fix release (all 59
|
|
185
195
|
findings of the tree-editor/form-renderer review resolved); no transformer
|
|
186
196
|
changes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ng-form-foundry-transformers",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Framework-agnostic Node + TypeScript catalog of source-format transformers: turn a YANG model (and more) into an ng-form-foundry schema and revert the edited form value back to the source format.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ng-form-foundry",
|