Skip to content
์ฐฌ๊ธฐ edited this page Jan 4, 2021 · 6 revisions

๐Ÿ“–API Specification

baseURI: localhost:3000

์„œ๋ฒ„ API

์„œ๋ฒ„ ์ฃผ์†Œ : :3000/ ~

  • ํšŒ์›๊ฐ€์ž…[POST] โšก

    [POST] /user/signup


    Request-Body (application/json)

    Response-body (application/json)

    SUCCESS

    {
        "status": 200,
        "success": true,
        "message": "ํšŒ์› ๊ฐ€์ž… ์„ฑ๊ณต.",
        "data": {
            "id": 2,
            "email": "[email protected]",
            "userName": "tester"
        }
    }

    FAIL 1 : ์ด๋ฏธ ๋“ฑ๋ก๋œ ID์ผ ๊ฒฝ์šฐ

    {
        "status": 400,
        "success": false,
        "message": "์กด์žฌํ•˜๋Š” ID ์ž…๋‹ˆ๋‹ค."
    }

    FAIL 2 : ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ด ๋ฏธ์ž…๋ ฅ ์ƒํƒœ์ผ ๊ฒฝ์šฐ

    {
        "status": 400,
        "success": false,
        "message": "ํ•„์š”ํ•œ ๊ฐ’์ด ์—†์Šต๋‹ˆ๋‹ค."
    }

    FAIL 3 : ์„œ๋ฒ„ ์—๋Ÿฌ

    {
        "status": 500,
        "success": false,
        "message": "ํšŒ์› ๊ฐ€์ž… ์‹คํŒจ."
    }
  • ๋กœ๊ทธ์ธ[POST] โšก

    [POST] /user/signin


    Request-Body (application/json)

    Response-body (application/json)

    SUCCESS

    {
        "status": 200,
        "success": true,
        "message": "๋กœ๊ทธ์ธ ์„ฑ๊ณต.",
        "data": {
            "id": 2,
            "email": "[email protected]",
            "userName": "tester",
            "accessToken": "~~~"
        }
    }

    FAIL 1 : ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ด ๋ฏธ์ž…๋ ฅ ์ƒํƒœ์ผ ๊ฒฝ์šฐ

    {
        "status": 400,
        "success": false,
        "message": "ํ•„์š”ํ•œ ๊ฐ’์ด ์—†์Šต๋‹ˆ๋‹ค."
    }

    FAIL 2 : ์กด์žฌํ•˜์ง€ ์•Š๋Š” email

    {
        "status": 400,
        "success": false,
        "message": "์กด์žฌํ•˜์ง€์•Š๋Š” ์œ ์ € id ์ž…๋‹ˆ๋‹ค."
    }

    FAIL 3 : ๋น„๋ฐ€๋ฒˆํ˜ธ ๋ถˆ์ผ์น˜

    {
        "status": 400,
        "success": false,
        "message": "๋น„๋ฐ€๋ฒˆํ˜ธ๊ฐ€ ์ผ์น˜ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค"
    }

    FAIL 4 : ์„œ๋ฒ„ ์—๋Ÿฌ

    {
        "status": 500,
        "success": false,
        "message": "๋กœ๊ทธ์ธ ์‹คํŒจ."
    }
  • ํ† ํฐ์ธ์ฆ[Header] โšก

    ๋กœ๊ทธ์ธ์‹œ ํ† ํฐ๊ฐ’ ํ—ค๋”๋กœ ์ „์†ก

    FAIL 1 : ์œ ํšจํ•˜์ง€ ์•Š์€ ํ† ํฐ

    {
        "status": 401,
        "success": false,
        "message": "์œ ํšจํ•˜์ง€ ์•Š์€ ํ† ํฐ๊ฐ’์ž…๋‹ˆ๋‹ค."
    }

    FAIL 2 : ํ† ํฐ ๋งŒ๋ฃŒ

    {
        "status": 401,
        "success": false,
        "message": "ํ† ํฐ ๊ฐ’์ด ๋งŒ๋ฃŒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค."
    }
  • Request-Header Routes


    Request-header (application/json)

    • QuestionCard ์ž‘์„ฑ[POST] โšก

      ํšŒ๊ณ  ์งˆ๋ฌธ ์นด๋“œ ์ž‘์„ฑ ํ›„ ์ €์žฅ

      [POST] /card/create


      Request-Body (application/json)

      Response-body (application/json)

      SUCCESS

      {
          "status": 200,
          "success": true,
          "message": "์นด๋“œ ์ƒ์„ฑ ์„ฑ๊ณต",
          "data": {
              "id": 14,
              "number": 4,
              "question": "๊ฐ€์žฅ ํž˜๋“ค์—ˆ๋˜ ๋ฌธ์ œ ์ƒํ™ฉ์€ ๋ฌด์—‡์ด์—ˆ๋‚˜์š”? ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ค ์ƒํ™ฉ์ด์—ˆ๋‚˜์š”?",
              "ActivityId": 6,
              "content": "๋‹ต๋ณ€ 4์ž…๋‹ˆ๋‹ค."
          }
      }

      FAIL 1 : ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ด ๋ฏธ์ž…๋ ฅ ์ƒํƒœ์ผ ๊ฒฝ์šฐ

      {
          "status": 400,
          "success": false,
          "message": "ํ•„์š”ํ•œ ๊ฐ’์ด ์—†์Šต๋‹ˆ๋‹ค."
      }

      FAIL 2 : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "์นด๋“œ ์ƒ์„ฑ ์‹คํŒจ"
      }
    • QuestionCard ์ˆ˜์ •[PUT] โšก

      ํšŒ๊ณ  ์งˆ๋ฌธ ์นด๋“œ ์ˆ˜์ •

      [PUT] /card/update


      Request-Body (application/json)

      Response-body (application/json)

      SUCCESS

      {
          "status": 200,
          "success": true,
          "message": "์นด๋“œ ์ˆ˜์ • ์„ฑ๊ณต",
          "data": "์งˆ๋ฌธ ์นด๋“œ ์ˆ˜์ • ์™„๋ฃŒ"
      }

      FAIL 1 : ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ด ๋ฏธ์ž…๋ ฅ ์ƒํƒœ์ผ ๊ฒฝ์šฐ

      {
          "status": 400,
          "success": false,
          "message": "ํ•„์š”ํ•œ ๊ฐ’์ด ์—†์Šต๋‹ˆ๋‹ค."
      }

      FAIL 2 : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "์นด๋“œ ์ˆ˜์ • ์‹คํŒจ"
      }
    • QuestionCard ์กฐํšŒ[GET] โšก

      ์ž‘์„ฑํ•œ ํšŒ๊ณ  ์งˆ๋ฌธ ์นด๋“œ ์กฐํšŒ (๊ธฐ๋ณธ ์งˆ๋ฌธ 10๊ฐœ+ ์œ ์ €๊ฐ€ ์ž‘์„ฑํ•œ ํšŒ๊ณ  ์งˆ๋ฌธ ์นด๋“œ๋“ค)

      [GET] /card/:ActivityId


      Request-Parameter (application/json)

      Response-body (application/json)

      SUCCESS

      {
          "status": 200,
          "success": true,
          "message": "์นด๋“œ ์กฐํšŒ ์„ฑ๊ณต",
          "data": {
              "questions": [
                  {
                      "number": 1,
                      "content": "ํ™œ๋™์„ ํ•˜๊ฒŒ ๋œ ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?",
                      "guide": "ํ™œ๋™์„ ์‹œ์ž‘ํ•˜๊ฒŒ ๋œ ๊ณ„๊ธฐ์™€ ์ƒํ™ฉ์— ๋Œ€ํ•ด ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”."
                  },
                  {
                      "number": 2,
                      "content": "ํ™œ๋™์„ ์‹œ์ž‘ํ•  ๋‹น์‹œ์˜ ๋ชฉํ‘œ๋Š” ๋ฌด์—‡์ด์—ˆ๋‚˜์š”?",
                      "guide": "๊ฐœ์ธ์ ์ธ ๋ชฉํ‘œ์™€ ํŒ€์˜ ๋ชฉํ‘œ๋ฅผ ๋‚˜๋ˆ ์„œ ์ƒ๊ฐํ•ด๋ณด๋ฉด ์ข‹์•„์š”."
                  },
                  {
                      "number": 3,
                      "content": "ํ™œ๋™์„ ํ•˜๋ฉฐ, ๋‹น์‹ ์ด ๋งก์€ ์ฃผ์š” ์—ญํ• ๊ณผ ๊ทธ์— ๋”ฐ๋ฅธ ๊ณผ์ œ๋Š” ๋ฌด์—‡์ด์—ˆ๋‚˜์š”?",
                      "guide": "ํ•ด๋‹น ์—ญํ•  ๋ฐ ๊ณผ์ œ๋ฅผ ๋งก๊ฒŒ ๋œ ๋ฐฐ๊ฒฝ์„ ํ•จ๊ป˜ ์ƒ๊ฐํ•ด๋ณด์•„์š”."
                  },
                  {
                      "number": 4,
                      "content": "๊ฐ€์žฅ ํž˜๋“ค์—ˆ๋˜ ๋ฌธ์ œ ์ƒํ™ฉ์€ ๋ฌด์—‡์ด์—ˆ๋‚˜์š”? ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ค ์ƒํ™ฉ์ด์—ˆ๋‚˜์š”?",
                      "guide": "์˜ˆ์ƒ์น˜ ๋ชปํ–ˆ๋˜ ์œ„๊ธฐ ์ƒํ™ฉ, ํŒ€์›๊ณผ์˜ ๊ฐˆ๋“ฑ ๋“ฑ ๋‹ค์–‘ํ•˜๊ฒŒ ์ƒ๊ฐํ•ด๋ณด๋ฉด ์ข‹์•„์š”."
                  },
                  {
                      "number": 5,
                      "content": "ํ™œ๋™์„ ํ•ด๊ฒฐํ–ˆ๋˜ ๊ณผ์ •์„ ์ˆœ์„œ๋Œ€๋กœ ๋– ์˜ฌ๋ ค ๋ณผ๊นŒ์š”?",
                      "guide": "์–ด๋–ค ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ–ˆ๋Š”์ง€ ๊ตฌ์ฒด์ ์œผ๋กœ ๋– ์˜ฌ๋ ค๋ณด์„ธ์š”."
                  },
                  {
                      "number": 6,
                      "content": "๋ณด๋‹ค ํšจ๊ณผ์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ์–ด๋–ค ๋…ธ๋ ฅ์„ ํ–ˆ๋‚˜์š”?",
                      "guide": "์กฐ์–ธ์„ ๊ตฌํ•œ ์‚ฌ๋žŒ ํ˜น์€ ์ฐธ๊ณ ํ•œ ์ž๋ฃŒ๋ฅผ ๋– ์˜ฌ๋ ค๋ณด์„ธ์š”."
                  },
                  {
                      "number": 7,
                      "content": "ํ•ด๋‹น ๋ฐฉ๋ฒ•์„ ์„ ํƒํ•œ ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?",
                      "guide": "๋‹ค๋ฅธ ๋Œ€์•ˆ์— ๋น„ํ•ด ๊ฐ€์žฅ ํšจ๊ณผ์ ์ด๋ผ๊ณ  ์ƒ๊ฐํ–ˆ๋˜ ์ด์œ ๋ฅผ ์ƒ๊ฐํ•ด๋ณด์„ธ์š”."
                  },
                  {
                      "number": 8,
                      "content": "์ด ํ™œ๋™์—์„œ ๊ฐ€์žฅ ํฌ๊ฒŒ ์„ฑ์ทจํ•œ ๊ฒƒ์€ ๋ฌด์—‡์ธ๊ฐ€์š”?",
                      "guide": "๊ฐœ์ธ์ ์ธ ์„ฑ์žฅ๊ณผ ๋Œ€์™ธ์ ์ธ ์„ฑ๊ณผ๋ฅผ ๋‚˜๋ˆ ์„œ ์ƒ๊ฐํ•ด๋ณด๋ฉด ์ข‹์•„์š”."
                  },
                  {
                      "number": 9,
                      "content": "๋ฐ˜๋ฉด, ๊ฐ€์žฅ ์•„์‰ฌ์šด ๊ฒƒ์€ ๋ฌด์—‡์ธ๊ฐ€์š”?",
                      "guide": "์–ด๋–ค ๋ถ€๋ถ„์„ ๊ฐœ์„ ํ•˜๋ฉด ๋” ์ข‹์€ ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜์™”์„์ง€ ์ƒ๊ฐํ•ด๋ณด์„ธ์š”."
                  },
                  {
                      "number": 10,
                      "content": "ํ™œ๋™์„ ํ†ตํ•ด ๋ฐฐ์šด ์ ์€ ๋ฌด์—‡์ธ๊ฐ€์š”? ๋‚˜์˜ ๊ด€์‹ฌ ๋ถ„์•ผยท์ง๋ฌด์—์„œ ์–ด๋–ป๊ฒŒ ๋„์›€์ด ๋ ๊นŒ์š”?",
                      "guide": "๊ด€๋ จ ์ง๋ฌด์™€ ํ•ต์‹ฌ ์—ญ๋Ÿ‰ ํ•ด์‹œํƒœ๊ทธ๋ฅผ ๋– ์˜ฌ๋ ค ๋ณด์„ธ์š”."
                  }
              ],
              "questionCards": [
                  {
                      "number": 1,
                      "question": "ํ™œ๋™์„ ํ•˜๊ฒŒ ๋œ ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?",
                      "content": "Answer 1"
                  },
                  {
                      "number": 2,
                      "question": "ํ™œ๋™์„ ์‹œ์ž‘ํ•  ๋‹น์‹œ์˜ ๋ชฉํ‘œ๋Š” ๋ฌด์—‡์ด์—ˆ๋‚˜์š”?",
                      "content": "Answer 2"
                  },
                  {
                      "number": 3,
                      "question": "ํ™œ๋™์„ ํ•˜๋ฉฐ, ๋‹น์‹ ์ด ๋งก์€ ์ฃผ์š” ์—ญํ• ๊ณผ ๊ทธ์— ๋”ฐ๋ฅธ ๊ณผ์ œ๋Š” ๋ฌด์—‡์ด์—ˆ๋‚˜์š”?",
                      "content": "Answer 3"
                  },
                  {
                      "number": 4,
                      "question": "๊ฐ€์žฅ ํž˜๋“ค์—ˆ๋˜ ๋ฌธ์ œ ์ƒํ™ฉ์€ ๋ฌด์—‡์ด์—ˆ๋‚˜์š”? ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ค ์ƒํ™ฉ์ด์—ˆ๋‚˜์š”?",
                      "content": "4๋ฒˆ ๋‹ต๋ณ€ ์ˆ˜์ •ํ• ๊ฒŒ์š”!"
                  }
              ]
          }
      }

      FAIL 1 : ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ด ๋ฏธ์ž…๋ ฅ ์ƒํƒœ์ผ ๊ฒฝ์šฐ โ†’ (์ด ๊ฒฝ์šฐ ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ์—†์œผ๋ฉด ํ•ด๋‹น ๋ผ์šฐํŒ…์ด ์—†๊ธฐ ๋•Œ๋ฌธ)

      404 ์—๋ŸฌํŽ˜์ด์ง€

      FAIL 2 : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "์นด๋“œ ์กฐํšŒ ์‹คํŒจ"
      }
    • Question ์กฐํšŒ[GET] โšก

      ํšŒ๊ณ  ์งˆ๋ฌธ ์นด๋“œ์— ์ œ๊ณต๋˜๋Š” ๊ธฐ๋ณธ 10๊ฐœ์˜ ์งˆ๋ฌธ ์กฐํšŒ

      [GET] /question


      Request-Body(application/json)

      Response-body (application/json)

      SUCCESS

      {
          "status": 200,
          "success": true,
          "message": "์งˆ๋ฌธ ๊ฐ€์ ธ์˜ค๊ธฐ ์„ฑ๊ณต",
          "data": [
              {
                  "number": 1,
                  "content": "ํ™œ๋™์„ ํ•˜๊ฒŒ ๋œ ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?",
                  "guide": "ํ™œ๋™์„ ์‹œ์ž‘ํ•˜๊ฒŒ ๋œ ๊ณ„๊ธฐ์™€ ์ƒํ™ฉ์— ๋Œ€ํ•ด ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”."
              },
              {
                  "number": 2,
                  "content": "ํ™œ๋™์„ ์‹œ์ž‘ํ•  ๋‹น์‹œ์˜ ๋ชฉํ‘œ๋Š” ๋ฌด์—‡์ด์—ˆ๋‚˜์š”?",
                  "guide": "๊ฐœ์ธ์ ์ธ ๋ชฉํ‘œ์™€ ํŒ€์˜ ๋ชฉํ‘œ๋ฅผ ๋‚˜๋ˆ ์„œ ์ƒ๊ฐํ•ด๋ณด๋ฉด ์ข‹์•„์š”."
              },
              {
                  "number": 3,
                  "content": "ํ™œ๋™์„ ํ•˜๋ฉฐ, ๋‹น์‹ ์ด ๋งก์€ ์ฃผ์š” ์—ญํ• ๊ณผ ๊ทธ์— ๋”ฐ๋ฅธ ๊ณผ์ œ๋Š” ๋ฌด์—‡์ด์—ˆ๋‚˜์š”?",
                  "guide": "ํ•ด๋‹น ์—ญํ•  ๋ฐ ๊ณผ์ œ๋ฅผ ๋งก๊ฒŒ ๋œ ๋ฐฐ๊ฒฝ์„ ํ•จ๊ป˜ ์ƒ๊ฐํ•ด๋ณด์•„์š”."
              },
              {
                  "number": 4,
                  "content": "๊ฐ€์žฅ ํž˜๋“ค์—ˆ๋˜ ๋ฌธ์ œ ์ƒํ™ฉ์€ ๋ฌด์—‡์ด์—ˆ๋‚˜์š”? ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ค ์ƒํ™ฉ์ด์—ˆ๋‚˜์š”?",
                  "guide": "์˜ˆ์ƒ์น˜ ๋ชปํ–ˆ๋˜ ์œ„๊ธฐ ์ƒํ™ฉ, ํŒ€์›๊ณผ์˜ ๊ฐˆ๋“ฑ ๋“ฑ ๋‹ค์–‘ํ•˜๊ฒŒ ์ƒ๊ฐํ•ด๋ณด๋ฉด ์ข‹์•„์š”."
              },
              {
                  "number": 5,
                  "content": "ํ™œ๋™์„ ํ•ด๊ฒฐํ–ˆ๋˜ ๊ณผ์ •์„ ์ˆœ์„œ๋Œ€๋กœ ๋– ์˜ฌ๋ ค ๋ณผ๊นŒ์š”?",
                  "guide": "์–ด๋–ค ๋ฐฉ๋ฒ•์„ ์‚ฌ์šฉํ–ˆ๋Š”์ง€ ๊ตฌ์ฒด์ ์œผ๋กœ ๋– ์˜ฌ๋ ค๋ณด์„ธ์š”."
              },
              {
                  "number": 6,
                  "content": "๋ณด๋‹ค ํšจ๊ณผ์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ์–ด๋–ค ๋…ธ๋ ฅ์„ ํ–ˆ๋‚˜์š”?",
                  "guide": "์กฐ์–ธ์„ ๊ตฌํ•œ ์‚ฌ๋žŒ ํ˜น์€ ์ฐธ๊ณ ํ•œ ์ž๋ฃŒ๋ฅผ ๋– ์˜ฌ๋ ค๋ณด์„ธ์š”."
              },
              {
                  "number": 7,
                  "content": "ํ•ด๋‹น ๋ฐฉ๋ฒ•์„ ์„ ํƒํ•œ ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?",
                  "guide": "๋‹ค๋ฅธ ๋Œ€์•ˆ์— ๋น„ํ•ด ๊ฐ€์žฅ ํšจ๊ณผ์ ์ด๋ผ๊ณ  ์ƒ๊ฐํ–ˆ๋˜ ์ด์œ ๋ฅผ ์ƒ๊ฐํ•ด๋ณด์„ธ์š”."
              },
              {
                  "number": 8,
                  "content": "์ด ํ™œ๋™์—์„œ ๊ฐ€์žฅ ํฌ๊ฒŒ ์„ฑ์ทจํ•œ ๊ฒƒ์€ ๋ฌด์—‡์ธ๊ฐ€์š”?",
                  "guide": "๊ฐœ์ธ์ ์ธ ์„ฑ์žฅ๊ณผ ๋Œ€์™ธ์ ์ธ ์„ฑ๊ณผ๋ฅผ ๋‚˜๋ˆ ์„œ ์ƒ๊ฐํ•ด๋ณด๋ฉด ์ข‹์•„์š”."
              },
              {
                  "number": 9,
                  "content": "๋ฐ˜๋ฉด, ๊ฐ€์žฅ ์•„์‰ฌ์šด ๊ฒƒ์€ ๋ฌด์—‡์ธ๊ฐ€์š”?",
                  "guide": "์–ด๋–ค ๋ถ€๋ถ„์„ ๊ฐœ์„ ํ•˜๋ฉด ๋” ์ข‹์€ ๊ฒฐ๊ณผ๊ฐ€ ๋‚˜์™”์„์ง€ ์ƒ๊ฐํ•ด๋ณด์„ธ์š”."
              },
              {
                  "number": 10,
                  "content": "ํ™œ๋™์„ ํ†ตํ•ด ๋ฐฐ์šด ์ ์€ ๋ฌด์—‡์ธ๊ฐ€์š”? ๋‚˜์˜ ๊ด€์‹ฌ ๋ถ„์•ผยท์ง๋ฌด์—์„œ ์–ด๋–ป๊ฒŒ ๋„์›€์ด ๋ ๊นŒ์š”?",
                  "guide": "๊ด€๋ จ ์ง๋ฌด์™€ ํ•ต์‹ฌ ์—ญ๋Ÿ‰ ํ•ด์‹œํƒœ๊ทธ๋ฅผ ๋– ์˜ฌ๋ ค ๋ณด์„ธ์š”."
              }
          ]
      }

      FAIL : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "์งˆ๋ฌธ ๊ฐ€์ ธ์˜ค๊ธฐ ์‹คํŒจ"
      }
    • ์„ ํƒํ•œ ํ™œ๋™ ์กฐํšŒ[GET] โšก

      ์‚ฌ์šฉ์ž๊ฐ€ ์„ ํƒํ•œ ํ™œ๋™ ์กฐํšŒ + ํ™œ๋™ ์ž‘์„ฑ ์ƒํƒœ(ํšŒ๊ณ  ์งˆ๋ฌธ ์นด๋“œ ์ง„ํ–‰๋„)์— ๋”ฐ๋ผ QuestionCard ์กฐํšŒ

      [GET] /activity/getOneActivity/:ActivityId


      Request-Parameter(application/json)

      Response-body (application/json)

      isFinished?

      letย isFinished;
      /*
      
      0:ย ์ž‘์„ฑํ•œย ํ™œ๋™์นด๋“œย X
      
      1:ย ์ž‘์„ฑํ•œย ํ™œ๋™์นด๋“œ๊ฐ€ย ์žˆ์œผ๋‚˜ย 10๋ฒˆ๊นŒ์ง€ย ์™„์„ฑX
      
      2:ย 10๋ฒˆ๊นŒ์ง€ย ๋ชจ๋“ ย ํ™œ๋™์นด๋“œย ์ž‘์„ฑO
      
      */

      SUCCESS 1 (isFinished = 0)

      {
          "status": 200,
          "success": true,
          "message": "์„ ํƒํ•œ ํ™œ๋™ ๊ฐ€์ ธ์˜ค๊ธฐ ์„ฑ๊ณต",
          "data": {
              "selectedActivity": {
                  "id": 2,
                  "title": "hacking",
                  "startDate": "20210101",
                  "endDate": "20210302",
                  "group": "๊ณผ๊ธฐ๋Œ€",
                  "summary": "",
                  "imageUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609569981565.png",
                  "fileName": "",
                  "fileUrl": "",
                  "star": false,
                  "UserId": 1
              },
              "jobTag": [
                  {
                      "id": 5,
                      "content": "๊ฐœ๋ฐœ์ž",
                      "isJob": true,
                      "ActivityId": 2
                  },
                  {
                      "id": 6,
                      "content": "์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž",
                      "isJob": true,
                      "ActivityId": 2
                  }
              ],
              "skillTag": [
                  {
                      "content": "Spring",
                      "isJob": false
                  },
                  {
                      "content": "Node.js",
                      "isJob": false
                  },
                  {
                      "content": "์„ฑ์ ",
                      "isJob": false
                  }
              ],
              "isFinished": 0
          }
      }

      SUCCESS 2 (isFinished = 1)

      {
          "status": 200,
          "success": true,
          "message": "์„ ํƒํ•œ ํ™œ๋™ ๊ฐ€์ ธ์˜ค๊ธฐ ์„ฑ๊ณต",
          "data": {
              "selectedActivity": {
                  "id": 6,
                  "title": "์ž˜๋˜๋ผ",
                  "startDate": "20201231",
                  "endDate": "20211231",
                  "group": "์ƒˆํ•ด",
                  "summary": "ํ™”์ดํŒ…!",
                  "imageUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609591991198.jpg",
                  "fileName": "CheckHomeImg.png",
                  "fileUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609591991257.png",
                  "star": false,
                  "UserId": 1
              },
              "jobTag": [
                  {
                      "id": 60,
                      "content": "๊ฐœ๋ฐœ์ž",
                      "isJob": true,
                      "ActivityId": 6
                  },
                  {
                      "id": 61,
                      "content": "๋ˆ ๋งŽ์€ ์‚ฌ๋žŒ",
                      "isJob": true,
                      "ActivityId": 6
                  }
              ],
              "skillTag": [
                  {
                      "content": "Spring",
                      "isJob": false
                  },
                  {
                      "content": "Docker",
                      "isJob": false
                  },
                  {
                      "content": "AWS",
                      "isJob": false
                  }
              ],
              "isFinished": 1
          }
      }

      SUCCESS 3 (isFinished = 2)

      {
          "status": 200,
          "success": true,
          "message": "์„ ํƒํ•œ ํ™œ๋™ ๊ฐ€์ ธ์˜ค๊ธฐ ์„ฑ๊ณต",
          "data": {
              "selectedActivity": {
                  "id": 1,
                  "title": "์ž˜๋˜๋ผ",
                  "startDate": "20201231",
                  "endDate": "20211231",
                  "group": "์ƒˆํ•ด",
                  "summary": "ํ™”์ดํŒ…!",
                  "imageUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609592171400.jpg",
                  "fileName": "CheckHomeImg.png",
                  "fileUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609592171468.png",
                  "star": false,
                  "UserId": 1
              },
              "jobTag": [
                  {
                      "id": 75,
                      "content": "๊ฐœ๋ฐœ์ž",
                      "isJob": true,
                      "ActivityId": 1
                  },
                  {
                      "id": 76,
                      "content": "๋ˆ ๋งŽ์€ ์‚ฌ๋žŒ",
                      "isJob": true,
                      "ActivityId": 1
                  }
              ],
              "skillTag": [
                  {
                      "content": "Spring",
                      "isJob": false
                  },
                  {
                      "content": "Docker",
                      "isJob": false
                  },
                  {
                      "content": "AWS",
                      "isJob": false
                  }
              ],
              "isFinished": 2,
              "questionCards": [
                  {
                      "number": 1,
                      "question": "ํ™œ๋™์„ ํ•˜๊ฒŒ ๋œ ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?",
                      "content": "Answer 1"
                  },
                  {
                      "number": 2,
                      "question": "ํ™œ๋™์„ ์‹œ์ž‘ํ•  ๋‹น์‹œ์˜ ๋ชฉํ‘œ๋Š” ๋ฌด์—‡์ด์—ˆ๋‚˜์š”?",
                      "content": "Answer 2"
                  },
                  {
                      "number": 3,
                      "question": "ํ™œ๋™์„ ํ•˜๋ฉฐ, ๋‹น์‹ ์ด ๋งก์€ ์ฃผ์š” ์—ญํ• ๊ณผ ๊ทธ์— ๋”ฐ๋ฅธ ๊ณผ์ œ๋Š” ๋ฌด์—‡์ด์—ˆ๋‚˜์š”?",
                      "content": "Answer 3"
                  },
                  {
                      "number": 4,
                      "question": "๊ฐ€์žฅ ํž˜๋“ค์—ˆ๋˜ ๋ฌธ์ œ ์ƒํ™ฉ์€ ๋ฌด์—‡์ด์—ˆ๋‚˜์š”? ๊ตฌ์ฒด์ ์œผ๋กœ ์–ด๋–ค ์ƒํ™ฉ์ด์—ˆ๋‚˜์š”?",
                      "content": "Answer 4์ด์ง€๋กฑ"
                  },
                  {
                      "number": 5,
                      "question": "ํ™œ๋™์„ ํ•ด๊ฒฐํ–ˆ๋˜ ๊ณผ์ •์„ ์ˆœ์„œ๋Œ€๋กœ ๋– ์˜ฌ๋ ค ๋ณผ๊นŒ์š”?",
                      "content": "Answer 5"
                  },
                  {
                      "number": 6,
                      "question": "๋ณด๋‹ค ํšจ๊ณผ์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ์–ด๋–ค ๋…ธ๋ ฅ์„ ํ–ˆ๋‚˜์š”?",
                      "content": "Answer 6"
                  },
                  {
                      "number": 7,
                      "question": "ํ•ด๋‹น ๋ฐฉ๋ฒ•์„ ์„ ํƒํ•œ ์ด์œ ๋Š” ๋ฌด์—‡์ธ๊ฐ€์š”?",
                      "content": "Answer 7"
                  },
                  {
                      "number": 8,
                      "question": "์ด ํ™œ๋™์—์„œ ๊ฐ€์žฅ ํฌ๊ฒŒ ์„ฑ์ทจํ•œ ๊ฒƒ์€ ๋ฌด์—‡์ธ๊ฐ€์š”?",
                      "content": "Answer 8"
                  },
                  {
                      "number": 9,
                      "question": "๋ฐ˜๋ฉด, ๊ฐ€์žฅ ์•„์‰ฌ์šด ๊ฒƒ์€ ๋ฌด์—‡์ธ๊ฐ€์š”?",
                      "content": "Answer 9"
                  },
                  {
                      "number": 10,
                      "question": "ํ™œ๋™์„ ํ†ตํ•ด ๋ฐฐ์šด ์ ์€ ๋ฌด์—‡์ธ๊ฐ€์š”? ๋‚˜์˜ ๊ด€์‹ฌ ๋ถ„์•ผยท์ง๋ฌด์—์„œ ์–ด๋–ป๊ฒŒ ๋„์›€์ด ๋ ๊นŒ์š”?",
                      "content": "Answer 10"
                  }
              ]
          }
      }

      FAIL 1 : ์กด์žฌํ•˜์ง€ ์•Š๋Š” ํ™œ๋™

      {
          "status": 400,
          "success": false,
          "message": "์„ ํƒํ•œ ํ™œ๋™ ๊ฐ€์ ธ์˜ค๊ธฐ ์‹คํŒจ"
      }

      FAIL 2 : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "์„ ํƒํ•œ ํ™œ๋™ ๊ฐ€์ ธ์˜ค๊ธฐ ์‹คํŒจ"
      }
    • ์ „์ฒด ํ™œ๋™ ์กฐํšŒ[GET] โšก

      ์‚ฌ์šฉ์ž๊ฐ€ ์ž‘์„ฑํ•œ ๋ชจ๋“  ํ™œ๋™ ์กฐํšŒ

      [GET] /activity/getAllActivity


      Request-Body(application/json)

      Response-body (application/json)

      SUCCESS

      {
          "status": 200,
          "success": true,
          "message": "์ „์ฒด ํ™œ๋™ ๊ฐ€์ ธ์˜ค๊ธฐ ์„ฑ๊ณต",
          "data": [
              {
                  "id": 1,
                  "title": "์ž˜๋˜๋ผ",
                  "startDate": "20201231",
                  "endDate": "20211231",
                  "imageUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609592171400.jpg",
                  "jobTag": [
                      "๊ฐœ๋ฐœ์ž",
                      "๋ˆ ๋งŽ์€ ์‚ฌ๋žŒ"
                  ],
                  "skillTag": [
                      "Spring",
                      "Docker",
                      "AWS"
                  ]
              },
              {
                  "id": 2,
                  "title": "hacking",
                  "startDate": "20210101",
                  "endDate": "20210302",
                  "imageUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609569981565.png",
                  "jobTag": [
                      "๊ฐœ๋ฐœ์ž",
                      "์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž"
                  ],
                  "skillTag": [
                      "Spring",
                      "Node.js",
                      "์„ฑ์ "
                  ]
              },
              {
                  "id": 3,
                  "title": "three",
                  "startDate": "20180917",
                  "endDate": "20200552",
                  "imageUrl": "",
                  "jobTag": [
                      "๊ฐœ๋ฐœ์ž",
                      "์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž"
                  ],
                  "skillTag": [
                      "Spring",
                      "Node.js",
                      "์„ฑ์ "
                  ]
              },
              {
                  "id": 4,
                  "title": "์‹คํ—˜",
                  "startDate": "20210101",
                  "endDate": "20210202",
                  "imageUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609583282664.png",
                  "jobTag": [
                      "๊ฐœ๋ฐœ์ž",
                      "์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž"
                  ],
                  "skillTag": [
                      "Spring",
                      "Node.js",
                      "์„ฑ์ "
                  ]
              },
              {
                  "id": 5,
                  "title": "์‹คํ—˜์ฒด",
                  "startDate": "20210101",
                  "endDate": "20210202",
                  "imageUrl": "",
                  "jobTag": [
                      "๊ฐœ๋ฐœ์ž",
                      "์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž"
                  ],
                  "skillTag": [
                      "Spring",
                      "Node.js",
                      "์„ฑ์ "
                  ]
              },
              {
                  "id": 6,
                  "title": "์ž˜๋˜๋ผ",
                  "startDate": "20201231",
                  "endDate": "20211231",
                  "imageUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609591991198.jpg",
                  "jobTag": [
                      "๊ฐœ๋ฐœ์ž",
                      "๋ˆ ๋งŽ์€ ์‚ฌ๋žŒ"
                  ],
                  "skillTag": [
                      "Spring",
                      "Docker",
                      "AWS"
                  ]
              }
          ]
      }

      FAIL : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "์ „์ฒดํ™œ๋™ ๊ฐ€์ ธ์˜ค๊ธฐ ์‹คํŒจ"
      }
    • ์ฆ๊ฒจ์ฐพ๊ธฐ ํ™œ๋™ ์กฐํšŒ[GET] โšก

      ์‚ฌ์šฉ์ž๊ฐ€ ์ฆ๊ฒจ์ฐพ๊ธฐํ•œ ๋ชจ๋“  ํ™œ๋™ ์กฐํšŒ

      [GET] /activity/getLikeActivity


      Request-Body(application/json)

      Response-body (application/json)

      SUCCESS

      {
          "status": 200,
          "success": true,
          "message": "์ „์ฒด ์ฆ๊ฒจ์ฐพ๊ธฐ ๊ฐ€์ ธ์˜ค๊ธฐ ์„ฑ๊ณต",
          "data": [
              {
                  "id": 1,
                  "title": "์ž˜๋˜๋ผ",
                  "startDate": "20201231",
                  "endDate": "20211231",
                  "imageUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609592171400.jpg",
                  "jobTag": [
                      "๊ฐœ๋ฐœ์ž",
                      "๋ˆ ๋งŽ์€ ์‚ฌ๋žŒ"
                  ],
                  "skillTag": [
                      "Spring",
                      "Docker",
                      "AWS"
                  ]
              },
              {
                  "id": 3,
                  "title": "three",
                  "startDate": "20180917",
                  "endDate": "20200502",
                  "imageUrl": "",
                  "jobTag": [
                      "๊ฐœ๋ฐœ์ž",
                      "์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž"
                  ],
                  "skillTag": [
                      "Spring",
                      "Node.js",
                      "์„ฑ์ "
                  ]
              }
          ]
      }

      FAIL : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "์ „์ฒด ์ฆ๊ฒจ์ฐพ๊ธฐ ๊ฐ€์ ธ์˜ค๊ธฐ ์‹คํŒจ"
      }
    • ์ฆ๊ฒจ์ฐพ๊ธฐ ์ถ”๊ฐ€ ๋ฐ ํ•ด์ œ[PUT] โšก

      ์ฆ๊ฒจ์ฐพ๊ธฐ ์ถ”๊ฐ€ ๋ฐ ํ•ด์ œ(์ฆ๊ฒจ์ฐพ๊ธฐ O โ†’ X , X โ†’ O)

      [PUT] activity/likeActivity/:ActivityId


      Request-Parameter(application/json)

      Response-body (application/json)

      SUCCESS 1: ์ฆ๊ฒจ์ฐพ๊ธฐ ์ถ”๊ฐ€

      {
          "status": 200,
          "success": true,
          "message": "์ฆ๊ฒจ์ฐพ๊ธฐ ์ถ”๊ฐ€ ๋ฐ ํ•ด์ œ ์„ฑ๊ณต",
          "data": "์ฆ๊ฒจ์ฐพ๊ธฐ ์ถ”๊ฐ€"
      }

      SUCCESS 2: ์ฆ๊ฒจ์ฐพ๊ธฐ ํ•ด์ œ

      {
          "status": 200,
          "success": true,
          "message": "์ฆ๊ฒจ์ฐพ๊ธฐ ์ถ”๊ฐ€ ๋ฐ ํ•ด์ œ ์„ฑ๊ณต",
          "data": "์ฆ๊ฒจ์ฐพ๊ธฐ ํ•ด์ œ"
      }

      FAIL : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "์ฆ๊ฒจ์ฐพ๊ธฐ ์ถ”๊ฐ€/ํ•ด์ œ ์‹คํŒจ"
      }
    • ํ•ด์‰ฌํƒœ๊ทธ ๋ชฉ๋ก ์กฐํšŒ[GET] โšก

      ์œ ์ €๊ฐ€ ์‚ฌ์šฉํ•œ ํ•ด์‰ฌํƒœ๊ทธ ๋ชฉ๋ก ์กฐํšŒ

      [GET] /hashtag


      Request-Body(application/json)

      Response-body (application/json)

      SUCCESS

      {
          "status": 200,
          "success": true,
          "message": "ํ•ด์‹œํƒœ๊ทธ ์กฐํšŒ ์„ฑ๊ณต",
          "data": {
              "jobTag": [
                  "๊ฐœ๋ฐœ์ž",
                  "์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž",
                  "๋ˆ ๋งŽ์€ ์‚ฌ๋žŒ"
              ],
              "skillTag": [
                  "Spring",
                  "Node.js",
                  "์„ฑ์ ",
                  "Docker",
                  "AWS"
              ]
          }
      }

      FAIL : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "ํ•ด์‹œํƒœ๊ทธ ์กฐํšŒ ์‹คํŒจ"
      }
    • ํ™œ๋™ ์ƒ์„ฑ[POST] โšก

      ์‚ฌ์šฉ์ž๊ฐ€ ์ž์‹ ์˜ ํ™œ๋™์„ ์ƒ์„ฑ

      [POST] /activity/create


      Request-Body(form-data)

      Response-body (application/json)

      SUCCESS

      {
          "status": 200,
          "success": true,
          "message": "ํ™œ๋™ ์ƒ์„ฑ ์„ฑ๊ณต",
          "data": {
              "newActivity": {
                  "id": 7,
                  "title": "ํ…Œ์ŠคํŠธ ํ™œ๋™",
                  "startDate": "20190101",
                  "endDate": "20200420",
                  "group": "Something",
                  "summary": "",
                  "imageUrl": "https://sopt-27-osj.s3.ap-northeast-2.amazonaws.com/images/origin/1609739675912.png",
                  "fileUrl": "",
                  "fileName": "",
                  "star": false,
                  "UserId": 2
              },
              "newHashtag": [
                  {
                      "id": 80,
                      "content": "๊ฐœ๋ฐœ์ž",
                      "isJob": true,
                      "ActivityId": 7
                  },
                  {
                      "id": 81,
                      "content": "์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž",
                      "isJob": true,
                      "ActivityId": 7
                  },
                  {
                      "id": 82,
                      "content": "๊ฐœ๋ฐœ",
                      "isJob": false,
                      "ActivityId": 7
                  },
                  {
                      "id": 83,
                      "content": "Node.js",
                      "isJob": false,
                      "ActivityId": 7
                  },
                  {
                      "id": 84,
                      "content": "์„ฑ์ ",
                      "isJob": false,
                      "ActivityId": 7
                  }
              ]
          }
      }

      FAIL 1 : ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ด ๋ฏธ์ž…๋ ฅ ์ƒํƒœ์ผ ๊ฒฝ์šฐ

      {
          "status": 400,
          "success": false,
          "message": "ํ•„์š”ํ•œ ๊ฐ’์ด ์—†์Šต๋‹ˆ๋‹ค."
      }

      FAIL 2 : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "ํ™œ๋™ ์ƒ์„ฑ ์‹คํŒจ"
      }
    • ํ™œ๋™ ์ˆ˜์ •[PUT] โšก

      ์‚ฌ์šฉ์ž๊ฐ€ ํ™œ๋™์„ ์ „์ฒด์ ์œผ๋กœ ์ˆ˜์ •

      [PUT] activity/update


      Request-Body(form-data)

      Response-body (application/json)

      SUCCESS

      {
          "status": 200,
          "success": true,
          "message": "ํ™œ๋™ ์ •๋ณด ์ˆ˜์ • ์„ฑ๊ณต",
          "data": "ํ™œ๋™ ์ •๋ณด ์ˆ˜์ • ์™„๋ฃŒ"
      }

      FAIL 1 : ํ•„์ˆ˜ ์ž…๋ ฅ๊ฐ’์ด ๋ฏธ์ž…๋ ฅ ์ƒํƒœ์ผ ๊ฒฝ์šฐ

      {
          "status": 400,
          "success": false,
          "message": "ํ•„์š”ํ•œ ๊ฐ’์ด ์—†์Šต๋‹ˆ๋‹ค."
      }

      FAIL 2 : ์„œ๋ฒ„ ์—๋Ÿฌ

      {
          "status": 500,
          "success": false,
          "message": "ํ™œ๋™ ์ •๋ณด ์ˆ˜์ • ์‹คํŒจ"
      }
Clone this wiki locally