lutaml-model 0.8.202 → 0.8.204

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 (123) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +5 -0
  3. data/.github/workflows/dependent-tests.yml +59 -2
  4. data/.github/workflows/lml-conformance.yml +71 -0
  5. data/.gitignore +7 -0
  6. data/README.adoc +1 -0
  7. data/docs/_guides/lml-cross-language.adoc +128 -0
  8. data/docs/_references/lml-conformance.adoc +78 -0
  9. data/docs/_references/lml-contract.adoc +290 -0
  10. data/docs/_references/plan-schema-spec.adoc +45 -18
  11. data/lib/lutaml/key_value/transform.rb +140 -21
  12. data/lib/lutaml/model/attribute.rb +11 -6
  13. data/lib/lutaml/model/lml/artifact_verifier.rb +205 -0
  14. data/lib/lutaml/model/lml/bundle.rb +171 -0
  15. data/lib/lutaml/model/lml/document.rb +46 -10
  16. data/lib/lutaml/model/lml/document_validator.rb +840 -0
  17. data/lib/lutaml/model/lml/exporter/v1_projector.rb +102 -0
  18. data/lib/lutaml/model/lml/exporter/v2_projector.rb +401 -0
  19. data/lib/lutaml/model/lml/exporter.rb +223 -87
  20. data/lib/lutaml/model/lml/graph_exporter.rb +248 -0
  21. data/lib/lutaml/model/lml/importer.rb +180 -0
  22. data/lib/lutaml/model/lml/mapping_compiler.rb +401 -0
  23. data/lib/lutaml/model/lml/materialization.rb +257 -0
  24. data/lib/lutaml/model/lml/ordered_content.rb +577 -0
  25. data/lib/lutaml/model/lml/portable_json.rb +385 -0
  26. data/lib/lutaml/model/lml/rejected_error.rb +64 -15
  27. data/lib/lutaml/model/lml/round_trip.rb +86 -0
  28. data/lib/lutaml/model/lml/value_declarations.rb +84 -0
  29. data/lib/lutaml/model/lml.rb +61 -0
  30. data/lib/lutaml/model/schema/definitions/attribute.rb +4 -2
  31. data/lib/lutaml/model/schema/registry_generator.rb +1 -1
  32. data/lib/lutaml/model/schema/renderers/member_decls.rb +1 -0
  33. data/lib/lutaml/model/schema/xml_compiler/spec_builder/members.rb +10 -0
  34. data/lib/lutaml/model/sequence.rb +7 -0
  35. data/lib/lutaml/model/serialize/deserialization_context.rb +21 -0
  36. data/lib/lutaml/model/serialize/initialization.rb +19 -9
  37. data/lib/lutaml/model/version.rb +1 -1
  38. data/lib/lutaml/xml/leptris/native_emission.rb +4 -0
  39. data/lib/lutaml/xml/leptris/plan_serializer.rb +14 -9
  40. data/schema/lml/document.schema.json +179 -0
  41. data/scripts/lml/export_choices.rb +57 -0
  42. data/scripts/lml/export_conformance.rb +23 -0
  43. data/scripts/lml/export_mml.rb +253 -0
  44. data/scripts/lml/export_preservation.rb +421 -0
  45. data/scripts/lml/verify_artifacts.rb +31 -0
  46. data/spec/address_person_spec.rb +8 -0
  47. data/spec/address_spec.rb +4 -0
  48. data/spec/fixtures/lml_artifacts/model.json +1 -0
  49. data/spec/fixtures/lml_artifacts/valid.json +1 -0
  50. data/spec/fixtures/lml_artifacts/valid.sha256 +1 -0
  51. data/spec/fixtures/lml_conformance/core/index.json +1 -0
  52. data/spec/fixtures/lml_conformance/core/manifest.json +1 -0
  53. data/spec/fixtures/lml_conformance/core/schema.json +1 -0
  54. data/spec/fixtures/lml_conformance/core/schema.yaml +79 -0
  55. data/spec/fixtures/lml_conformance/float_vectors.generator.rb +60 -0
  56. data/spec/fixtures/lml_conformance/float_vectors.json +21550 -0
  57. data/spec/fixtures/lml_conformance/preservation/index.json +1 -0
  58. data/spec/fixtures/lml_conformance/preservation/manifest.json +1 -0
  59. data/spec/fixtures/lml_conformance/preservation/schema.json +1 -0
  60. data/spec/fixtures/lml_conformance/preservation/schema.yaml +319 -0
  61. data/spec/fixtures/lml_conformance/r2_refusals.generator.rb +153 -0
  62. data/spec/fixtures/lml_conformance/r2_refusals.json +1662 -0
  63. data/spec/fixtures/lml_conformance/ruby_portable_interop.generator.rb +40 -0
  64. data/spec/fixtures/lml_conformance/ruby_portable_interop.json +1 -0
  65. data/spec/fixtures/lml_contract/bundle.json +81 -0
  66. data/spec/fixtures/lml_contract/manifest.json +30 -0
  67. data/spec/fixtures/lml_contract/v1_unit.canonical.json +1 -0
  68. data/spec/fixtures/lml_contract/v1_unit.json +1 -0
  69. data/spec/fixtures/lml_contract/v2_node.canonical.json +1 -0
  70. data/spec/fixtures/lml_contract/v2_node.json +32 -0
  71. data/spec/fixtures/lml_mml/inventory.json +1 -0
  72. data/spec/fixtures/lml_mml/manifest.json +1 -0
  73. data/spec/fixtures/lml_mml/oracle.json +1 -0
  74. data/spec/fixtures/lml_mml/v3-mi-mixed.json +1 -0
  75. data/spec/fixtures/lml_mml/v3-mi-mixed.yaml +970 -0
  76. data/spec/fixtures/lml_mml/v4-mi-mixed.json +1 -0
  77. data/spec/fixtures/lml_mml/v4-mi-mixed.yaml +1516 -0
  78. data/spec/fixtures/lml_mml_materialization/replay.rb +37 -0
  79. data/spec/lutaml/key_value/group_instantiate_spec.rb +204 -1
  80. data/spec/lutaml/model/lml_any_attribute_spec.rb +91 -0
  81. data/spec/lutaml/model/lml_artifact_verifier_spec.rb +86 -0
  82. data/spec/lutaml/model/lml_builtin_types_spec.rb +49 -0
  83. data/spec/lutaml/model/lml_conformance_spec.rb +178 -0
  84. data/spec/lutaml/model/lml_document_spec.rb +279 -0
  85. data/spec/lutaml/model/lml_export_validation_spec.rb +96 -0
  86. data/spec/lutaml/model/lml_exporter_spec.rb +127 -5
  87. data/spec/lutaml/model/lml_graph_exporter_spec.rb +205 -0
  88. data/spec/lutaml/model/lml_importer_spec.rb +290 -0
  89. data/spec/lutaml/model/lml_input_hardening_spec.rb +156 -0
  90. data/spec/lutaml/model/lml_mapping_compiler_spec.rb +256 -0
  91. data/spec/lutaml/model/lml_materialization_spec.rb +138 -0
  92. data/spec/lutaml/model/lml_mml_materialization_spec.rb +54 -0
  93. data/spec/lutaml/model/lml_mml_pilot_spec.rb +150 -0
  94. data/spec/lutaml/model/lml_model_choices_spec.rb +88 -0
  95. data/spec/lutaml/model/lml_ordered_content_spec.rb +243 -0
  96. data/spec/lutaml/model/lml_portable_json_spec.rb +310 -0
  97. data/spec/lutaml/model/lml_preservation_spec.rb +211 -0
  98. data/spec/lutaml/model/lml_review_export_spec.rb +247 -0
  99. data/spec/lutaml/model/lml_review_import_spec.rb +390 -0
  100. data/spec/lutaml/model/lml_review_misc_spec.rb +152 -0
  101. data/spec/lutaml/model/lml_review_round4_spec.rb +200 -0
  102. data/spec/lutaml/model/lml_review_round5_spec.rb +194 -0
  103. data/spec/lutaml/model/lml_ruby_interop_fixture_spec.rb +37 -0
  104. data/spec/lutaml/model/lml_shared_corpus_spec.rb +132 -0
  105. data/spec/lutaml/model/lml_value_declarations_spec.rb +128 -0
  106. data/spec/lutaml/model/schema/class_loader_spec.rb +51 -0
  107. data/spec/lutaml/model/schema/xml_compiler_runtime_spec.rb +20 -0
  108. data/spec/lutaml/model/sequence_spec.rb +48 -0
  109. data/spec/lutaml/model/serialize/deserialization_context_spec.rb +68 -0
  110. data/spec/lutaml/xml/cdata_emission_spec.rb +68 -0
  111. data/spec/spec_helper.rb +4 -5
  112. data/spec/support/lml_any_attribute_fixtures.rb +26 -0
  113. data/spec/support/lml_conformance.rb +292 -0
  114. data/spec/support/lml_corpus.rb +75 -0
  115. data/spec/support/lml_export_fixtures.rb +190 -0
  116. data/spec/support/lml_graph_fixtures.rb +108 -0
  117. data/spec/support/lml_import_fixtures.rb +52 -0
  118. data/spec/support/lml_mapping_fixtures.rb +170 -0
  119. data/spec/support/lml_materialization_fixtures.rb +53 -0
  120. data/spec/support/lml_model_choices_fixtures.rb +150 -0
  121. data/spec/support/lml_order_fixtures.rb +151 -0
  122. metadata +93 -2
  123. data/lib/lutaml/model/schema/schema_builder/nokogiri.rb +0 -41
