Skip to content
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

feat!: improve TD data model and serialization behavior #89

Merged
merged 4 commits into from
Jan 4, 2024

Conversation

JKRhb
Copy link
Member

@JKRhb JKRhb commented Jan 2, 2024

This PR reworks the serialization and general data models used for Thing Descriptions, and improves the code coverage. Due to the rework, a couple of bugs are fixed, especially regarding JSON Schema validation and URI variables. However, especially regarding the latter, some more work is still needed.

One important piece for simplifying the data models is introducing a new AugmentedForm class where most of the logic from interaction-affordance-specific forms is being moved while the data model classes are labeled as @immutable. This should make the library a bit more reliable and should also slightly improve performance due to the use of const constructors.

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2024

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (61e4a32) 59.61% compared to head (273d57e) 64.10%.

Files Patch % Lines
lib/src/core/consumed_thing.dart 54.83% 14 Missing ⚠️
lib/src/binding_mqtt/mqtt_client.dart 0.00% 2 Missing ⚠️
lib/src/binding_http/http_client.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
+ Coverage   59.61%   64.10%   +4.49%     
==========================================
  Files          70       71       +1     
  Lines        2387     2385       -2     
==========================================
+ Hits         1423     1529     +106     
+ Misses        964      856     -108     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JKRhb JKRhb force-pushed the json_serializable branch 3 times, most recently from 1576280 to c93c7a7 Compare January 4, 2024 02:47
@JKRhb JKRhb force-pushed the json_serializable branch from 8d8e296 to 273d57e Compare January 4, 2024 03:48
@JKRhb JKRhb changed the title feat!: improve TD serialization behavior feat!: improve TD data model and serialization behavior Jan 4, 2024
@JKRhb JKRhb marked this pull request as ready for review January 4, 2024 03:56
@JKRhb JKRhb merged commit 60524b4 into main Jan 4, 2024
4 checks passed
@JKRhb JKRhb deleted the json_serializable branch January 4, 2024 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants