JSON schema for weapp.
You can config in workspace’s .vscode/settings.json to use json schemas or config in every specific files.
.vscode/settings.json{
"json.schemas": [
{
"fileMatch": ["project.config.json", "project.private.config.json"],
"url": "https://unpkg.com/weapp-json-schema/project.schema.json"
},
{
"fileMatch": ["app.json"],
"url": "https://unpkg.com/weapp-json-schema/app.schema.json"
},
{
"fileMatch": ["**/pages/**/*.json"],
"url": "https://unpkg.com/weapp-json-schema/page.schema.json"
},
{
"fileMatch": ["sitemap.json"],
"url": "https://unpkg.com/weapp-json-schema/sitemap.schema.json"
},
{
"fileMatch": ["**/components/**/*.json"],
"url": "https://unpkg.com/weapp-json-schema/component.schema.json"
}
]
}
Config in your project.config.json or project.private.config.json:
{
"$schema": "https://unpkg.com/weapp-json-schema/project.schema.json"
}
Config in your app.json:
{
"$schema": "https://unpkg.com/weapp-json-schema/app.schema.json"
}
Config in your <page_name>.json:
{
"$schema": "https://unpkg.com/weapp-json-schema/page.schema.json"
}
Config in your sitemap.json:
{
"$schema": "https://unpkg.com/weapp-json-schema/sitemap.schema.json"
}
Config in your <component_name>.json:
{
"$schema": "https://unpkg.com/weapp-json-schema/component.schema.json"
}
project.config.jsonapp.json<page_name>.jsonsitemap.json<component_name>.json2025-03-04