Luke
Luke
CCConvex Community
Created by Luke on 12/15/2024 in #support-community
convex.json schema?
After doing some research, it would appear that (at the moment) this doesn't exist. Given that, I went ahead and made a "community" one by scouring the Convex GitHub org and looking for all usage of convex.json. I tried to strictly type it and link out to docs to the best of my ability, although it may not be perfect. You can find the GitHub gist here, and if anyone has any alterations please let me know! You should be able to use it like this:
{
"$schema": "https://gist.githubusercontent.com/dir/945673224a85d0185f78f6f46a563320/raw/convex.schema.json",

"node": {
"externalPackages": ["*"]
}
}
{
"$schema": "https://gist.githubusercontent.com/dir/945673224a85d0185f78f6f46a563320/raw/convex.schema.json",

"node": {
"externalPackages": ["*"]
}
}
Alternatively, if you use VSCode, a cleaner solution is to set the schema in your settings.json, like so:
{
"json.schemaDownload.enable": true,
"json.schemas": [
{
"fileMatch": ["**/convex.json"],
"url": "https://gist.githubusercontent.com/dir/945673224a85d0185f78f6f46a563320/raw/convex.schema.json"
}
]
}
{
"json.schemaDownload.enable": true,
"json.schemas": [
{
"fileMatch": ["**/convex.json"],
"url": "https://gist.githubusercontent.com/dir/945673224a85d0185f78f6f46a563320/raw/convex.schema.json"
}
]
}
This solution makes it so that you don't need to do the "$schema": "...long gist url here in every convex.json file, VSCode will automatically map the schema.
6 replies