-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Problem
Gateway defines a DistanceUnit as one of:
- MILLIMETERS
- CENTIMETERS
- METERS
- KILOMETERS
- INCHES
- FEET
- YARDS
- MILES
- NAUTICAL_MILESbut osdk-ts allows lowercase and plural equivalents through a mapping here:
osdk-ts/packages/api/src/aggregate/WhereClause.ts
Lines 55 to 76 in d815339
| export const DistanceUnitMapping: { | |
| centimeter: "CENTIMETERS"; | |
| centimeters: "CENTIMETERS"; | |
| cm: "CENTIMETERS"; | |
| meter: "METERS"; | |
| meters: "METERS"; | |
| m: "METERS"; | |
| kilometer: "KILOMETERS"; | |
| kilometers: "KILOMETERS"; | |
| km: "KILOMETERS"; | |
| inch: "INCHES"; | |
| inches: "INCHES"; | |
| foot: "FEET"; | |
| feet: "FEET"; | |
| yard: "YARDS"; | |
| yards: "YARDS"; | |
| mile: "MILES"; | |
| miles: "MILES"; | |
| nautical_mile: "NAUTICAL_MILES"; | |
| nauticalMile: "NAUTICAL_MILES"; | |
| "nautical miles": "NAUTICAL_MILES"; | |
| } = { |
Desired state
osdk-ts should restrict units to the options in the spec and not offer a mapping to keep the SDKs consistent
Metadata
Metadata
Assignees
Labels
No labels