-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Problem description
The current CAMARA API Design Guide does not explicitly define or standardize handling for limited success response cases (informative 2xx responses). These responses represent successful operations with partial fulfillment due to factors such as user preferences or temporary subject unavailability.
As a result, CAMARA APIs currently adopt inconsistent patterns when reporting scenarios like privacy control limitations or subject context restrictions. This inconsistency complicates both client implementation and interoperability across APIs that need to express partial but valid outcomes.
Possible evolution
Enhance the CAMARA API Design Guide to define and standardize a Success-Limited Payload model that can be reused across all APIs. The enhancement would:
- Introduce a unified schema to represent limited success outcomes under
CAMARA_common.yaml. - Define an explicit discriminator type for limited success cases:
SUBJECT_CONTEXT— indicates a limitation based on contextual or operational factors (e.g., device unreachable, not processable etc.).
- Provide guidance on client handling logic for each type (e.g., retry on SUBJECT_CONTEXT).
- Document example 200 responses for these cases.
This addition would ensure all APIs follow a consistent and auditable structure when returning success-limited responses.
Alternative solution
Each API could define its own approach to represent limited success conditions within its schema definitions. However, this would lead to divergence across subprojects and reduced interoperability. Additionally, such ad-hoc implementations would make automated client generation and validation more complex.
By introducing a standardized model and adding a normative section (proposed as 2.3 Limited Success Responses) in the Design Guide, CAMARA can provide a unified pattern that is simple to extend and maintain.
Additional context
This issue proposes an enhancement to the CAMARA API Design Guide and the associated CAMARA_common.yaml artifact to include standardized limited success response handling.
Example limited success cases:
- SUBJECT_CONTEXT →
notReachable,notProcessable
The goal is to support context-based partial outcomes under a single reusable schema, ensuring consistent interpretation by SDKs and API consumers.
cc @gmuratk