-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathswagger.json
More file actions
1 lines (1 loc) · 13.5 KB
/
swagger.json
File metadata and controls
1 lines (1 loc) · 13.5 KB
1
{"swagger":"2.0","info":{"description":"Software Maestro 7th - 2차 프로젝트 '뷰티 팀'\n[http://13.112.190.217:8888/]\n","version":"1.0.0","title":"Beauty Project","termsOfService":"http://13.112.190.217:8888/","contact":{"email":"lmjing1234@gmail.com"}},"tags":[{"name":"category","description":"화장품 카테고리 ( 대, 소 )"},{"name":"brand","description":"화장품 브랜드"},{"name":"user","description":"유저 정보 및 나만의 화장대"},{"name":"cosmetic","description":"화장품 정보(유저 연관데이터 x)"}],"paths":{"/users/login":{"post":{"tags":["user"],"summary":"회원가입 및 로그인","description":"서버 내에서 새로운 회원은 가입시킨다. 세션에 id값 저장 후 유저 데이터 값 리턴함.","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"아이디, 이름(추후 닉네임으로 변경 예정), 프로필 사진 url, 소셜타입(카카오톡/페이스북)","required":true,"schema":{"$ref":"#/definitions/PostUser"}}],"responses":{"201":{"description":"Created"},"400":{"description":"Bad request. invalid parameter or invalid body"},"302":{"description":"Success = redirect to GET /users/{id}"}}}},"/users/logout":{"get":{"tags":["user"],"summary":"특정 사용자 정보 불러움","description":"(개발 사항 참고) 모든 블로그에 나와있는데로 구현했으나, 기기마다 세션값이 달리 저장되기 때문에 테스트를 제대로 해보지 못함. 추후 테스트 필수!","produces":["application/json"],"responses":{"200":{"description":"Success"},"500":{"description":"Internal server error"}}}},"/users/{user_id}":{"get":{"tags":["user"],"summary":"특정 사용자 정보 불러움","produces":["application/json"],"parameters":[{"name":"user_id","in":"path","description":"원래는 String(추후 로그인 추가될 예정) 현재는 int","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/User"}},"500":{"description":"Internal server error"},"404":{"description":"No found"}}}},"/users/{user_id}/cosmetics":{"post":{"tags":["user"],"summary":"유저 화장품 등록","description":"추후 개발시 참고 사항-현재 실 사용하는 컬럼은 유저아이디, 화장품 아이디 뿐임 나중에 유통기한도 넣고 다 바꿀 것","produces":["application/json"],"parameters":[{"name":"user_id","in":"path","description":"원래는 String(추후 로그인 추가될 예정) 현재는 int","required":true,"type":"string"},{"in":"body","name":"body","description":"제품명,브랜드,사진,카테고리(메인,서브),상태","required":true,"schema":{"$ref":"#/definitions/PostCosmetic"}}],"responses":{"201":{"description":"Created"},"400":{"description":"Bad request. invalid parameter or invalid body"},"409":{"description":"Conflict. Already exists"}}},"get":{"tags":["user"],"summary":"특정 사용자 정보 불러움","description":"쿼리 스트링 사용 안할경우는 카테고리 별 4개씩, 쿼리 스트링 사용할 경우는 20개씩 출력","produces":["application/json"],"parameters":[{"name":"user_id","in":"path","description":"원래는 String(추후 로그인 추가될 예정) 현재는 int","required":true,"type":"string"},{"name":"main","in":"query","description":"메인 카테고리 명(단독 사용가능)","required":false,"type":"string"},{"name":"sub","in":"query","description":"서브 카테고리 명(메인과 함께 호출해야 함)","required":false,"type":"string"},{"name":"page","in":"query","description":"로드모어(페이징) - 1부터 시작 ( 카테고리 조회일 경우 필수로 입력해야 함 )","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"$ref":"#/definitions/UserCosmetic2"}}},"400":{"description":"Bad request. invalid parameter , please check \\'page\\' query , \\'sub\\' must write \\'main\\' together"},"404":{"description":"Not found"},"500":{"description":"Internal server error"}}}},"/users/{user_id}/cosmetics/{cosmetic_id}":{"get":{"tags":["user"],"summary":"유저의 특정 화장품 정보 불러옴","produces":["application/json"],"parameters":[{"name":"user_id","in":"path","description":"원래는 String(추후 로그인 추가될 예정) 현재는 int","required":true,"type":"string"},{"name":"cosmetic_id","in":"path","description":"화장품 id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/UserCosmetic1"}},"400":{"description":"Bad request. invalid parameter"},"404":{"description":"Not found"}}},"put":{"tags":["user"],"summary":"유저의 특정 화장품 리뷰,별점 등록","produces":["application/json"],"parameters":[{"name":"user_id","in":"path","description":"원래는 String 추후 로그인 추가될 예정 현재는 integer","required":true,"type":"string"},{"name":"cosmetic_id","in":"path","description":"화장품 id","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"별점 & 리뷰 & 사용 상태","required":true,"schema":{"$ref":"#/definitions/RateReview"}}],"responses":{"200":{"description":"Success"},"400":{"description":"Bad request. invalid parameter or invalid body"},"500":{"description":"Internal server error"}}},"delete":{"tags":["user"],"summary":"유저의 특정 화장품 삭제","produces":["application/json"],"parameters":[{"name":"user_id","in":"path","description":"원래는 String 추후 로그인 추가될 예정 현재는 integer","required":true,"type":"string"},{"name":"cosmetic_id","in":"path","description":"화장품 id","required":true,"type":"integer","format":"int64"}],"responses":{"204":{"description":"Success - Not content"},"400":{"description":"Bad request. invalid parameter or invalid body"},"404":{"description":"Not found"}}}},"/users/images/{filename}":{"get":{"tags":["user"],"summary":"user 이미지 불러옴","produces":["application/jsons"],"parameters":[{"name":"filename","in":"path","description":"user 명","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"$ref":"#/definitions/Brand"}}},"500":{"description":"Internal server error"}}}},"/category":{"get":{"tags":["category"],"summary":"화장품 카테고리(명) 목록 불러옴","produces":["application/json"],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"$ref":"#/definitions/Category"}}},"404":{"description":"Not found"},"500":{"description":"Internal server error"}}}},"/brand":{"get":{"tags":["brand"],"summary":"브랜드(명) 목록 불러옴","produces":["application/jsons"],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"$ref":"#/definitions/Brand"}}},"404":{"description":"Not found"},"500":{"description":"Internal server error"}}}},"/brand/images/{filename}":{"get":{"tags":["brand"],"summary":"브랜드 이미지 불러옴","produces":["application/jsons"],"parameters":[{"name":"filename","in":"path","description":"브랜드 명","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"$ref":"#/definitions/Brand"}}},"500":{"description":"Internal server error"}}}},"/cosmetics":{"get":{"tags":["cosmetic"],"summary":"모든 화장품 목록을 불러옴","description":"일단 모두 12개씩 리턴 ( page 1 부터 시작 )","produces":["application/json"],"parameters":[{"name":"main","in":"query","description":"메인 카테고리 명(단독 사용가능)","required":false,"type":"string"},{"name":"sub","in":"query","description":"서브 카테고리 명(메인과 함께 호출해야 함)","required":false,"type":"string"},{"name":"brand","in":"query","description":"브랜드 명(단독 사용가능)","required":false,"type":"string"},{"name":"page","in":"query","description":"서브 카테고리 명(메인과 함께 호출해야 함)","required":true,"type":"integer"}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"$ref":"#/definitions/Cosmetic"}}},"400":{"description":"Bad request. invalid parameter , please check \\'page\\' query , \\'sub\\' must write \\'main\\' together"},"404":{"description":"Not found"},"500":{"description":"Internal server error"}}}},"/cosmetics/{cosmetic_id}":{"get":{"tags":["cosmetic"],"summary":"특정 화장품 정보 불러옴 ( 유저 연관데이터 x )","produces":["application/json"],"parameters":[{"name":"cosmetic_id","in":"path","description":"화장품 id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/Cosmetic"}},"400":{"description":"Bad request. invalid parameter"},"404":{"description":"Not found"},"500":{"description":"Internal server error"}}}},"/cosmetics/images/{filename}":{"get":{"tags":["cosmetic"],"summary":"화장품 이미지 불러옴","produces":["application/jsons"],"parameters":[{"name":"filename","in":"path","description":"화장품 명","required":true,"type":"string"}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"$ref":"#/definitions/Brand"}}},"500":{"description":"Internal server error"}}}},"/cosmetics/request":{"post":{"tags":["cosmetic"],"summary":"화장품 등록 요청","description":"유저가 찾는 화장품이 없을 경우 등록 요청하는 부분(최종 버전에도 있음)","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"유저가 입력한 브랜드,화장품 명 + 유저의 아이디 값","required":true,"schema":{"$ref":"#/definitions/PostRequestCosmetic"}}],"responses":{"201":{"description":"Created"},"400":{"description":"Bad request. invalid parameter or invalid body"},"302":{"description":"Success = redirect to GET /users/{id}"}}}}},"securityDefinitions":{"petstore_auth":{"type":"oauth2","authorizationUrl":"http://petstore.swagger.io/oauth/dialog","flow":"implicit","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}},"api_key":{"type":"apiKey","name":"api_key","in":"header"}},"definitions":{"Brand":{"type":"object","properties":{"name":{"type":"string"},"site":{"type":"string"},"logo":{"type":"string"}},"xml":{"name":"Brand"}},"Category":{"type":"object","properties":{"main_category":{"type":"string"},"sub_category":{"type":"array","xml":{"name":"subCategory","wrapped":true},"items":{"type":"string"}}},"xml":{"name":"Category"}},"User":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"profile_url":{"type":"string"},"birthday":{"type":"string","format":"date","description":"형식 '1994-05-29' / 프로토타입 버전에만 존재(지금도 필요없으면 삭제해도 무방)"},"gender":{"type":"string","description":"프로토타입 버전에만 존재(지금도 필요없으면 삭제해도 무방)"},"social_type":{"type":"string","description":"띄어쓰기도 있으면 안됨! 페이스북 카카오톡 정확하게 쓸 것 (페이스북 = 1 / 카카오톡 = 2로 넣어주어도 무방)"}},"xml":{"name":"User"}},"PostUser":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"profile_url":{"type":"string"},"social_type":{"type":"string","description":"띄어쓰기도 있으면 안됨! 페이스북 카카오톡 정확하게 쓸 것 (페이스북 = 1 / 카카오톡 = 2로 넣어주어도 무방)"}},"xml":{"name":"User"}},"PostRequestCosmetic":{"type":"object","properties":{"user":{"type":"string","description":"유저 아이디 입력"},"brand":{"type":"string","description":"유저가 작성한 브랜드 명 입력"},"cosmetic":{"type":"string","description":"유저가 작성한 화장품 명 입력"},"social_type":{"type":"string"}},"xml":{"name":"Cosmetic"}},"Cosmetic":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"product_name":{"type":"string","example":"베리떼 쿠션"},"img_src":{"type":"string"},"brand":{"type":"string"},"main_category":{"type":"string"},"sub_category":{"type":"string"}},"xml":{"name":"Cosmetic"}},"PostCosmetic":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"rate_num":{"type":"integer","format":"int64","description":"integer X -> float"},"review":{"type":"string"},"status":{"type":"boolean","default":true}},"xml":{"name":"Cosmetic"}},"UserCosmetic1":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"product_name":{"type":"string","example":"베리떼 쿠션"},"img_src":{"type":"string"},"brand":{"type":"string"},"main_category":{"type":"string"},"sub_category":{"type":"string"},"rate_num":{"type":"integer","format":"int32"},"review":{"type":"string"},"status":{"type":"boolean","default":true}}},"UserCosmetic2":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"product_name":{"type":"string","example":"베리떼 쿠션"},"img_src":{"type":"string"},"brand":{"type":"string"},"main_category":{"type":"string"},"sub_category":{"type":"string"},"rate_num":{"type":"integer","format":"int32"}},"xml":{"name":"UserCosmetic"}},"RateReview":{"type":"object","properties":{"rate_num":{"type":"integer","format":"int32"},"review":{"type":"string"},"status":{"type":"boolean","default":true,"description":"사용안함, 안 넣어 보내도 됨 ( 추후 버전에서 사용될 예정이라 그냥 놔둠)"},"expiration_date":{"type":"string","format":"date","example":"2017-12-30"}},"xml":{"name":"RateReview"}},"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}},"schemes":["https","http"],"host":"virtserver.swaggerhub.com","basePath":"/lmjing/BeautyProject/1.0.0"}