Skip to content

Commit

Permalink
📝 docs: 更新 schema
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Apr 10, 2021
1 parent f94ec8b commit 6a160c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/journey-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"scripts": {
"build": "yarn schema && father-build && yarn webpack",
"webpack": "webpack",
"schema": "typescript-json-schema src/types/yml.ts YMLJourneyMapRawData -o ./schema/journey-map.schema.json --id=journey-map-schema --required --ignoreErrors",
"schema": "typescript-json-schema src/types/yml.ts YMLJourneyMapRawData -o ./schema/journey-map.schema.json --required --ignoreErrors",
"test": "jest",
"test:update": "jest -u",
"prepublishOnly": "yarn build",
Expand Down
9 changes: 4 additions & 5 deletions packages/journey-map/schema/journey-map.schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$id": "journey-map-schema",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Config": {
Expand All @@ -25,7 +24,7 @@
"type": "string"
},
"height": {
"$ref": "journey-map-schema#/definitions/Partial<Record<SectionType,number>>",
"$ref": "#/definitions/Partial<Record<SectionType,number>>",
"description": "每个部分的高度"
},
"section": {
Expand Down Expand Up @@ -107,7 +106,7 @@
"actions": {
"description": "该阶段所有用户行为",
"items": {
"$ref": "journey-map-schema#/definitions/UserAction"
"$ref": "#/definitions/UserAction"
},
"type": "array"
},
Expand Down Expand Up @@ -141,13 +140,13 @@
"description": "解析后的 YML 数据",
"properties": {
"config": {
"$ref": "journey-map-schema#/definitions/Config",
"$ref": "#/definitions/Config",
"description": "配置参数"
},
"stages": {
"description": "步骤",
"items": {
"$ref": "journey-map-schema#/definitions/YMLStage"
"$ref": "#/definitions/YMLStage"
},
"type": "array"
},
Expand Down

0 comments on commit 6a160c4

Please sign in to comment.