diff --git a/schemas/jsonschema/index.ts b/schemas/jsonschema/index.ts index a34bfb4..168c45c 100644 --- a/schemas/jsonschema/index.ts +++ b/schemas/jsonschema/index.ts @@ -1,6 +1,6 @@ // Generated by https://github.com/foxglove/schemas -export const ArrowPrimitive: unknown = { +export const ArrowPrimitive = { "title": "foxglove.ArrowPrimitive", "description": "A primitive representing an arrow", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -97,7 +97,7 @@ export const ArrowPrimitive: unknown = { } }; -export const CameraCalibration: unknown = { +export const CameraCalibration = { "title": "foxglove.CameraCalibration", "description": "Camera calibration parameters", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -174,7 +174,7 @@ export const CameraCalibration: unknown = { } }; -export const CircleAnnotation: unknown = { +export const CircleAnnotation = { "title": "foxglove.CircleAnnotation", "description": "A circle annotation on a 2D image", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -268,7 +268,7 @@ export const CircleAnnotation: unknown = { } }; -export const Color: unknown = { +export const Color = { "title": "foxglove.Color", "description": "A color in RGBA format", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -293,7 +293,7 @@ export const Color: unknown = { } }; -export const CompressedImage: unknown = { +export const CompressedImage = { "title": "foxglove.CompressedImage", "description": "A compressed image", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -331,7 +331,7 @@ export const CompressedImage: unknown = { } }; -export const CylinderPrimitive: unknown = { +export const CylinderPrimitive = { "title": "foxglove.CylinderPrimitive", "description": "A primitive representing a cylinder, elliptic cylinder, or truncated cone", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -439,7 +439,7 @@ export const CylinderPrimitive: unknown = { } }; -export const CubePrimitive: unknown = { +export const CubePrimitive = { "title": "foxglove.CubePrimitive", "description": "A primitive representing a cube or rectangular prism", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -539,7 +539,7 @@ export const CubePrimitive: unknown = { } }; -export const FrameTransform: unknown = { +export const FrameTransform = { "title": "foxglove.FrameTransform", "description": "A transform between two reference frames in 3D space", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -614,7 +614,7 @@ export const FrameTransform: unknown = { } }; -export const GeoJSON: unknown = { +export const GeoJSON = { "title": "foxglove.GeoJSON", "description": "GeoJSON data for annotating maps", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -627,7 +627,7 @@ export const GeoJSON: unknown = { } }; -export const Grid: unknown = { +export const Grid = { "title": "foxglove.Grid", "description": "A 2D grid of data", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -802,7 +802,7 @@ export const Grid: unknown = { } }; -export const ImageAnnotations: unknown = { +export const ImageAnnotations = { "title": "foxglove.ImageAnnotations", "description": "Array of annotations for a 2D image", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -1056,7 +1056,7 @@ export const ImageAnnotations: unknown = { } }; -export const KeyValuePair: unknown = { +export const KeyValuePair = { "title": "foxglove.KeyValuePair", "description": "A key with its associated value", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -1073,7 +1073,7 @@ export const KeyValuePair: unknown = { } }; -export const LaserScan: unknown = { +export const LaserScan = { "title": "foxglove.LaserScan", "description": "A single scan from a planar laser range-finder", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -1173,7 +1173,7 @@ export const LaserScan: unknown = { } }; -export const LinePrimitive: unknown = { +export const LinePrimitive = { "title": "foxglove.LinePrimitive", "description": "A primitive representing a series of points connected by lines", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -1341,7 +1341,7 @@ export const LinePrimitive: unknown = { } }; -export const LocationFix: unknown = { +export const LocationFix = { "title": "foxglove.LocationFix", "description": "A navigation satellite fix for any Global Navigation Satellite System", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -1393,7 +1393,7 @@ export const LocationFix: unknown = { } }; -export const Log: unknown = { +export const Log = { "title": "foxglove.Log", "description": "A log message", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -1465,7 +1465,7 @@ export const Log: unknown = { } }; -export const SceneEntityDeletion: unknown = { +export const SceneEntityDeletion = { "title": "foxglove.SceneEntityDeletion", "description": "Command to remove previously published entities", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -1510,7 +1510,7 @@ export const SceneEntityDeletion: unknown = { } }; -export const SceneEntity: unknown = { +export const SceneEntity = { "title": "foxglove.SceneEntity", "description": "A visual element in a 3D scene. An entity may be composed of multiple primitives which all share the same frame of reference.", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -2523,7 +2523,7 @@ export const SceneEntity: unknown = { } }; -export const SceneUpdate: unknown = { +export const SceneUpdate = { "title": "foxglove.SceneUpdate", "description": "An update to the entities displayed in a 3D scene", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -3594,7 +3594,7 @@ export const SceneUpdate: unknown = { } }; -export const ModelPrimitive: unknown = { +export const ModelPrimitive = { "title": "foxglove.ModelPrimitive", "description": "A primitive representing a 3D model file loaded from an external URL or embedded data", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -3711,7 +3711,7 @@ export const ModelPrimitive: unknown = { } }; -export const PackedElementField: unknown = { +export const PackedElementField = { "title": "foxglove.PackedElementField", "description": "A field present within each element in a byte array of packed elements.", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -3771,7 +3771,7 @@ export const PackedElementField: unknown = { } }; -export const Point2: unknown = { +export const Point2 = { "title": "foxglove.Point2", "description": "A point representing a position in 2D space", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -3788,7 +3788,7 @@ export const Point2: unknown = { } }; -export const Point3: unknown = { +export const Point3 = { "title": "foxglove.Point3", "description": "A point representing a position in 3D space", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -3809,7 +3809,7 @@ export const Point3: unknown = { } }; -export const PointCloud: unknown = { +export const PointCloud = { "title": "foxglove.PointCloud", "description": "A collection of N-dimensional points, which may contain additional fields with information like normals, intensity, etc.", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -3959,7 +3959,7 @@ export const PointCloud: unknown = { } }; -export const PointsAnnotation: unknown = { +export const PointsAnnotation = { "title": "foxglove.PointsAnnotation", "description": "An array of points on a 2D image", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4106,7 +4106,7 @@ export const PointsAnnotation: unknown = { } }; -export const Pose: unknown = { +export const Pose = { "title": "foxglove.Pose", "description": "A position and orientation for an object or reference frame in 3D space", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4157,7 +4157,7 @@ export const Pose: unknown = { } }; -export const PoseInFrame: unknown = { +export const PoseInFrame = { "title": "foxglove.PoseInFrame", "description": "A timestamped pose for an object or reference frame in 3D space", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4235,7 +4235,7 @@ export const PoseInFrame: unknown = { } }; -export const PosesInFrame: unknown = { +export const PosesInFrame = { "title": "foxglove.PosesInFrame", "description": "An array of timestamped poses for an object or reference frame in 3D space", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4317,7 +4317,7 @@ export const PosesInFrame: unknown = { } }; -export const Quaternion: unknown = { +export const Quaternion = { "title": "foxglove.Quaternion", "description": "A [quaternion](https://eater.net/quaternions) representing a rotation in 3D space", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4342,7 +4342,7 @@ export const Quaternion: unknown = { } }; -export const RawImage: unknown = { +export const RawImage = { "title": "foxglove.RawImage", "description": "A raw image", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4395,7 +4395,7 @@ export const RawImage: unknown = { } }; -export const SpherePrimitive: unknown = { +export const SpherePrimitive = { "title": "foxglove.SpherePrimitive", "description": "A primitive representing a sphere or ellipsoid", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4495,7 +4495,7 @@ export const SpherePrimitive: unknown = { } }; -export const TextPrimitive: unknown = { +export const TextPrimitive = { "title": "foxglove.TextPrimitive", "description": "A primitive representing a text label", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4592,7 +4592,7 @@ export const TextPrimitive: unknown = { } }; -export const TriangleListPrimitive: unknown = { +export const TriangleListPrimitive = { "title": "foxglove.TriangleListPrimitive", "description": "A primitive representing a set of triangles or a surface tiled by triangles", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4731,7 +4731,7 @@ export const TriangleListPrimitive: unknown = { } }; -export const Vector2: unknown = { +export const Vector2 = { "title": "foxglove.Vector2", "description": "A vector in 2D space that represents a direction only", "$comment": "Generated by https://github.com/foxglove/schemas", @@ -4748,7 +4748,7 @@ export const Vector2: unknown = { } }; -export const Vector3: unknown = { +export const Vector3 = { "title": "foxglove.Vector3", "description": "A vector in 3D space that represents a direction only", "$comment": "Generated by https://github.com/foxglove/schemas", diff --git a/scripts/updateGeneratedFiles.ts b/scripts/updateGeneratedFiles.ts index cb7c54b..3e1d9f7 100644 --- a/scripts/updateGeneratedFiles.ts +++ b/scripts/updateGeneratedFiles.ts @@ -28,7 +28,7 @@ async function main({ outDir, rosOutDir }: { outDir: string; rosOutDir: string } for (const schema of Object.values(foxgloveMessageSchemas)) { const json = JSON.stringify(generateJsonSchema(schema), undefined, 2); await fs.writeFile(path.join(outDir, "jsonschema", `${schema.name}.json`), json + "\n"); - indexTS += `export const ${schema.name}: unknown = ${json};\n\n`; + indexTS += `export const ${schema.name} = ${json};\n\n`; } await fs.writeFile(path.join(outDir, "jsonschema", `index.ts`), indexTS); });