Link APIs have very limited validations in place, primarily targeted to the surface area of SlashGo extension. However, we need to add more validations around these APIs to handle invalid API payloads. Some examples include:
- payload with shortLink of size 0 i.e "" should return an error
- payload with type dynamic should contain
<var> in the fullUrl field
- payload field type can only be
static or dynamic today.
- Other validations for Edit/Delete Link API
Some of these are identified by TODO in the controller. Ideally, would be nice if this could be done alongside #2 to ensure we write tests for the new validations as well.
Link APIs have very limited validations in place, primarily targeted to the surface area of SlashGo extension. However, we need to add more validations around these APIs to handle invalid API payloads. Some examples include:
<var>in the fullUrl fieldstaticordynamictoday.Some of these are identified by
TODOin the controller. Ideally, would be nice if this could be done alongside #2 to ensure we write tests for the new validations as well.