Skip to content

Commit b660e8f

Browse files
authored
fix: remove in json schema of generate_district_map (#173)
1 parent 5da2a60 commit b660e8f

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

__tests__/charts/district-map.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,22 @@
7272
"type": "object",
7373
"properties": {
7474
"name": {
75-
"$ref": "#/properties/data/properties/name"
75+
"description": "Keywords for the Chinese name of an administrative region (must be within China), and must be one of China, province, city, district, or county. The name should be more specific and add attributive descriptions, for example, \"西安市\" is better than \"西安\", \"杭州西湖区\" is better than \"西湖区\". It cannot be a specific place name or a vague name, such as \"其它\".",
76+
"type": "string"
7677
},
7778
"dataValue": {
7879
"type": "string",
7980
"description": "Data value, numeric string or enumeration string."
8081
},
8182
"style": {
82-
"$ref": "#/properties/data/properties/style"
83+
"description": "Style settings.",
84+
"properties": {
85+
"fillColor": {
86+
"description": "Fill color, rgb or rgba format.",
87+
"type": "string"
88+
}
89+
},
90+
"type": "object"
8391
}
8492
},
8593
"required": ["name"]

src/utils/schema.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ import { zodToJsonSchema as zodToJsonSchemaOriginal } from "zod-to-json-schema";
66
export const zodToJsonSchema = (schema: Record<string, z.ZodType<any>>) => {
77
return zodToJsonSchemaOriginal(z.object(schema), {
88
rejectedAdditionalProperties: undefined,
9+
$refStrategy: "none",
910
});
1011
};

0 commit comments

Comments
 (0)