@@ -0,0 +1,1662 @@
1
+ [
2
+ {
3
+ "name": "valid_control",
4
+ "kind": "document",
5
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
6
+ "expect": null
7
+ },
8
+ {
9
+ "name": "name_foo?",
10
+ "kind": "document",
11
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"foo?\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
12
+ "expect": {
13
+ "reason": "invalid_document",
14
+ "location": "/attributes/0/name",
15
+ "detail": "attribute name \"foo?\" must match \\A[a-z_][a-zA-Z0-9_]*\\z"
16
+ }
17
+ },
18
+ {
19
+ "name": "name_foo!",
20
+ "kind": "document",
21
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"foo!\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
22
+ "expect": {
23
+ "reason": "invalid_document",
24
+ "location": "/attributes/0/name",
25
+ "detail": "attribute name \"foo!\" must match \\A[a-z_][a-zA-Z0-9_]*\\z"
26
+ }
27
+ },
28
+ {
29
+ "name": "name_foo=",
30
+ "kind": "document",
31
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"foo=\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
32
+ "expect": {
33
+ "reason": "invalid_document",
34
+ "location": "/attributes/0/name",
35
+ "detail": "attribute name \"foo=\" must match \\A[a-z_][a-zA-Z0-9_]*\\z"
36
+ }
37
+ },
38
+ {
39
+ "name": "name_1a",
40
+ "kind": "document",
41
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"1a\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
42
+ "expect": {
43
+ "reason": "invalid_document",
44
+ "location": "/attributes/0/name",
45
+ "detail": "attribute name \"1a\" must match \\A[a-z_][a-zA-Z0-9_]*\\z"
46
+ }
47
+ },
48
+ {
49
+ "name": "name_Abc",
50
+ "kind": "document",
51
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"Abc\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
52
+ "expect": {
53
+ "reason": "invalid_document",
54
+ "location": "/attributes/0/name",
55
+ "detail": "attribute name \"Abc\" must match \\A[a-z_][a-zA-Z0-9_]*\\z"
56
+ }
57
+ },
58
+ {
59
+ "name": "name_a-b",
60
+ "kind": "document",
61
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"a-b\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
62
+ "expect": {
63
+ "reason": "invalid_document",
64
+ "location": "/attributes/0/name",
65
+ "detail": "attribute name \"a-b\" must match \\A[a-z_][a-zA-Z0-9_]*\\z"
66
+ }
67
+ },
68
+ {
69
+ "name": "name_a b",
70
+ "kind": "document",
71
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"a b\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
72
+ "expect": {
73
+ "reason": "invalid_document",
74
+ "location": "/attributes/0/name",
75
+ "detail": "attribute name \"a b\" must match \\A[a-z_][a-zA-Z0-9_]*\\z"
76
+ }
77
+ },
78
+ {
79
+ "name": "name_aé",
80
+ "kind": "document",
81
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"aé\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
82
+ "expect": {
83
+ "reason": "invalid_document",
84
+ "location": "/attributes/0/name",
85
+ "detail": "attribute name \"aé\" must match \\A[a-z_][a-zA-Z0-9_]*\\z"
86
+ }
87
+ },
88
+ {
89
+ "name": "name_ok__x",
90
+ "kind": "document",
91
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"_x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
92
+ "expect": null
93
+ },
94
+ {
95
+ "name": "name_ok_aB9",
96
+ "kind": "document",
97
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"aB9\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
98
+ "expect": null
99
+ },
100
+ {
101
+ "name": "name_ok_display",
102
+ "kind": "document",
103
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"display\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
104
+ "expect": null
105
+ },
106
+ {
107
+ "name": "name_ok_hash",
108
+ "kind": "document",
109
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"hash\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
110
+ "expect": null
111
+ },
112
+ {
113
+ "name": "name_ok_schema_location",
114
+ "kind": "document",
115
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"schema_location\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
116
+ "expect": null
117
+ },
118
+ {
119
+ "name": "name_ok_send",
120
+ "kind": "document",
121
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"send\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
122
+ "expect": null
123
+ },
124
+ {
125
+ "name": "name_ok_freeze",
126
+ "kind": "document",
127
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"freeze\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
128
+ "expect": null
129
+ },
130
+ {
131
+ "name": "reserved___id__",
132
+ "kind": "document",
133
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"__id__\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
134
+ "expect": {
135
+ "reason": "reserved_member",
136
+ "location": "/attributes/1/name",
137
+ "detail": "attribute name __id__ breaks Serializable (reserved attribute name)"
138
+ }
139
+ },
140
+ {
141
+ "name": "reserved___lutaml_default_attribute_name__",
142
+ "kind": "document",
143
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"__lutaml_default_attribute_name__\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
144
+ "expect": {
145
+ "reason": "reserved_member",
146
+ "location": "/attributes/1/name",
147
+ "detail": "attribute name __lutaml_default_attribute_name__ breaks Serializable (reserved attribute name)"
148
+ }
149
+ },
150
+ {
151
+ "name": "reserved___lutaml_default_owner__",
152
+ "kind": "document",
153
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"__lutaml_default_owner__\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
154
+ "expect": {
155
+ "reason": "reserved_member",
156
+ "location": "/attributes/1/name",
157
+ "detail": "attribute name __lutaml_default_owner__ breaks Serializable (reserved attribute name)"
158
+ }
159
+ },
160
+ {
161
+ "name": "reserved___send__",
162
+ "kind": "document",
163
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"__send__\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
164
+ "expect": {
165
+ "reason": "reserved_member",
166
+ "location": "/attributes/1/name",
167
+ "detail": "attribute name __send__ breaks Serializable (reserved attribute name)"
168
+ }
169
+ },
170
+ {
171
+ "name": "reserved_attribute_order",
172
+ "kind": "document",
173
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"attribute_order\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
174
+ "expect": {
175
+ "reason": "reserved_member",
176
+ "location": "/attributes/1/name",
177
+ "detail": "attribute name attribute_order breaks Serializable (reserved attribute name)"
178
+ }
179
+ },
180
+ {
181
+ "name": "reserved_class",
182
+ "kind": "document",
183
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"class\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
184
+ "expect": {
185
+ "reason": "reserved_member",
186
+ "location": "/attributes/1/name",
187
+ "detail": "attribute name class breaks Serializable (reserved attribute name)"
188
+ }
189
+ },
190
+ {
191
+ "name": "reserved_doctype",
192
+ "kind": "document",
193
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"doctype\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
194
+ "expect": {
195
+ "reason": "reserved_member",
196
+ "location": "/attributes/1/name",
197
+ "detail": "attribute name doctype breaks Serializable (reserved attribute name)"
198
+ }
199
+ },
200
+ {
201
+ "name": "reserved_element_order",
202
+ "kind": "document",
203
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"element_order\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
204
+ "expect": {
205
+ "reason": "reserved_member",
206
+ "location": "/attributes/1/name",
207
+ "detail": "attribute name element_order breaks Serializable (reserved attribute name)"
208
+ }
209
+ },
210
+ {
211
+ "name": "reserved_encoding",
212
+ "kind": "document",
213
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"encoding\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
214
+ "expect": {
215
+ "reason": "reserved_member",
216
+ "location": "/attributes/1/name",
217
+ "detail": "attribute name encoding breaks Serializable (reserved attribute name)"
218
+ }
219
+ },
220
+ {
221
+ "name": "reserved_extract_register_id",
222
+ "kind": "document",
223
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"extract_register_id\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
224
+ "expect": {
225
+ "reason": "reserved_member",
226
+ "location": "/attributes/1/name",
227
+ "detail": "attribute name extract_register_id breaks Serializable (reserved attribute name)"
228
+ }
229
+ },
230
+ {
231
+ "name": "reserved_import_declaration_plan",
232
+ "kind": "document",
233
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"import_declaration_plan\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
234
+ "expect": {
235
+ "reason": "reserved_member",
236
+ "location": "/attributes/1/name",
237
+ "detail": "attribute name import_declaration_plan breaks Serializable (reserved attribute name)"
238
+ }
239
+ },
240
+ {
241
+ "name": "reserved_initialize",
242
+ "kind": "document",
243
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"initialize\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
244
+ "expect": {
245
+ "reason": "reserved_member",
246
+ "location": "/attributes/1/name",
247
+ "detail": "attribute name initialize breaks Serializable (reserved attribute name)"
248
+ }
249
+ },
250
+ {
251
+ "name": "reserved_initialize_clone",
252
+ "kind": "document",
253
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"initialize_clone\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
254
+ "expect": {
255
+ "reason": "reserved_member",
256
+ "location": "/attributes/1/name",
257
+ "detail": "attribute name initialize_clone breaks Serializable (reserved attribute name)"
258
+ }
259
+ },
260
+ {
261
+ "name": "reserved_initialize_copy",
262
+ "kind": "document",
263
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"initialize_copy\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
264
+ "expect": {
265
+ "reason": "reserved_member",
266
+ "location": "/attributes/1/name",
267
+ "detail": "attribute name initialize_copy breaks Serializable (reserved attribute name)"
268
+ }
269
+ },
270
+ {
271
+ "name": "reserved_initialize_dup",
272
+ "kind": "document",
273
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"initialize_dup\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
274
+ "expect": {
275
+ "reason": "reserved_member",
276
+ "location": "/attributes/1/name",
277
+ "detail": "attribute name initialize_dup breaks Serializable (reserved attribute name)"
278
+ }
279
+ },
280
+ {
281
+ "name": "reserved_lutaml_register",
282
+ "kind": "document",
283
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"lutaml_register\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
284
+ "expect": {
285
+ "reason": "reserved_member",
286
+ "location": "/attributes/1/name",
287
+ "detail": "attribute name lutaml_register breaks Serializable (reserved attribute name)"
288
+ }
289
+ },
290
+ {
291
+ "name": "reserved_pending_plan_root_element",
292
+ "kind": "document",
293
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"pending_plan_root_element\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
294
+ "expect": {
295
+ "reason": "reserved_member",
296
+ "location": "/attributes/1/name",
297
+ "detail": "attribute name pending_plan_root_element breaks Serializable (reserved attribute name)"
298
+ }
299
+ },
300
+ {
301
+ "name": "reserved_prepare_instance_format_options",
302
+ "kind": "document",
303
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"prepare_instance_format_options\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
304
+ "expect": {
305
+ "reason": "reserved_member",
306
+ "location": "/attributes/1/name",
307
+ "detail": "attribute name prepare_instance_format_options breaks Serializable (reserved attribute name)"
308
+ }
309
+ },
310
+ {
311
+ "name": "reserved_public_send",
312
+ "kind": "document",
313
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"public_send\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
314
+ "expect": {
315
+ "reason": "reserved_member",
316
+ "location": "/attributes/1/name",
317
+ "detail": "attribute name public_send breaks Serializable (reserved attribute name)"
318
+ }
319
+ },
320
+ {
321
+ "name": "reserved_record_mutation",
322
+ "kind": "document",
323
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"record_mutation\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
324
+ "expect": {
325
+ "reason": "reserved_member",
326
+ "location": "/attributes/1/name",
327
+ "detail": "attribute name record_mutation breaks Serializable (reserved attribute name)"
328
+ }
329
+ },
330
+ {
331
+ "name": "reserved_to_format",
332
+ "kind": "document",
333
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"to_format\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
334
+ "expect": {
335
+ "reason": "reserved_member",
336
+ "location": "/attributes/1/name",
337
+ "detail": "attribute name to_format breaks Serializable (reserved attribute name)"
338
+ }
339
+ },
340
+ {
341
+ "name": "reserved_to_json",
342
+ "kind": "document",
343
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"to_json\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
344
+ "expect": {
345
+ "reason": "reserved_member",
346
+ "location": "/attributes/1/name",
347
+ "detail": "attribute name to_json breaks Serializable (reserved attribute name)"
348
+ }
349
+ },
350
+ {
351
+ "name": "reserved_to_xml",
352
+ "kind": "document",
353
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"to_xml\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
354
+ "expect": {
355
+ "reason": "reserved_member",
356
+ "location": "/attributes/1/name",
357
+ "detail": "attribute name to_xml breaks Serializable (reserved attribute name)"
358
+ }
359
+ },
360
+ {
361
+ "name": "reserved_to_yaml",
362
+ "kind": "document",
363
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"to_yaml\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
364
+ "expect": {
365
+ "reason": "reserved_member",
366
+ "location": "/attributes/1/name",
367
+ "detail": "attribute name to_yaml breaks Serializable (reserved attribute name)"
368
+ }
369
+ },
370
+ {
371
+ "name": "reserved_value_set_for",
372
+ "kind": "document",
373
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"value_set_for\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
374
+ "expect": {
375
+ "reason": "reserved_member",
376
+ "location": "/attributes/1/name",
377
+ "detail": "attribute name value_set_for breaks Serializable (reserved attribute name)"
378
+ }
379
+ },
380
+ {
381
+ "name": "reserved_xml_declaration",
382
+ "kind": "document",
383
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"xml_declaration\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
384
+ "expect": {
385
+ "reason": "reserved_member",
386
+ "location": "/attributes/1/name",
387
+ "detail": "attribute name xml_declaration breaks Serializable (reserved attribute name)"
388
+ }
389
+ },
390
+ {
391
+ "name": "reserved_xml_ns_prefixes",
392
+ "kind": "document",
393
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"ok\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}},{\"name\":\"xml_ns_prefixes\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
394
+ "expect": {
395
+ "reason": "reserved_member",
396
+ "location": "/attributes/1/name",
397
+ "detail": "attribute name xml_ns_prefixes breaks Serializable (reserved attribute name)"
398
+ }
399
+ },
400
+ {
401
+ "name": "name_empty",
402
+ "kind": "document",
403
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
404
+ "expect": {
405
+ "reason": "invalid_document",
406
+ "location": "/attributes/0/name",
407
+ "detail": "expected a non-empty string"
408
+ }
409
+ },
410
+ {
411
+ "name": "name_ordered_content",
412
+ "kind": "document",
413
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"__lml_content\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}]}",
414
+ "expect": {
415
+ "reason": "reserved_member",
416
+ "location": "/attributes/0/name",
417
+ "detail": "__lml_content is reserved for ordered content"
418
+ }
419
+ },
420
+ {
421
+ "name": "root_string",
422
+ "kind": "document",
423
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root\":\"a\"}}}",
424
+ "expect": {
425
+ "reason": "invalid_document",
426
+ "location": "/mappings/xml/root",
427
+ "detail": "expected an object"
428
+ }
429
+ },
430
+ {
431
+ "name": "root_array",
432
+ "kind": "document",
433
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root\":[]}}}",
434
+ "expect": {
435
+ "reason": "invalid_document",
436
+ "location": "/mappings/xml/root",
437
+ "detail": "expected an object"
438
+ }
439
+ },
440
+ {
441
+ "name": "root_null",
442
+ "kind": "document",
443
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root\":null}}}",
444
+ "expect": {
445
+ "reason": "invalid_document",
446
+ "location": "/mappings/xml/root",
447
+ "detail": "expected an object"
448
+ }
449
+ },
450
+ {
451
+ "name": "root_ok",
452
+ "kind": "document",
453
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root\":{\"element\":\"a\",\"mixed\":true}}}}",
454
+ "expect": null
455
+ },
456
+ {
457
+ "name": "root_element_empty",
458
+ "kind": "document",
459
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root\":{\"element\":\"\"}}}}",
460
+ "expect": {
461
+ "reason": "invalid_document",
462
+ "location": "/mappings/xml/root/element",
463
+ "detail": "expected a non-empty string"
464
+ }
465
+ },
466
+ {
467
+ "name": "root_element_number",
468
+ "kind": "document",
469
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root\":{\"element\":5}}}}",
470
+ "expect": {
471
+ "reason": "invalid_document",
472
+ "location": "/mappings/xml/root/element",
473
+ "detail": "expected a non-empty string"
474
+ }
475
+ },
476
+ {
477
+ "name": "root_mixed_string",
478
+ "kind": "document",
479
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root\":{\"element\":\"a\",\"mixed\":\"yes\"}}}}",
480
+ "expect": {
481
+ "reason": "unsupported_mapping",
482
+ "location": "/mappings/xml/root/mixed",
483
+ "detail": "root mixed must be true or false"
484
+ }
485
+ },
486
+ {
487
+ "name": "root_mixed_number",
488
+ "kind": "document",
489
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root\":{\"element\":\"a\",\"mixed\":1}}}}",
490
+ "expect": {
491
+ "reason": "unsupported_mapping",
492
+ "location": "/mappings/xml/root/mixed",
493
+ "detail": "root mixed must be true or false"
494
+ }
495
+ },
496
+ {
497
+ "name": "json_root_mixed_string",
498
+ "kind": "document",
499
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"json\":{\"root\":{\"mixed\":\"no\"}}}}",
500
+ "expect": {
501
+ "reason": "unsupported_mapping",
502
+ "location": "/mappings/json/root/mixed",
503
+ "detail": "root mixed must be true or false"
504
+ }
505
+ },
506
+ {
507
+ "name": "mapping_child_mappings_array",
508
+ "kind": "document",
509
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"child_mappings\":[]}}}",
510
+ "expect": {
511
+ "reason": "invalid_document",
512
+ "location": "/mappings/xml/child_mappings",
513
+ "detail": "expected an object"
514
+ }
515
+ },
516
+ {
517
+ "name": "mapping_child_mappings_string",
518
+ "kind": "document",
519
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"child_mappings\":\"x\"}}}",
520
+ "expect": {
521
+ "reason": "invalid_document",
522
+ "location": "/mappings/xml/child_mappings",
523
+ "detail": "expected an object"
524
+ }
525
+ },
526
+ {
527
+ "name": "mapping_child_mappings_ok",
528
+ "kind": "document",
529
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"child_mappings\":{\"a\":\"b\"}}}}",
530
+ "expect": null
531
+ },
532
+ {
533
+ "name": "rule_child_mappings_array",
534
+ "kind": "document",
535
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"child_mappings\":[]}]}}}",
536
+ "expect": {
537
+ "reason": "invalid_document",
538
+ "location": "/mappings/xml/rules/0/child_mappings",
539
+ "detail": "expected an object"
540
+ }
541
+ },
542
+ {
543
+ "name": "rule_child_mappings_null",
544
+ "kind": "document",
545
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"child_mappings\":null}]}}}",
546
+ "expect": {
547
+ "reason": "invalid_document",
548
+ "location": "/mappings/xml/rules/0/child_mappings",
549
+ "detail": "expected an object"
550
+ }
551
+ },
552
+ {
553
+ "name": "rule_child_mappings_ok",
554
+ "kind": "document",
555
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"child_mappings\":{\"a\":\"b\"}}]}}}",
556
+ "expect": null
557
+ },
558
+ {
559
+ "name": "mapping_root_mappings_array",
560
+ "kind": "document",
561
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root_mappings\":[]}}}",
562
+ "expect": {
563
+ "reason": "invalid_document",
564
+ "location": "/mappings/xml/root_mappings",
565
+ "detail": "expected an object"
566
+ }
567
+ },
568
+ {
569
+ "name": "mapping_root_mappings_string",
570
+ "kind": "document",
571
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root_mappings\":\"x\"}}}",
572
+ "expect": {
573
+ "reason": "invalid_document",
574
+ "location": "/mappings/xml/root_mappings",
575
+ "detail": "expected an object"
576
+ }
577
+ },
578
+ {
579
+ "name": "mapping_root_mappings_ok",
580
+ "kind": "document",
581
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"root_mappings\":{\"a\":\"b\"}}}}",
582
+ "expect": null
583
+ },
584
+ {
585
+ "name": "rule_root_mappings_array",
586
+ "kind": "document",
587
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"root_mappings\":[]}]}}}",
588
+ "expect": {
589
+ "reason": "invalid_document",
590
+ "location": "/mappings/xml/rules/0/root_mappings",
591
+ "detail": "expected an object"
592
+ }
593
+ },
594
+ {
595
+ "name": "rule_root_mappings_null",
596
+ "kind": "document",
597
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"root_mappings\":null}]}}}",
598
+ "expect": {
599
+ "reason": "invalid_document",
600
+ "location": "/mappings/xml/rules/0/root_mappings",
601
+ "detail": "expected an object"
602
+ }
603
+ },
604
+ {
605
+ "name": "rule_root_mappings_ok",
606
+ "kind": "document",
607
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"root_mappings\":{\"a\":\"b\"}}]}}}",
608
+ "expect": null
609
+ },
610
+ {
611
+ "name": "rule_cdata_string",
612
+ "kind": "document",
613
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"cdata\":\"true\"}]}}}",
614
+ "expect": {
615
+ "reason": "invalid_document",
616
+ "location": "/mappings/xml/rules/0/cdata",
617
+ "detail": "expected a boolean"
618
+ }
619
+ },
620
+ {
621
+ "name": "rule_cdata_null",
622
+ "kind": "document",
623
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"cdata\":null}]}}}",
624
+ "expect": {
625
+ "reason": "invalid_document",
626
+ "location": "/mappings/xml/rules/0/cdata",
627
+ "detail": "expected a boolean"
628
+ }
629
+ },
630
+ {
631
+ "name": "rule_cdata_ok",
632
+ "kind": "document",
633
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"cdata\":true}]}}}",
634
+ "expect": null
635
+ },
636
+ {
637
+ "name": "prefix_\"1a\"_mapping",
638
+ "kind": "document",
639
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"1a\"}}}}",
640
+ "expect": {
641
+ "reason": "invalid_document",
642
+ "location": "/mappings/xml/namespace/prefix",
643
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
644
+ }
645
+ },
646
+ {
647
+ "name": "prefix_\"1a\"_rule",
648
+ "kind": "document",
649
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"1a\"}}]}}}",
650
+ "expect": {
651
+ "reason": "invalid_document",
652
+ "location": "/mappings/xml/rules/0/namespace/prefix",
653
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
654
+ }
655
+ },
656
+ {
657
+ "name": "prefix_\"\"_mapping",
658
+ "kind": "document",
659
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"\"}}}}",
660
+ "expect": {
661
+ "reason": "invalid_document",
662
+ "location": "/mappings/xml/namespace/prefix",
663
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
664
+ }
665
+ },
666
+ {
667
+ "name": "prefix_\"\"_rule",
668
+ "kind": "document",
669
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"\"}}]}}}",
670
+ "expect": {
671
+ "reason": "invalid_document",
672
+ "location": "/mappings/xml/rules/0/namespace/prefix",
673
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
674
+ }
675
+ },
676
+ {
677
+ "name": "prefix_\"a b\"_mapping",
678
+ "kind": "document",
679
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"a b\"}}}}",
680
+ "expect": {
681
+ "reason": "invalid_document",
682
+ "location": "/mappings/xml/namespace/prefix",
683
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
684
+ }
685
+ },
686
+ {
687
+ "name": "prefix_\"a b\"_rule",
688
+ "kind": "document",
689
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"a b\"}}]}}}",
690
+ "expect": {
691
+ "reason": "invalid_document",
692
+ "location": "/mappings/xml/rules/0/namespace/prefix",
693
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
694
+ }
695
+ },
696
+ {
697
+ "name": "prefix_5_mapping",
698
+ "kind": "document",
699
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":5}}}}",
700
+ "expect": {
701
+ "reason": "invalid_document",
702
+ "location": "/mappings/xml/namespace/prefix",
703
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
704
+ }
705
+ },
706
+ {
707
+ "name": "prefix_5_rule",
708
+ "kind": "document",
709
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":5}}]}}}",
710
+ "expect": {
711
+ "reason": "invalid_document",
712
+ "location": "/mappings/xml/rules/0/namespace/prefix",
713
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
714
+ }
715
+ },
716
+ {
717
+ "name": "prefix_\"a:b\"_mapping",
718
+ "kind": "document",
719
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"a:b\"}}}}",
720
+ "expect": {
721
+ "reason": "invalid_document",
722
+ "location": "/mappings/xml/namespace/prefix",
723
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
724
+ }
725
+ },
726
+ {
727
+ "name": "prefix_\"a:b\"_rule",
728
+ "kind": "document",
729
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"a:b\"}}]}}}",
730
+ "expect": {
731
+ "reason": "invalid_document",
732
+ "location": "/mappings/xml/rules/0/namespace/prefix",
733
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
734
+ }
735
+ },
736
+ {
737
+ "name": "prefix_nil_mapping",
738
+ "kind": "document",
739
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":null}}}}",
740
+ "expect": {
741
+ "reason": "invalid_document",
742
+ "location": "/mappings/xml/namespace/prefix",
743
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
744
+ }
745
+ },
746
+ {
747
+ "name": "prefix_nil_rule",
748
+ "kind": "document",
749
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"rules\":[{\"kind\":\"element\",\"name\":[\"a\"],\"to\":\"x\",\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":null}}]}}}",
750
+ "expect": {
751
+ "reason": "invalid_document",
752
+ "location": "/mappings/xml/rules/0/namespace/prefix",
753
+ "detail": "prefix must match \\A[A-Za-z_][A-Za-z0-9_.-]*\\z"
754
+ }
755
+ },
756
+ {
757
+ "name": "prefix_ok_a",
758
+ "kind": "document",
759
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"a\"}}}}",
760
+ "expect": null
761
+ },
762
+ {
763
+ "name": "prefix_ok__a",
764
+ "kind": "document",
765
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"_a\"}}}}",
766
+ "expect": null
767
+ },
768
+ {
769
+ "name": "prefix_ok_A1",
770
+ "kind": "document",
771
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"A1\"}}}}",
772
+ "expect": null
773
+ },
774
+ {
775
+ "name": "prefix_ok_a.b-c_d",
776
+ "kind": "document",
777
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"a.b-c_d\"}}}}",
778
+ "expect": null
779
+ },
780
+ {
781
+ "name": "prefix_ok_xml",
782
+ "kind": "document",
783
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"}}],\"mappings\":{\"xml\":{\"namespace\":{\"mode\":\"uri\",\"uri\":\"urn:x\",\"prefix\":\"xml\"}}}}",
784
+ "expect": null
785
+ },
786
+ {
787
+ "name": "default_int_on_string",
788
+ "kind": "document",
789
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"},\"default\":{\"present\":true,\"value\":5}}]}",
790
+ "expect": {
791
+ "reason": "non_serializable_default",
792
+ "location": "/attributes/0/default/value",
793
+ "detail": "default 5 is not a string"
794
+ }
795
+ },
796
+ {
797
+ "name": "default_string_on_integer",
798
+ "kind": "document",
799
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"integer\"},\"default\":{\"present\":true,\"value\":\"5\"}}]}",
800
+ "expect": {
801
+ "reason": "non_serializable_default",
802
+ "location": "/attributes/0/default/value",
803
+ "detail": "default \"5\" is not a integer"
804
+ }
805
+ },
806
+ {
807
+ "name": "default_string_on_boolean",
808
+ "kind": "document",
809
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"boolean\"},\"default\":{\"present\":true,\"value\":\"true\"}}]}",
810
+ "expect": {
811
+ "reason": "non_serializable_default",
812
+ "location": "/attributes/0/default/value",
813
+ "detail": "default \"true\" is not a boolean"
814
+ }
815
+ },
816
+ {
817
+ "name": "default_array_on_string",
818
+ "kind": "document",
819
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"},\"default\":{\"present\":true,\"value\":[\"x\"]}}]}",
820
+ "expect": {
821
+ "reason": "non_serializable_default",
822
+ "location": "/attributes/0/default/value",
823
+ "detail": "default [\"x\"] is not a string"
824
+ }
825
+ },
826
+ {
827
+ "name": "default_ok_integer",
828
+ "kind": "document",
829
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"integer\"},\"default\":{\"present\":true,\"value\":5}}]}",
830
+ "expect": null
831
+ },
832
+ {
833
+ "name": "default_ok_boolean",
834
+ "kind": "document",
835
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"boolean\"},\"default\":{\"present\":true,\"value\":false}}]}",
836
+ "expect": null
837
+ },
838
+ {
839
+ "name": "typed_default_ok_string",
840
+ "kind": "document",
841
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"},\"default\":{\"present\":true,\"value\":\"s\"}}]}",
842
+ "expect": null
843
+ },
844
+ {
845
+ "name": "typed_default_refused_string",
846
+ "kind": "document",
847
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"string\"},\"default\":{\"present\":true,\"value\":5}}]}",
848
+ "expect": {
849
+ "reason": "non_serializable_default",
850
+ "location": "/attributes/0/default/value",
851
+ "detail": "default 5 is not a string"
852
+ }
853
+ },
854
+ {
855
+ "name": "typed_default_ok_token",
856
+ "kind": "document",
857
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"token\"},\"default\":{\"present\":true,\"value\":\"t\"}}]}",
858
+ "expect": null
859
+ },
860
+ {
861
+ "name": "typed_default_refused_token",
862
+ "kind": "document",
863
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"token\"},\"default\":{\"present\":true,\"value\":5}}]}",
864
+ "expect": {
865
+ "reason": "non_serializable_default",
866
+ "location": "/attributes/0/default/value",
867
+ "detail": "default 5 is not a token"
868
+ }
869
+ },
870
+ {
871
+ "name": "typed_default_ok_uri",
872
+ "kind": "document",
873
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"uri\"},\"default\":{\"present\":true,\"value\":\"http://x/\"}}]}",
874
+ "expect": null
875
+ },
876
+ {
877
+ "name": "typed_default_refused_uri",
878
+ "kind": "document",
879
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"uri\"},\"default\":{\"present\":true,\"value\":5}}]}",
880
+ "expect": {
881
+ "reason": "non_serializable_default",
882
+ "location": "/attributes/0/default/value",
883
+ "detail": "default 5 is not a uri"
884
+ }
885
+ },
886
+ {
887
+ "name": "typed_default_ok_email",
888
+ "kind": "document",
889
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"email\"},\"default\":{\"present\":true,\"value\":\"a@b.c\"}}]}",
890
+ "expect": null
891
+ },
892
+ {
893
+ "name": "typed_default_refused_email",
894
+ "kind": "document",
895
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"email\"},\"default\":{\"present\":true,\"value\":5}}]}",
896
+ "expect": {
897
+ "reason": "non_serializable_default",
898
+ "location": "/attributes/0/default/value",
899
+ "detail": "default 5 is not a email"
900
+ }
901
+ },
902
+ {
903
+ "name": "typed_default_ok_hostname",
904
+ "kind": "document",
905
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hostname\"},\"default\":{\"present\":true,\"value\":\"h.example\"}}]}",
906
+ "expect": null
907
+ },
908
+ {
909
+ "name": "typed_default_refused_hostname",
910
+ "kind": "document",
911
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hostname\"},\"default\":{\"present\":true,\"value\":5}}]}",
912
+ "expect": {
913
+ "reason": "non_serializable_default",
914
+ "location": "/attributes/0/default/value",
915
+ "detail": "default 5 is not a hostname"
916
+ }
917
+ },
918
+ {
919
+ "name": "typed_default_ok_ip",
920
+ "kind": "document",
921
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"ip\"},\"default\":{\"present\":true,\"value\":\"1.2.3.4\"}}]}",
922
+ "expect": null
923
+ },
924
+ {
925
+ "name": "typed_default_refused_ip",
926
+ "kind": "document",
927
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"ip\"},\"default\":{\"present\":true,\"value\":5}}]}",
928
+ "expect": {
929
+ "reason": "non_serializable_default",
930
+ "location": "/attributes/0/default/value",
931
+ "detail": "default 5 is not a ip"
932
+ }
933
+ },
934
+ {
935
+ "name": "typed_default_ok_boolean",
936
+ "kind": "document",
937
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"boolean\"},\"default\":{\"present\":true,\"value\":true}}]}",
938
+ "expect": null
939
+ },
940
+ {
941
+ "name": "typed_default_refused_boolean",
942
+ "kind": "document",
943
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"boolean\"},\"default\":{\"present\":true,\"value\":\"true\"}}]}",
944
+ "expect": {
945
+ "reason": "non_serializable_default",
946
+ "location": "/attributes/0/default/value",
947
+ "detail": "default \"true\" is not a boolean"
948
+ }
949
+ },
950
+ {
951
+ "name": "typed_default_ok_integer",
952
+ "kind": "document",
953
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"integer\"},\"default\":{\"present\":true,\"value\":5}}]}",
954
+ "expect": null
955
+ },
956
+ {
957
+ "name": "typed_default_refused_integer",
958
+ "kind": "document",
959
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"integer\"},\"default\":{\"present\":true,\"value\":\"5\"}}]}",
960
+ "expect": {
961
+ "reason": "non_serializable_default",
962
+ "location": "/attributes/0/default/value",
963
+ "detail": "default \"5\" is not a integer"
964
+ }
965
+ },
966
+ {
967
+ "name": "typed_default_ok_decimal",
968
+ "kind": "document",
969
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"decimal\"},\"default\":{\"present\":true,\"value\":\"1.5\"}}]}",
970
+ "expect": null
971
+ },
972
+ {
973
+ "name": "typed_default_refused_decimal",
974
+ "kind": "document",
975
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"decimal\"},\"default\":{\"present\":true,\"value\":true}}]}",
976
+ "expect": {
977
+ "reason": "non_serializable_default",
978
+ "location": "/attributes/0/default/value",
979
+ "detail": "default true is not a decimal"
980
+ }
981
+ },
982
+ {
983
+ "name": "typed_default_ok_float",
984
+ "kind": "document",
985
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"float\"},\"default\":{\"present\":true,\"value\":\"1.5\"}}]}",
986
+ "expect": null
987
+ },
988
+ {
989
+ "name": "typed_default_refused_float",
990
+ "kind": "document",
991
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"float\"},\"default\":{\"present\":true,\"value\":1.5}}]}",
992
+ "expect": {
993
+ "reason": "invalid_document",
994
+ "location": "/attributes/0/default/value",
995
+ "detail": "floats are not portable; use an exact string"
996
+ }
997
+ },
998
+ {
999
+ "name": "typed_default_ok_rational",
1000
+ "kind": "document",
1001
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"rational\"},\"default\":{\"present\":true,\"value\":\"1/2\"}}]}",
1002
+ "expect": null
1003
+ },
1004
+ {
1005
+ "name": "typed_default_refused_rational",
1006
+ "kind": "document",
1007
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"rational\"},\"default\":{\"present\":true,\"value\":true}}]}",
1008
+ "expect": {
1009
+ "reason": "non_serializable_default",
1010
+ "location": "/attributes/0/default/value",
1011
+ "detail": "default true is not a rational"
1012
+ }
1013
+ },
1014
+ {
1015
+ "name": "typed_default_ok_date",
1016
+ "kind": "document",
1017
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"date\"},\"default\":{\"present\":true,\"value\":\"2020-01-02\"}}]}",
1018
+ "expect": null
1019
+ },
1020
+ {
1021
+ "name": "typed_default_refused_date",
1022
+ "kind": "document",
1023
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"date\"},\"default\":{\"present\":true,\"value\":20200102}}]}",
1024
+ "expect": {
1025
+ "reason": "non_serializable_default",
1026
+ "location": "/attributes/0/default/value",
1027
+ "detail": "default 20200102 is not a date"
1028
+ }
1029
+ },
1030
+ {
1031
+ "name": "typed_default_ok_time",
1032
+ "kind": "document",
1033
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"time\"},\"default\":{\"present\":true,\"value\":\"2020-01-02T03:04:05Z\"}}]}",
1034
+ "expect": null
1035
+ },
1036
+ {
1037
+ "name": "typed_default_refused_time",
1038
+ "kind": "document",
1039
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"time\"},\"default\":{\"present\":true,\"value\":3}}]}",
1040
+ "expect": {
1041
+ "reason": "non_serializable_default",
1042
+ "location": "/attributes/0/default/value",
1043
+ "detail": "default 3 is not a time"
1044
+ }
1045
+ },
1046
+ {
1047
+ "name": "typed_default_ok_date_time",
1048
+ "kind": "document",
1049
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"date_time\"},\"default\":{\"present\":true,\"value\":\"2020-01-02T03:04:05+00:00\"}}]}",
1050
+ "expect": null
1051
+ },
1052
+ {
1053
+ "name": "typed_default_refused_date_time",
1054
+ "kind": "document",
1055
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"date_time\"},\"default\":{\"present\":true,\"value\":3}}]}",
1056
+ "expect": {
1057
+ "reason": "non_serializable_default",
1058
+ "location": "/attributes/0/default/value",
1059
+ "detail": "default 3 is not a date_time"
1060
+ }
1061
+ },
1062
+ {
1063
+ "name": "typed_default_ok_time_without_date",
1064
+ "kind": "document",
1065
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"time_without_date\"},\"default\":{\"present\":true,\"value\":\"03:04:05\"}}]}",
1066
+ "expect": null
1067
+ },
1068
+ {
1069
+ "name": "typed_default_refused_time_without_date",
1070
+ "kind": "document",
1071
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"time_without_date\"},\"default\":{\"present\":true,\"value\":3}}]}",
1072
+ "expect": {
1073
+ "reason": "non_serializable_default",
1074
+ "location": "/attributes/0/default/value",
1075
+ "detail": "default 3 is not a time_without_date"
1076
+ }
1077
+ },
1078
+ {
1079
+ "name": "typed_default_ok_duration",
1080
+ "kind": "document",
1081
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"duration\"},\"default\":{\"present\":true,\"value\":\"P1D\"}}]}",
1082
+ "expect": null
1083
+ },
1084
+ {
1085
+ "name": "typed_default_refused_duration",
1086
+ "kind": "document",
1087
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"duration\"},\"default\":{\"present\":true,\"value\":1}}]}",
1088
+ "expect": {
1089
+ "reason": "non_serializable_default",
1090
+ "location": "/attributes/0/default/value",
1091
+ "detail": "default 1 is not a duration"
1092
+ }
1093
+ },
1094
+ {
1095
+ "name": "typed_default_ok_qname",
1096
+ "kind": "document",
1097
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"qname\"},\"default\":{\"present\":true,\"value\":\"a:b\"}}]}",
1098
+ "expect": null
1099
+ },
1100
+ {
1101
+ "name": "typed_default_refused_qname",
1102
+ "kind": "document",
1103
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"qname\"},\"default\":{\"present\":true,\"value\":{\"namespace\":\"urn:x\",\"local\":\"a\"}}}]}",
1104
+ "expect": {
1105
+ "reason": "non_serializable_default",
1106
+ "location": "/attributes/0/default/value",
1107
+ "detail": "default {\"namespace\" => \"urn:x\", \"local\" => \"a\"} is not a qname"
1108
+ }
1109
+ },
1110
+ {
1111
+ "name": "typed_default_ok_base64_binary",
1112
+ "kind": "document",
1113
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"base64_binary\"},\"default\":{\"present\":true,\"value\":\"aGk=\"}}]}",
1114
+ "expect": null
1115
+ },
1116
+ {
1117
+ "name": "typed_default_refused_base64_binary",
1118
+ "kind": "document",
1119
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"base64_binary\"},\"default\":{\"present\":true,\"value\":1}}]}",
1120
+ "expect": {
1121
+ "reason": "non_serializable_default",
1122
+ "location": "/attributes/0/default/value",
1123
+ "detail": "default 1 is not a base64_binary"
1124
+ }
1125
+ },
1126
+ {
1127
+ "name": "typed_default_ok_hex_binary",
1128
+ "kind": "document",
1129
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hex_binary\"},\"default\":{\"present\":true,\"value\":\"6869\"}}]}",
1130
+ "expect": null
1131
+ },
1132
+ {
1133
+ "name": "typed_default_refused_hex_binary",
1134
+ "kind": "document",
1135
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hex_binary\"},\"default\":{\"present\":true,\"value\":1}}]}",
1136
+ "expect": {
1137
+ "reason": "non_serializable_default",
1138
+ "location": "/attributes/0/default/value",
1139
+ "detail": "default 1 is not a hex_binary"
1140
+ }
1141
+ },
1142
+ {
1143
+ "name": "typed_default_ok_symbol",
1144
+ "kind": "document",
1145
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"symbol\"},\"default\":{\"present\":true,\"value\":\"sym\"}}]}",
1146
+ "expect": null
1147
+ },
1148
+ {
1149
+ "name": "typed_default_refused_symbol",
1150
+ "kind": "document",
1151
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"symbol\"},\"default\":{\"present\":true,\"value\":1}}]}",
1152
+ "expect": {
1153
+ "reason": "non_serializable_default",
1154
+ "location": "/attributes/0/default/value",
1155
+ "detail": "default 1 is not a symbol"
1156
+ }
1157
+ },
1158
+ {
1159
+ "name": "typed_default_ok_hash",
1160
+ "kind": "document",
1161
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hash\"},\"default\":{\"present\":true,\"value\":{\"a\":1}}}]}",
1162
+ "expect": null
1163
+ },
1164
+ {
1165
+ "name": "typed_default_refused_hash",
1166
+ "kind": "document",
1167
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hash\"},\"default\":{\"present\":true,\"value\":\"x\"}}]}",
1168
+ "expect": {
1169
+ "reason": "non_serializable_default",
1170
+ "location": "/attributes/0/default/value",
1171
+ "detail": "default \"x\" is not a hash"
1172
+ }
1173
+ },
1174
+ {
1175
+ "name": "typed_default_ok_email_address",
1176
+ "kind": "document",
1177
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"email_address\"},\"default\":{\"present\":true,\"value\":\"a@b.c\"}}]}",
1178
+ "expect": null
1179
+ },
1180
+ {
1181
+ "name": "typed_default_refused_email_address",
1182
+ "kind": "document",
1183
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"email_address\"},\"default\":{\"present\":true,\"value\":5}}]}",
1184
+ "expect": {
1185
+ "reason": "non_serializable_default",
1186
+ "location": "/attributes/0/default/value",
1187
+ "detail": "default 5 is not a email_address"
1188
+ }
1189
+ },
1190
+ {
1191
+ "name": "typed_default_ok_ip_v4_address",
1192
+ "kind": "document",
1193
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"ip_v4_address\"},\"default\":{\"present\":true,\"value\":\"1.2.3.4\"}}]}",
1194
+ "expect": null
1195
+ },
1196
+ {
1197
+ "name": "typed_default_refused_ip_v4_address",
1198
+ "kind": "document",
1199
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"ip_v4_address\"},\"default\":{\"present\":true,\"value\":5}}]}",
1200
+ "expect": {
1201
+ "reason": "non_serializable_default",
1202
+ "location": "/attributes/0/default/value",
1203
+ "detail": "default 5 is not a ip_v4_address"
1204
+ }
1205
+ },
1206
+ {
1207
+ "name": "typed_default_ok_ip_v6_address",
1208
+ "kind": "document",
1209
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"ip_v6_address\"},\"default\":{\"present\":true,\"value\":\"::1\"}}]}",
1210
+ "expect": null
1211
+ },
1212
+ {
1213
+ "name": "typed_default_refused_ip_v6_address",
1214
+ "kind": "document",
1215
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"ip_v6_address\"},\"default\":{\"present\":true,\"value\":5}}]}",
1216
+ "expect": {
1217
+ "reason": "non_serializable_default",
1218
+ "location": "/attributes/0/default/value",
1219
+ "detail": "default 5 is not a ip_v6_address"
1220
+ }
1221
+ },
1222
+ {
1223
+ "name": "typed_default_ok_uuid",
1224
+ "kind": "document",
1225
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"uuid\"},\"default\":{\"present\":true,\"value\":\"123e4567-e89b-12d3-a456-426614174000\"}}]}",
1226
+ "expect": null
1227
+ },
1228
+ {
1229
+ "name": "typed_default_refused_uuid",
1230
+ "kind": "document",
1231
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"uuid\"},\"default\":{\"present\":true,\"value\":5}}]}",
1232
+ "expect": {
1233
+ "reason": "non_serializable_default",
1234
+ "location": "/attributes/0/default/value",
1235
+ "detail": "default 5 is not a uuid"
1236
+ }
1237
+ },
1238
+ {
1239
+ "name": "typed_default_ok_reference",
1240
+ "kind": "document",
1241
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"reference\"},\"default\":{\"present\":true,\"value\":\"r1\"}}]}",
1242
+ "expect": null
1243
+ },
1244
+ {
1245
+ "name": "typed_default_refused_reference",
1246
+ "kind": "document",
1247
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"reference\"},\"default\":{\"present\":true,\"value\":5}}]}",
1248
+ "expect": {
1249
+ "reason": "non_serializable_default",
1250
+ "location": "/attributes/0/default/value",
1251
+ "detail": "default 5 is not a reference"
1252
+ }
1253
+ },
1254
+ {
1255
+ "name": "typed_default_ok_uri_reference",
1256
+ "kind": "document",
1257
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"uri_reference\"},\"default\":{\"present\":true,\"value\":\"a/b#c\"}}]}",
1258
+ "expect": null
1259
+ },
1260
+ {
1261
+ "name": "typed_default_refused_uri_reference",
1262
+ "kind": "document",
1263
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"uri_reference\"},\"default\":{\"present\":true,\"value\":5}}]}",
1264
+ "expect": {
1265
+ "reason": "non_serializable_default",
1266
+ "location": "/attributes/0/default/value",
1267
+ "detail": "default 5 is not a uri_reference"
1268
+ }
1269
+ },
1270
+ {
1271
+ "name": "typed_default_ok_date_with_timezone",
1272
+ "kind": "document",
1273
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"date_with_timezone\"},\"default\":{\"present\":true,\"value\":\"2020-01-02+05:00\"}}]}",
1274
+ "expect": null
1275
+ },
1276
+ {
1277
+ "name": "typed_default_refused_date_with_timezone",
1278
+ "kind": "document",
1279
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"date_with_timezone\"},\"default\":{\"present\":true,\"value\":20200102}}]}",
1280
+ "expect": {
1281
+ "reason": "non_serializable_default",
1282
+ "location": "/attributes/0/default/value",
1283
+ "detail": "default 20200102 is not a date_with_timezone"
1284
+ }
1285
+ },
1286
+ {
1287
+ "name": "typed_default_ok_date_time_with_timezone",
1288
+ "kind": "document",
1289
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"date_time_with_timezone\"},\"default\":{\"present\":true,\"value\":\"2020-01-02T03:04:05+05:00\"}}]}",
1290
+ "expect": null
1291
+ },
1292
+ {
1293
+ "name": "typed_default_refused_date_time_with_timezone",
1294
+ "kind": "document",
1295
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"date_time_with_timezone\"},\"default\":{\"present\":true,\"value\":3}}]}",
1296
+ "expect": {
1297
+ "reason": "non_serializable_default",
1298
+ "location": "/attributes/0/default/value",
1299
+ "detail": "default 3 is not a date_time_with_timezone"
1300
+ }
1301
+ },
1302
+ {
1303
+ "name": "typed_default_ok_day_time_duration",
1304
+ "kind": "document",
1305
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"day_time_duration\"},\"default\":{\"present\":true,\"value\":\"P1D\"}}]}",
1306
+ "expect": null
1307
+ },
1308
+ {
1309
+ "name": "typed_default_refused_day_time_duration",
1310
+ "kind": "document",
1311
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"day_time_duration\"},\"default\":{\"present\":true,\"value\":1}}]}",
1312
+ "expect": {
1313
+ "reason": "non_serializable_default",
1314
+ "location": "/attributes/0/default/value",
1315
+ "detail": "default 1 is not a day_time_duration"
1316
+ }
1317
+ },
1318
+ {
1319
+ "name": "typed_default_ok_year_month_duration",
1320
+ "kind": "document",
1321
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"year_month_duration\"},\"default\":{\"present\":true,\"value\":\"P1Y\"}}]}",
1322
+ "expect": null
1323
+ },
1324
+ {
1325
+ "name": "typed_default_refused_year_month_duration",
1326
+ "kind": "document",
1327
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"year_month_duration\"},\"default\":{\"present\":true,\"value\":1}}]}",
1328
+ "expect": {
1329
+ "reason": "non_serializable_default",
1330
+ "location": "/attributes/0/default/value",
1331
+ "detail": "default 1 is not a year_month_duration"
1332
+ }
1333
+ },
1334
+ {
1335
+ "name": "typed_default_ok_positive_integer",
1336
+ "kind": "document",
1337
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"positive_integer\"},\"default\":{\"present\":true,\"value\":5}}]}",
1338
+ "expect": null
1339
+ },
1340
+ {
1341
+ "name": "typed_default_refused_positive_integer",
1342
+ "kind": "document",
1343
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"positive_integer\"},\"default\":{\"present\":true,\"value\":\"5\"}}]}",
1344
+ "expect": {
1345
+ "reason": "non_serializable_default",
1346
+ "location": "/attributes/0/default/value",
1347
+ "detail": "default \"5\" is not a positive_integer"
1348
+ }
1349
+ },
1350
+ {
1351
+ "name": "typed_default_ok_non_negative_integer",
1352
+ "kind": "document",
1353
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"non_negative_integer\"},\"default\":{\"present\":true,\"value\":0}}]}",
1354
+ "expect": null
1355
+ },
1356
+ {
1357
+ "name": "typed_default_refused_non_negative_integer",
1358
+ "kind": "document",
1359
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"non_negative_integer\"},\"default\":{\"present\":true,\"value\":\"0\"}}]}",
1360
+ "expect": {
1361
+ "reason": "non_serializable_default",
1362
+ "location": "/attributes/0/default/value",
1363
+ "detail": "default \"0\" is not a non_negative_integer"
1364
+ }
1365
+ },
1366
+ {
1367
+ "name": "typed_default_ok_g_year",
1368
+ "kind": "document",
1369
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_year\"},\"default\":{\"present\":true,\"value\":\"2020\"}}]}",
1370
+ "expect": null
1371
+ },
1372
+ {
1373
+ "name": "typed_default_refused_g_year",
1374
+ "kind": "document",
1375
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_year\"},\"default\":{\"present\":true,\"value\":5}}]}",
1376
+ "expect": {
1377
+ "reason": "non_serializable_default",
1378
+ "location": "/attributes/0/default/value",
1379
+ "detail": "default 5 is not a g_year"
1380
+ }
1381
+ },
1382
+ {
1383
+ "name": "typed_default_ok_g_year_month",
1384
+ "kind": "document",
1385
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_year_month\"},\"default\":{\"present\":true,\"value\":\"2020-01\"}}]}",
1386
+ "expect": null
1387
+ },
1388
+ {
1389
+ "name": "typed_default_refused_g_year_month",
1390
+ "kind": "document",
1391
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_year_month\"},\"default\":{\"present\":true,\"value\":5}}]}",
1392
+ "expect": {
1393
+ "reason": "non_serializable_default",
1394
+ "location": "/attributes/0/default/value",
1395
+ "detail": "default 5 is not a g_year_month"
1396
+ }
1397
+ },
1398
+ {
1399
+ "name": "typed_default_ok_g_month",
1400
+ "kind": "document",
1401
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_month\"},\"default\":{\"present\":true,\"value\":\"--01\"}}]}",
1402
+ "expect": null
1403
+ },
1404
+ {
1405
+ "name": "typed_default_refused_g_month",
1406
+ "kind": "document",
1407
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_month\"},\"default\":{\"present\":true,\"value\":5}}]}",
1408
+ "expect": {
1409
+ "reason": "non_serializable_default",
1410
+ "location": "/attributes/0/default/value",
1411
+ "detail": "default 5 is not a g_month"
1412
+ }
1413
+ },
1414
+ {
1415
+ "name": "typed_default_ok_g_month_day",
1416
+ "kind": "document",
1417
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_month_day\"},\"default\":{\"present\":true,\"value\":\"--01-02\"}}]}",
1418
+ "expect": null
1419
+ },
1420
+ {
1421
+ "name": "typed_default_refused_g_month_day",
1422
+ "kind": "document",
1423
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_month_day\"},\"default\":{\"present\":true,\"value\":5}}]}",
1424
+ "expect": {
1425
+ "reason": "non_serializable_default",
1426
+ "location": "/attributes/0/default/value",
1427
+ "detail": "default 5 is not a g_month_day"
1428
+ }
1429
+ },
1430
+ {
1431
+ "name": "typed_default_ok_g_day",
1432
+ "kind": "document",
1433
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_day\"},\"default\":{\"present\":true,\"value\":\"---02\"}}]}",
1434
+ "expect": null
1435
+ },
1436
+ {
1437
+ "name": "typed_default_refused_g_day",
1438
+ "kind": "document",
1439
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"g_day\"},\"default\":{\"present\":true,\"value\":5}}]}",
1440
+ "expect": {
1441
+ "reason": "non_serializable_default",
1442
+ "location": "/attributes/0/default/value",
1443
+ "detail": "default 5 is not a g_day"
1444
+ }
1445
+ },
1446
+ {
1447
+ "name": "typed_default_ok_idrefs",
1448
+ "kind": "document",
1449
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"idrefs\"},\"default\":{\"present\":true,\"value\":\"a b\"}}]}",
1450
+ "expect": null
1451
+ },
1452
+ {
1453
+ "name": "typed_default_refused_idrefs",
1454
+ "kind": "document",
1455
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"idrefs\"},\"default\":{\"present\":true,\"value\":5}}]}",
1456
+ "expect": {
1457
+ "reason": "non_serializable_default",
1458
+ "location": "/attributes/0/default/value",
1459
+ "detail": "default 5 is not a idrefs"
1460
+ }
1461
+ },
1462
+ {
1463
+ "name": "typed_default_ok_nmtokens",
1464
+ "kind": "document",
1465
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"nmtokens\"},\"default\":{\"present\":true,\"value\":\"a b\"}}]}",
1466
+ "expect": null
1467
+ },
1468
+ {
1469
+ "name": "typed_default_refused_nmtokens",
1470
+ "kind": "document",
1471
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"nmtokens\"},\"default\":{\"present\":true,\"value\":5}}]}",
1472
+ "expect": {
1473
+ "reason": "non_serializable_default",
1474
+ "location": "/attributes/0/default/value",
1475
+ "detail": "default 5 is not a nmtokens"
1476
+ }
1477
+ },
1478
+ {
1479
+ "name": "typed_default_ok_decimal_not_lexical",
1480
+ "kind": "document",
1481
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"decimal\"},\"default\":{\"present\":true,\"value\":\"abc\"}}]}",
1482
+ "expect": null
1483
+ },
1484
+ {
1485
+ "name": "typed_default_ok_integer_max_safe",
1486
+ "kind": "document",
1487
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"integer\"},\"default\":{\"present\":true,\"value\":9007199254740991}}]}",
1488
+ "expect": null
1489
+ },
1490
+ {
1491
+ "name": "typed_default_ok_integer_min_safe",
1492
+ "kind": "document",
1493
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"integer\"},\"default\":{\"present\":true,\"value\":-9007199254740991}}]}",
1494
+ "expect": null
1495
+ },
1496
+ {
1497
+ "name": "typed_default_refused_integer_2_53",
1498
+ "kind": "document",
1499
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"integer\"},\"default\":{\"present\":true,\"value\":9007199254740992}}]}",
1500
+ "expect": {
1501
+ "reason": "invalid_document",
1502
+ "location": "/attributes/0/default/value",
1503
+ "detail": "structural integer out of bounds"
1504
+ }
1505
+ },
1506
+ {
1507
+ "name": "typed_default_refused_integer_negative_2_53",
1508
+ "kind": "document",
1509
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"integer\"},\"default\":{\"present\":true,\"value\":-9007199254740992}}]}",
1510
+ "expect": {
1511
+ "reason": "invalid_document",
1512
+ "location": "/attributes/0/default/value",
1513
+ "detail": "structural integer out of bounds"
1514
+ }
1515
+ },
1516
+ {
1517
+ "name": "typed_default_refused_float_collection",
1518
+ "kind": "document",
1519
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"float\"},\"collection\":{\"min\":0,\"max\":null},\"default\":{\"present\":true,\"value\":[\"1.5\",\"2.5\"]}}]}",
1520
+ "expect": {
1521
+ "reason": "invalid_document",
1522
+ "location": "/attributes/0/default/value",
1523
+ "detail": "float default must be a canonical float string"
1524
+ }
1525
+ },
1526
+ {
1527
+ "name": "typed_default_refused_float_empty_collection",
1528
+ "kind": "document",
1529
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"float\"},\"collection\":{\"min\":0,\"max\":null},\"default\":{\"present\":true,\"value\":[]}}]}",
1530
+ "expect": {
1531
+ "reason": "invalid_document",
1532
+ "location": "/attributes/0/default/value",
1533
+ "detail": "float default must be a canonical float string"
1534
+ }
1535
+ },
1536
+ {
1537
+ "name": "typed_default_refused_float_null",
1538
+ "kind": "document",
1539
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"float\"},\"default\":{\"present\":true,\"value\":null}}]}",
1540
+ "expect": {
1541
+ "reason": "invalid_document",
1542
+ "location": "/attributes/0/default/value",
1543
+ "detail": "float default must be a canonical float string"
1544
+ }
1545
+ },
1546
+ {
1547
+ "name": "typed_default_refused_hash_with_json_float",
1548
+ "kind": "document",
1549
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hash\"},\"default\":{\"present\":true,\"value\":{\"a\":1.5}}}]}",
1550
+ "expect": {
1551
+ "reason": "invalid_document",
1552
+ "location": "/attributes/0/default/value/a",
1553
+ "detail": "floats are not portable; use an exact string"
1554
+ }
1555
+ },
1556
+ {
1557
+ "name": "doc_depth_99",
1558
+ "kind": "document",
1559
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hash\"},\"default\":{\"present\":true,\"value\":{\"v\":[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"x\"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]}}}]}",
1560
+ "expect": null
1561
+ },
1562
+ {
1563
+ "name": "doc_depth_100",
1564
+ "kind": "document",
1565
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hash\"},\"default\":{\"present\":true,\"value\":{\"v\":[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"x\"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]}}}]}",
1566
+ "expect": null
1567
+ },
1568
+ {
1569
+ "name": "doc_depth_101",
1570
+ "kind": "document",
1571
+ "input": "{\"lml\":2,\"model\":\"A\",\"register\":\"default\",\"attributes\":[{\"name\":\"x\",\"type\":{\"kind\":\"builtin\",\"name\":\"hash\"},\"default\":{\"present\":true,\"value\":{\"v\":[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"x\"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]}}}]}",
1572
+ "expect": {
1573
+ "reason": "invalid_document",
1574
+ "location": "/attributes/0/default/value/v/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0",
1575
+ "detail": "nesting deeper than 100 levels"
1576
+ }
1577
+ },
1578
+ {
1579
+ "name": "bundle_depth_99",
1580
+ "kind": "bundle",
1581
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{},\"value_types\":{},\"capabilities\":[],\"provenance\":{\"p\":[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"x\"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]}}",
1582
+ "expect": null
1583
+ },
1584
+ {
1585
+ "name": "bundle_depth_100",
1586
+ "kind": "bundle",
1587
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{},\"value_types\":{},\"capabilities\":[],\"provenance\":{\"p\":[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"x\"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]}}",
1588
+ "expect": null
1589
+ },
1590
+ {
1591
+ "name": "bundle_depth_101",
1592
+ "kind": "bundle",
1593
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{},\"value_types\":{},\"capabilities\":[],\"provenance\":{\"p\":[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\"x\"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]}}",
1594
+ "expect": {
1595
+ "reason": "invalid_document",
1596
+ "location": null,
1597
+ "detail": "not valid JSON: nesting of 101 is too deep"
1598
+ }
1599
+ },
1600
+ {
1601
+ "name": "dup_top",
1602
+ "kind": "bundle",
1603
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{},\"value_types\":{},\"capabilities\":[],\"roots\":[]}",
1604
+ "expect": {
1605
+ "reason": "invalid_document",
1606
+ "location": null,
1607
+ "detail": "duplicate key \"roots\""
1608
+ }
1609
+ },
1610
+ {
1611
+ "name": "dup_escaped",
1612
+ "kind": "bundle",
1613
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{},\"value_types\":{},\"capabilities\":[],\"roots\":[]}",
1614
+ "expect": {
1615
+ "reason": "invalid_document",
1616
+ "location": null,
1617
+ "detail": "duplicate key \"roots\""
1618
+ }
1619
+ },
1620
+ {
1621
+ "name": "dup_nested",
1622
+ "kind": "bundle",
1623
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{\"A@d\":{\"lml\":2},\"A@d\":{\"lml\":2}},\"value_types\":{},\"capabilities\":[]}",
1624
+ "expect": {
1625
+ "reason": "invalid_document",
1626
+ "location": null,
1627
+ "detail": "duplicate key \"A@d\""
1628
+ }
1629
+ },
1630
+ {
1631
+ "name": "dup_provenance",
1632
+ "kind": "bundle",
1633
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{},\"value_types\":{},\"capabilities\":[],\"provenance\":{\"a\":1,\"a\":2}}",
1634
+ "expect": {
1635
+ "reason": "invalid_document",
1636
+ "location": null,
1637
+ "detail": "duplicate key \"a\""
1638
+ }
1639
+ },
1640
+ {
1641
+ "name": "dup_in_array",
1642
+ "kind": "bundle",
1643
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{},\"value_types\":{},\"capabilities\":[],\"provenance\":{\"l\":[{\"k\":1,\"k\":2}]}}",
1644
+ "expect": {
1645
+ "reason": "invalid_document",
1646
+ "location": null,
1647
+ "detail": "duplicate key \"k\""
1648
+ }
1649
+ },
1650
+ {
1651
+ "name": "dup_none_same_key_different_objects",
1652
+ "kind": "bundle",
1653
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{},\"value_types\":{},\"capabilities\":[],\"provenance\":{\"l\":[{\"k\":1},{\"k\":2}],\"m\":{\"k\":3}}}",
1654
+ "expect": null
1655
+ },
1656
+ {
1657
+ "name": "dup_string_value_not_key",
1658
+ "kind": "bundle",
1659
+ "input": "{\"lml_bundle\":1,\"roots\":[],\"models\":{},\"value_types\":{},\"capabilities\":[],\"provenance\":{\"a\":\"b\",\"c\":\"a\"}}",
1660
+ "expect": null
1661
+ }
1662
+ ]