묻고 답해요
132만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
@EnableSwagger2 어노테이션이 나오지 않아요!
swagger 디팬더시 걸어주었지만 @EnableSwagger2 어노테이션이 나오지 않아요! 이런 경우엔 어떻게 해결하나요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
강의 잘듣고 있습니다.
강의에서 배운 내용에 스웨거를 적용하고 있는데 해결되지 않는 문제가 있어 질문드립니다. 스웨거 세팅은 다 끝내서 잘 사용하고 있다가 로그인 쪽에 POST 요청 시 req.body의 내용이 없어 질문드니다. 로그인 부분을 스웨거로 테스트 하려고 하는데 Parameter값이 넘어오지 않습니다. 이유가 무엇일까요....? PostMan으로 했을때는 잘 넘어 옵니다. /** * @swagger * /user/login: * post: * summary: Creates a new message. * consumes: * - application/json * tags: * - Create a new message * parameters: * - in: body * name: user * description: The user to create. * schema: * type: object * required: * - name * - email * - text * properties: * name: * type: string * email: * type: string * text: * type: string * responses: * 201: * description: New message created! */ router.post('/login', (req, res, next) => { // Generate ID //req.body.id = Math.floor(Math.random() * 100) * 1 console.log(req.body); console.log(req.user); res.json(req.body); });