weapp-json-schema
v0.4.0
Published
JSON schema for weapp
Downloads
36
Maintainers
Readme
weapp-json-schema
JSON schema for weapp.
Usage
You can config in workspace's .vscode/settings.json
to use json schemas or config in every specific files.
1. Config in workspace .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"
}
]
}
2. Use json schema in specific file:
Project schema
Config in your project.config.json
or project.private.config.json
:
{
"$schema": "https://unpkg.com/weapp-json-schema/project.schema.json",
}
App schema
Config in your app.json
:
{
"$schema": "https://unpkg.com/weapp-json-schema/app.schema.json",
}
Page schema
Config in your <page_name>.json
:
{
"$schema": "https://unpkg.com/weapp-json-schema/page.schema.json",
}
Sitemap schema
Config in your sitemap.json
:
{
"$schema": "https://unpkg.com/weapp-json-schema/sitemap.schema.json",
}
Component schema
Config in your <component_name>.json
:
{
"$schema": "https://unpkg.com/weapp-json-schema/component.schema.json",
}
Schemas
- project.schema.json Schema for
project.config.json
- app.schema.json Schema for
app.json
- page.schema.json Schema for
<page_name>.json
- sitemap.schema.json Schema for
sitemap.json
- component.schema.json Schema for
<component_name>.json
Refs
Updated At
2024-05-29