atmosphere explorer pds.ls
tool typescript atproto
423
fork

Configure Feed

Select the types of activity you want to include in your feed.

Union not accepted as type #14

open opened by willem.dobs.nl

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

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:q3enoeuha5b2zx4p4atxtb7x/sh.tangled.repo.issue/3m3fcoatl3p22