Skip to content

모의고사 번호로 시험 문제 조회

yes edited this page Dec 10, 2020 · 4 revisions

모의고사 번호로 시험 문제 조회

메소드 경로 짧은 설명
GET /test/{testNum}/part/{partNum} 모의고사 번호로 시험 문제 조회

요청 헤더

Content-Type: application/json
token: token

응답 바디

조회 성공(파트 3인 경우 // 4인 경우는 지문이 없음)

[
    {
        "idx": 6,
        "testNum": "1",
        "smallQuestionNum": "0",
        "part": "3",
        "img": "a",
        "question": "d",
        "voice": "f"
    },
    {
        "idx": 7,
        "testNum": "1",
        "smallQuestionNum": "1",
        "part": "3",
        "img": "a",
        "question": "s",
        "voice": "f"
    },
    {
        "idx": 8,
        "testNum": "1",
        "smallQuestionNum": "2",
        "part": "3",
        "img": "a",
        "question": "s",
        "voice": "d"
    },
    {
        "idx": 9,
        "testNum": "1",
        "smallQuestionNum": "3",
        "part": "3",
        "img": "q",
        "question": "a",
        "voice": "s"
    }
]
  • Status Code: 200 OK

조회 성공(소문제의 구분이 없는 문제)

[
    {
        "idx": 2,
        "testNum": "1",
        "smallQuestionNum": "-1",
        "part": "2",
        "img": "ed",
        "question": "s",
        "voice": "s"
    }
]
  • Status Code: 200 Ok

  • smallQuestionNum 값
    0: 지문
    1: 소문제 1 (소문제가 하나만 있는 경우, 1로 표시)
    2: 소문제 2
    3: 소문제 3
    -1: 소문제의 구분이 없는 문제인 경우.

  • img 컬럼: image url

  • question 컬럼: 문제 내용

  • voice 컬럼: 음성파일 url


DB에 해당 정보가 없을 때

  • Status Code: 200 Ok

pathvariable 없을 때

  • Status Code: 404 Not Found

토큰 없을 때

  • Status Code: 400 Bad Request

인증 실패

  • Status Code: 401 Unauthorized

INTERNAL SERVER ERROR

  • Status Code: 500 Internal Server Error