Skip to content

Commit b03ffbc

Browse files
committed
chore : update readme for swagger
1 parent 8df60d0 commit b03ffbc

File tree

2 files changed

+37
-17
lines changed

2 files changed

+37
-17
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,30 @@ The API base path is `/api/v1`. When run locally, it will be available at:
3636
```
3737
http://localhost:8080/api/v1
3838
```
39+
**Live:**
40+
```
41+
https://4.213.1.116.nip.io/api/v1/
42+
```
3943

4044
## Run with Maven 🔧
4145

4246
```bash
4347
./mvnw spring-boot:run
4448
```
4549

50+
## API Documentation 📚
51+
52+
Interactive API documentation is available via Swagger UI:
53+
54+
**Local:**
55+
```
56+
http://localhost:8080/swagger-ui.html
57+
```
58+
59+
**Live:**
60+
```
61+
https://4.213.1.116.nip.io/swagger-ui/swagger-ui/index.html
62+
```
4663
## Endpoints 🚀
4764

4865
All endpoints are relative to the base path `/api/v1`.

src/main/java/com/rajat_singh/leetcode_api/scheduler/LeetCodeSyncScheduler.java

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,26 @@
3333
@ConditionalOnProperty(name = "scheduler.enabled", havingValue = "true", matchIfMissing = false)
3434
public class LeetCodeSyncScheduler {
3535

36-
@Autowired
37-
private LeetCodeClient leetCodeApiClient;
38-
39-
@Autowired
40-
private QuestionsRepository questionRepository;
41-
42-
@Autowired
43-
private QuestionMapper questionMapper;
44-
45-
@Autowired
46-
private ContestMapper contestMapper;
47-
48-
@Autowired
49-
private DBUtilities dbUtilities;
50-
51-
@Autowired
52-
private GlobalLeetCodeContestsRepository globalLeetCodeContestsRepository;
36+
private final LeetCodeClient leetCodeApiClient;
37+
private final QuestionsRepository questionRepository;
38+
private final QuestionMapper questionMapper;
39+
private final ContestMapper contestMapper;
40+
private final DBUtilities dbUtilities;
41+
private final GlobalLeetCodeContestsRepository globalLeetCodeContestsRepository;
42+
43+
public LeetCodeSyncScheduler(LeetCodeClient leetCodeApiClient,
44+
QuestionsRepository questionRepository,
45+
QuestionMapper questionMapper,
46+
ContestMapper contestMapper,
47+
DBUtilities dbUtilities,
48+
GlobalLeetCodeContestsRepository globalLeetCodeContestsRepository) {
49+
this.leetCodeApiClient = leetCodeApiClient;
50+
this.questionRepository = questionRepository;
51+
this.questionMapper = questionMapper;
52+
this.contestMapper = contestMapper;
53+
this.dbUtilities = dbUtilities;
54+
this.globalLeetCodeContestsRepository = globalLeetCodeContestsRepository;
55+
}
5356

5457
// Runs every week for full data sync
5558
@Async

0 commit comments

Comments
 (0)