The following lexicon is not accepted as valid
{
"lexicon": 1,
"id": "org.example.test",
"defs": {
"main": {
"type": "record",
"key":"tid",
"record": {
"type": "object",
"properties": {
"test":{
"type":"ref",
"ref":"#generic"
}
}
}
},
"generic": {
"type": "union",
"refs": [
"#concrete1",
"#concrete2"
],
"closed":true
},
"concrete1": {
"type": "object",
"required":["p1"],
"properties": {
"p1": {
"type": "string"
}
}
},
"concrete2": {
"type": "object",
"properties": {
"p1": {
"type": "string"
}
}
}
}
}
In the console i get the following message
invalid_literal at .defs.generic.type (expected "record", "query", "procedure", "subscription", "object", "array", "token", "bytes", "cid-link", "blob", "boolean", "integer", "string" or "unknown")
If i validate a record using this with goat it correctly validates