You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, the workspace create and update API does not have proper validation for the features field. This can lead to inconsistencies between the API and the workspace create/update form, which enforces that each workspace should have only one use case.
The problem arises when the API allows creating or updating a workspace with multiple use cases or invalid use case values in the features field. This can result in workspaces being created or updated with an invalid state, leading to potential issues or errors when using the workspace functionality.
Describe the solution you'd like
To address this issue, we need to add validation logic to the workspace create and update API endpoints to ensure that the features field adheres to the following rules:
The features field must contain at least one valid use case value.
The features field can only contain one use case value (no multiple use cases allowed).
The use case value(s) in the features field must be from the allowed list of use cases (e.g., use-case-observability, use-case-security-analytics, use-case-analytics, use-case-search, use-case-all).
If the features field does not meet these criteria, the API should return an appropriate error response with a descriptive error message, preventing the creation or update of the workspace.
Is your feature request related to a problem? Please describe.
Currently, the workspace create and update API does not have proper validation for the features field. This can lead to inconsistencies between the API and the workspace create/update form, which enforces that each workspace should have only one use case.
The problem arises when the API allows creating or updating a workspace with multiple use cases or invalid use case values in the features field. This can result in workspaces being created or updated with an invalid state, leading to potential issues or errors when using the workspace functionality.
Describe the solution you'd like
To address this issue, we need to add validation logic to the workspace create and update API endpoints to ensure that the features field adheres to the following rules:
If the features field does not meet these criteria, the API should return an appropriate error response with a descriptive error message, preventing the creation or update of the workspace.
Describe alternatives you've considered
N/A
Additional context
#4944
The text was updated successfully, but these errors were encountered: