안녕하세요.
다음과 같이 API Spec을 작성하였습니다.
{
"info": {
"title": "자투리 시간 및 현재 위치 기반 장소 추천",
"version": "v1"
},
"paths": {
"/v1/places_recommendation": {
"post": {
"summary": "AI를 통해 장소를 추천하는 API입니다.",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "추천 순서(1,2,3,4,5 중 1)"
},
"title": {
"type": "string",
"description": "장소 이름"
},
"address": {
"type": "string",
"description": "장소 주소"
},
"content": {
"type": "string",
"description": "장소 추천 이유"
}
}
},
"maxItems": 5,
"minItems": 1
}
}
},
"description": "성공적인 응답"
}
},
"description": "AI를 통해 장소를 추천하는 API입니다.",
"operationId": "placesRecommendation",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"spareTime",
"activityType",
"keywords",
"location"
],
"properties": {
"keywords": {
"type": "array",
"items": {
"enum": [
"SELF_DEVELOPMENT",
"HEALTH",
"NATURE",
"CULTURE_ART",
"ENTERTAINMENT",
"RELAXATION",
"SOCIAL"
],
"type": "string"
},
"description": "원하는 활동 주제. SELF_DEVELOPMENT, HEALTH, NATURE, CULTURE_ART, ENTERTAINMENT, RELAXATION, SOCIAL 중 1~7개의 값을 가진다."
},
"location": {
"type": "string",
"description": "현재 위치"
},
"spareTime": {
"type": "integer",
"description": "자투리 시간. 10~300 사이의 값을 가진다."
},
"activityType": {
"enum": [
"ONLINE",
"OFFLINE",
"ONLINE_AND_OFFLINE"
],
"type": "string",
"description": "활동의 온/오프라인 여부. ONLINE, OFFLINE, ONLINE_AND_OFFLINE 중 하나의 값을 가진다."
}
}
}
}
},
"required": true
}
}
}
},
"openapi": "3.0.0",
"servers": [
{
"url": "http://localhost:8080"
}
]
}
그 후 데이터 수집 시 호출 옵션을 다음과 같이 설정하였습니다.
{
"baseOperation": {
"header": {
"X-Naver-Client-Id": "",
"X-Naver-Client-Secret": ""
}
},
"operations": [
{
"operationId": "placesRecommendation",
"requestBody": {
"spareTime": 30,
"activityType": "OFFLINE",
"keywords": [
"NATURE"
],
"location": "서울시 강남구"
}
}
]
}
그 후 실행을 누르면 위와 같이 계속 에러가 발생합니다..
어디가 문제인지 모르겠습니다 .