Skip to content

Move endorsement related endpoints (GET and POST) under endorsement controller #210

@Shyam-Vishwakarma

Description

@Shyam-Vishwakarma

Issue Description

Two endorsement-related endpoints (GET and POST) are currently defined under the skills controller, which should be in endorsement controller. These routes should be moved under /v1/endorsements to maintain clear and consistent resource boundaries.

Current Behavior

  • The API exposes two endorsement-related endpoints under the skills resource:

    • GET /v1/skills/{id}/endorsements
    • POST /v1/skills/{id}/endorsements
  • This design implies that endorsements are strictly tied to the skills resource. But a separate route PATCH /v1/endorsements/{id} already exists under the endorsements resource. This causes inconsistency in routing structure.

Expected Behavior

  • All endorsement-related actions should be grouped under /v1/endorsements.
  • Specifically, GET /v1/skills/{id}/endorsements and POST /v1/skills/{id}/endorsements.

Steps to Reproduce

  1. Look at the current route definitions in the skill controller.
  2. Notice endorsement-related logic defined under the skills controller.
  3. Compare this with PATCH /v1/endorsements/{id}, which is defined under the endorsement controller.
Screenshots

Severity/Priority

  • Critical
  • High
  • Medium
  • Low

Checklist

  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions