| 1 | package edu.ucsb.cs.scaffold.controller; | |
| 2 | ||
| 3 | import edu.ucsb.cs.scaffold.model.QuestionConcept; | |
| 4 | import edu.ucsb.cs.scaffold.repository.QuestionConceptRepository; | |
| 5 | import io.swagger.v3.oas.annotations.Operation; | |
| 6 | import io.swagger.v3.oas.annotations.Parameter; | |
| 7 | import io.swagger.v3.oas.annotations.tags.Tag; | |
| 8 | import java.util.List; | |
| 9 | import java.util.UUID; | |
| 10 | import lombok.RequiredArgsConstructor; | |
| 11 | import org.springframework.web.bind.annotation.GetMapping; | |
| 12 | import org.springframework.web.bind.annotation.PathVariable; | |
| 13 | import org.springframework.web.bind.annotation.RestController; | |
| 14 | ||
| 15 | @Tag(name = "Questions") | |
| 16 | @RestController | |
| 17 | @RequiredArgsConstructor | |
| 18 | public class QuestionController { | |
| 19 | ||
| 20 | private final QuestionConceptRepository questionConceptRepository; | |
| 21 | ||
| 22 | @Operation(summary = "List concepts associated with a question") | |
| 23 | @GetMapping("/api/questions/{questionId}/concepts") | |
| 24 | public List<QuestionConcept> getQuestionConcepts( | |
| 25 | @Parameter(description = "UUID of the question") @PathVariable UUID questionId) { | |
| 26 |
1
1. getQuestionConcepts : replaced return value with Collections.emptyList for edu/ucsb/cs/scaffold/controller/QuestionController::getQuestionConcepts → KILLED |
return questionConceptRepository.findByQuestionId(questionId); |
| 27 | } | |
| 28 | } | |
Mutations | ||
| 26 |
1.1 |