Skip to content

[bug]: Duplicate Endpoint Mapping #2

@0PrashantYadav0

Description

@0PrashantYadav0

Bug Description:

  • Detailed Description:
    Both OperationController and StockController use the base mapping /api/stocks, which can lead to conflicts or unexpected behavior in routing. This ambiguity might result in some endpoints not being reached as intended.
  • How to Solve:
    1. Decide on Clear Responsibilities:
      Review the endpoints provided by each controller. If they serve different purposes (e.g., one for CRUD operations and another for external API calls), consider separating their base paths.
    2. Update Mappings:
      For example, you could change StockController to use /api/stock-details or /api/stocks/info:
      @RestController
      @RequestMapping("/api/stocks/info")
      public class StockController { ... }
    3. Test Endpoints:
      Verify that all endpoints are accessible and return the expected responses after the change.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions