fix: quality of life type enhancements#6
Open
rsimari wants to merge 6 commits into
Open
Conversation
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.