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: add change_message attribute to field content #9

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

njausteve
Copy link
Owner

Title

Upgrade typedstruct dependency and add JSON encoding for FieldContent struct

Type of Change

  • New feature
  • Refactoring

Description

This pull request includes the following updates:

  • Migrated from the unmaintained typed_struct to the maintained typedstruct package to ensure future support and compatibility.
  • Added JSON encoding functionality to the FieldContent struct in the ExPass.Structs.FieldContent module. The new encoder converts FieldContent struct data into camelCase keys and filters out nil values. This is critical for ensuring consistent interaction with external systems via APIs.
  • Introduced a new attribute change_message in the FieldContent struct, which allows descriptive messages when field values change.

Testing

  • Updated test cases for FieldContent to include validation of the change_message field.
  • Added tests for the new JSON encoding functionality, including key formatting (camelCase) and exclusion of nil values.

Impact

  • Dependencies: Migrating to typedstruct may introduce minor changes in struct behavior, but no breaking changes are expected.
  • External APIs that consume FieldContent JSON data should now receive properly formatted camelCase keys, ensuring compatibility with standardized systems.
  • Developers must now ensure that change_message follows the format requirements (%@ placeholder).

Additional Information

N/A

@njausteve njausteve merged commit 2396476 into main Sep 16, 2024
5 checks passed
@njausteve njausteve deleted the switch-to-typedstruct branch September 16, 2024 13:34
@njausteve
Copy link
Owner Author

closed: #146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant