iiitl / iiitl/Stoxs

[bug]: Duplicate Endpoint Mapping

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug easy java spring spring-boot
Dominant language
TypeScript
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### 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`:
```java
@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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating OperationController and StockController and reviewing every endpoint under their current /api/stocks mappings. Determine their distinct responsibilities, choose non-conflicting base paths, and exercise all affected endpoints to confirm they remain reachable and return the expected responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.