-
Notifications
You must be signed in to change notification settings - Fork 0
fix: quality of life type enhancements #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: quality of life type enhancements #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes deprecated fields and standardizes property names across the API schema to improve type safety and API consistency. The changes focus on simplifying the signal structure by removing unnecessary fields like id, type, and links, while making certain fields required and standardizing unit names.
Key changes:
- Removed
id,type, andlinksfields from signal schemas, replacing withcode,name, andgroupas primary identifiers - Standardized unit names (e.g., "kilometers" → "km", "degrees-celsius" → "celsius", "kilowatt-hours" → "kWh")
- Added explicit
requiredfield constraints across multiple schemas to improve type safety
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| signal-open-api.yml | Updated SignalBase schema to remove deprecated fields, standardized unit enums, added required fields to SignalError, removed enum constraints from connector types |
| schema.yml | Removed server configuration, updated example UUIDs, expanded WebhookVehicleStateEvent with explicit type definitions, renamed recordedAt to oemUpdatedAt, removed ObjectValue schema |
| packages/signals/src/test/types.test.ts | Removed assertions for deprecated id, type, and links fields, added optional chaining for status checks, removed tests for links structure and ID uniqueness |
| packages/signals/src/test/parse.test.ts | Removed assertion checking the id field of parsed signals |
| packages/signals/src/test/integration.test.ts | Added optional chaining for status field access, removed assertion for error description field |
| packages/signals/src/test/fixtures/mock-signals.ts | Updated mock data to remove id, type, and links fields, added name and group fields to all mock signals |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.