fix: align event subscription/notification to Commonalities r3.2#84
Merged
benhepworth merged 2 commits intocamaraproject:mainfrom Apr 16, 2026
Conversation
benhepworth
reviewed
Apr 8, 2026
Contributor
benhepworth
left a comment
There was a problem hiding this comment.
Thanks for the PR @mohdfarhanakram - great progress aligning with Commonalities r3.2. Most everything is pretty solid - just a few recommendations that I added in-line. Summary of these recommendations:
- suggest renaming BadRequest400 to CreateSessionBadRequest400 and then creating a new Generic400 for the other calls since the sink specific errors only apply when creating a session (see model QoD uses for reference)
- question about uri for http/mqtt - http is a URI but not technically for mqtt, which is why the original was a string - needs more discussion with the group, will address on the next call.
- made
statusrequired in SessionBase since there should always be a current state of the subscription (equivalent of QoD qosStatus, which is required in it's SessionInfo).
- Align sink and sinkCredential definitions to CAMARA Event Guide - Add SinkCredential, AccessTokenCredential, PlainCredential, RefreshTokenCredential schemas - Add sink URI pattern validation and 400 INVALID_SINK error response - Rename subscription-ends to subscription-ended with terminationReason enum - Add subscription-started and subscription-updated lifecycle events - Rename EventType to SubscriptionEventType - Fix types/subscribedEventTypes property name mismatch in SessionRequest - Add SubscriptionStatus enum to SessionBase - Rename startTime to startsAt per r3.2 convention - Remove sinkCredential from response schemas (security compliance)
777f0d1 to
6119f83
Compare
benhepworth
approved these changes
Apr 16, 2026
Contributor
benhepworth
left a comment
There was a problem hiding this comment.
thanks for applying the changes - looks good now!
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.
What type of PR is this?
correction
What this PR does / why we need it:
Aligns the Session Insights API event subscription and notification model to the CAMARA Commonalities r3.2 Event Subscription and Notification Guide.
sinkdefinition with URI format, HTTPS pattern validation, and examplesinkCredentialwith properSinkCredentialobject schema (withAccessTokenCredential,PlainCredential,RefreshTokenCredentialsubtypes)400 INVALID_SINKerror response (along withINVALID_CREDENTIAL,INVALID_TOKEN,INVALID_ARGUMENT) with examplessubscription-ends→subscription-endedwithterminationReasonenum (NETWORK_TERMINATED,SUBSCRIPTION_EXPIRED,MAX_EVENTS_REACHED,ACCESS_TOKEN_EXPIRED,SUBSCRIPTION_DELETED)subscription-startedlifecycle event withinitiationReasonsubscription-updatedlifecycle event withupdateReasonEventType→SubscriptionEventTypewith descriptiontypes/subscribedEventTypesproperty name mismatch inSessionRequest(required field referenced non-existent property)SubscriptionStatusenum (ACTIVATION_REQUESTED,ACTIVE,INACTIVE,EXPIRED,DELETED)startTime→startsAtper r3.2 conventionsinkCredentialfrom response schemas (must not be returned per security guidelines)Which issue(s) this PR fixes:
Fixes #70
Special notes for reviewers:
SinkCredential,AccessTokenCredential, etc.) follow the exact same pattern used in QualityOnDemandsubscribedEventTypes→typesfix also corrects a bug whereSessionRequest.requiredreferenced a non-existent property nameChangelog input
Additional documentation