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

New revision of dialog available in response header after change #1611

Open
1 of 4 tasks
Tracked by #1138
elsand opened this issue Dec 16, 2024 · 0 comments
Open
1 of 4 tasks
Tracked by #1138

New revision of dialog available in response header after change #1611

elsand opened this issue Dec 16, 2024 · 0 comments

Comments

@elsand
Copy link
Collaborator

elsand commented Dec 16, 2024

Introduction

Whenever a part of the dialog aggregate is changed, causing a new revision to made, the new revision should be made available to callers

Description

In order for a client to keep track of revisions, whenever a POST is performed for a new dialog, a PUT/PATCH is performed on an existing dialog, or a POST is performed to add a transmission or activity, the updated revision id should be made available in a HTTP response header.

Implementation

As this is a custom reponse header, it should be prefixed with x-, such as x-dialog-new-revision-id

Tasks

Preview Give feedback

Threat modelling

Preview Give feedback

Acceptance criteria

Case 1: New Dialog Created

GIVEN a client performs a POST request to create a new dialog,
WHEN the dialog is successfully created,
THEN the response includes an x-dialog-new-revision-id header containing the new revision ID.

Case 2: Existing Dialog Updated

GIVEN a client performs a PUT or PATCH request to update an existing dialog,
WHEN the update is successful and a new revision is created,
THEN the response includes an x-dialog-new-revision-id header containing the updated revision ID.

Case 3: Transmission or Activity Added

GIVEN a client performs a POST request to add a transmission or activity to a dialog,
WHEN the addition is successful and a new revision is created,
THEN the response includes an x-dialog-new-revision-id header containing the new revision ID.

Negative Case: No Revision Created

GIVEN a client performs any of the above requests,
WHEN the operation fails or does not result in a new revision being created,
THEN the response does not include the x-dialog-new-revision-id header.

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

No branches or pull requests

1 participant