Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union type for items not supported #98

Closed
shirecoding opened this issue Apr 7, 2023 · 2 comments
Closed

Union type for items not supported #98

shirecoding opened this issue Apr 7, 2023 · 2 comments

Comments

@shirecoding
Copy link

{
                "type": "array",
                "items": {
                    "type": ["number", "string", "boolean", "object", "array", "null"]
                }
            }

This throws list is not hashable

@bhch
Copy link
Owner

bhch commented Apr 7, 2023

Currently, we don't support type to be an array as it makes it really hard to reliably generate the form UI.

Anyway, you can use the anyOf keyword to achieve this:

{
 "type": "array",
 "items" : {
   "anyOf": [
     {"type": "string"},
     {"type": "integer"},
     {"type": "boolean"}
    ]
 }
}

@bhch
Copy link
Owner

bhch commented Apr 17, 2023

I believe I've answered your question. I'm going to close this issue for now. If you, however, still think it's not resolved, feel free to reopen.

@bhch bhch closed this as completed Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants