Blocked on Flagsmith/flagsmith-engine#219.
DoD
As an API user,
When performing
POST /api/v1/projects/{project_pk}/segments/
PUT /api/v1/projects/{project_pk}/segments/{id}/
PATCH /api/v1/projects/{project_pk}/segments/{id}/
When providing a value under $.rules[].conditions[].property which is an invalid JSONPath within the evaluation context object, it is assumed to be a trait. This can be simplified to any property that doesn't start with $..
As an API user,
When performing
POST /api/v1/projects/{project_pk}/segments/
PUT /api/v1/projects/{project_pk}/segments/{id}/
PATCH /api/v1/projects/{project_pk}/segments/{id}/
I'm able to provide the following values under $.rules[].conditions[].property:
$.identity.identifier
$.identity.traits.{any trait name}
$.environment.name.
Then,
As an API user,
When performing
GET /api/v1/flags/
GET /api/v1/identities/
I can observe the Core API correctly fill the condition values for these properties when presenting the context for the engine, and evaluate flags using the expected segments.
Blocked on Flagsmith/flagsmith-engine#219.
DoD
As an API user,
When performing
POST /api/v1/projects/{project_pk}/segments/PUT /api/v1/projects/{project_pk}/segments/{id}/PATCH /api/v1/projects/{project_pk}/segments/{id}/When providing a value under
$.rules[].conditions[].propertywhich is an invalid JSONPath within the evaluation context object, it is assumed to be a trait. This can be simplified to any property that doesn't start with$..As an API user,
When performing
POST /api/v1/projects/{project_pk}/segments/PUT /api/v1/projects/{project_pk}/segments/{id}/PATCH /api/v1/projects/{project_pk}/segments/{id}/I'm able to provide the following values under
$.rules[].conditions[].property:$.identity.identifier$.identity.traits.{any trait name}$.environment.name.Then,
As an API user,
When performing
GET /api/v1/flags/GET /api/v1/identities/I can observe the Core API correctly fill the condition values for these properties when presenting the context for the engine, and evaluate flags using the expected segments.