Skip to content

Commit 477ea77

Browse files
Merge pull request #35 from tomtom-international/fix/dynamic-map-schema
fixed dynamic map schema
2 parents e63ef08 + bf0c29b commit 477ea77

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/schemas/map/dynamicMapSchema.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,9 @@ const markerSchema = z.object({
5858
),
5959
});
6060

61-
// Route point schema (flexible coordinate format)
62-
const routePointSchema = z.union([
63-
coordinateSchema,
64-
z.array(z.number()).length(2).describe("Coordinate as [lat, lon] array"),
65-
z.object({
66-
coordinates: z.array(z.number()).length(2).describe("Coordinates as {coordinates: [lat, lon]}"),
67-
}),
68-
]);
69-
7061
// Route schema
7162
const routeSchema = z.object({
72-
points: z.array(routePointSchema).describe("Array of route points in various coordinate formats"),
63+
points: z.array(coordinateSchema).describe("Array of route points in various coordinate formats"),
7364
name: z.string().optional().describe("Optional route name"),
7465
color: z.string().optional().describe("Route color in hex format (e.g., '#0066cc')"),
7566
});

0 commit comments

Comments
 (0)