Skip to content

feat: add/use RFC3339 fields in requests#233

Open
figueredo wants to merge 1 commit intomasterfrom
rfc3339-fields
Open

feat: add/use RFC3339 fields in requests#233
figueredo wants to merge 1 commit intomasterfrom
rfc3339-fields

Conversation

@figueredo
Copy link
Contributor

Proposed changes

Timestamp fields that store time as milliseconds since epoch are being replaced by fields that store it as a RFC 3339 string.

This commit:

  • Removes POST /feedbacks timestamp field, replacing it with occurred_at. Removal is possible because this field is not in the public API.
  • Add collected_at to POST /signups' additional_locations. This field should be used instead of the existing timestamp.

Checklist

  • Style check and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@figueredo figueredo self-assigned this Jul 17, 2024
@figueredo figueredo requested review from a team and soareswallace July 17, 2024 17:32
public class PostFeedbackRequestBody {
FeedbackEvent event;
Long timestamp;
Instant occurredAt;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change once PostFeedbackRequestBody is public, but I'm considering it as not because the user isn't supposed to use this class directly. Should change the visiblity of these internal classes to avoid issues?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change it in another PR to be released together with the breaking changes.

Comment on lines +12 to +13
@Deprecated Long timestamp;
Instant collectedAt;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to mark the old field as deprecated and add the new here as this class is used by the user. Given that we are bumping the major due to the removal of GetSignup, should we take the opportunity and remove the old field too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

Copy link
Contributor Author

@figueredo figueredo Jul 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove it later together with the other breaking changes.

@figueredo figueredo force-pushed the rfc3339-fields branch 3 times, most recently from 7b4e6d8 to 43ff19b Compare July 24, 2024 18:05
Timestamp fields that store time as milliseconds since epoch are
being replaced by fields that store it as a RFC 3339 string.

This commit:
- Removes POST /feedbacks `timestamp` field, replacing it with
`occurred_at`. Removal is possible because this field is not in
the public API.
- Add `collected_at` to POST /signups' `additional_locations`. This
field should be used instead of the existing `timestamp`.
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