# 스웨거 피드백
## 공통
- HARBOR-PRINCIPAL: 이건 뭔가요?? (token 값인 듯한데..)
- 즐겨찾는엔티티, 즐겨찾는쿼리 정보 저장 시 사용자ID 저장 여부 확인 필요.
현재 사용자 정보는 header bearer token으로 사용자정보가 넘어가고 있음.
## 서비스 조회 API
### [POST] /api/hubble/services/api/hubble/services/{serviceId}/graphs/{graphId}/query
- Path 에 `/api/hubble/services` 반복
- Wiki 의 `쿼리 결과항목 조회` api인가요?
- Request query 누락
- Response 포맷 다름
- response 200 일때 포맷이 `string` 입니다.
모든 response 포맷은 아래와같이 data로 감싸주세요.
```
{
"message": "string",
"code": "string",
"data": "string"
}
```
### [GET] /api/hubble/services/services/{serviceId}/graphs/{graphId}/query-expression
- path에 `services` 반복 (개발중이라 그런 듯)
### [GET] /api/hubble/services/services/{serviceId}/graphs/{graphId}/entities/{entityUrl}
- path에 `services` 반복 (개발중이라 그런 듯)
### [GET] /api/hubble/services/api/hubble/services/{serviceId}/graphs/{graphId}/entities
- Path에 `/api/hubble/services` 반복 (개발중이라 그런 듯)
## 최근 조회 쿼리 API
### [POST] api/hubble/latest/query
- `/api/hubble/latest/query` path는 문서에는 없는 걸로 알고 있음. `dev only`라고 되어 있는데 이것도 내부 테스트용인 것인가요..?
- Response에 searchedDate는 publishedAt을 대체하는 건가요?
## 즐겨 찾는 엔티티 API
### [GET] /api/hubble/favorite/filters
- Response > data > list 포맷이 협의 된 wiki와 다름
- Response > `data.page.totalCount`누락
- wiki
```
interface FavoriteItemProps {
filterId: number;
title: string;
description: string;
publishedAt: string;
filter: Filter;
entityCount: number;
}
interface FavoriteListProps {
list: FavoriteItemProps[];
page: PageProps;
}
interface FavoriteProps extends ResponseProps {
data: FavoriteListProps;
}
```
- swagger
```
{
"code": 0,
"message": "string",
"data": {
"list": [
{
"id": 0,
"title": "string",
"serviceId": 0,
"graphId": 0,
"keyword": "string",
"typePropertySets": [
{
"typeName": "string",
"propertyName": "string"
}
]
}
],
"page": {
"totalPages": 0,
"page": 0,
"size": 0
}
}
}
```
### [POST] /api/hubble/favorite/filters
- request > keyword - 연산 조건 포함한 string 하나인지 확인 필요. (Keyword 포맷 협의)
### [GET] /api/hubble/favorite/filters/{filterId}
- 어디서 사용하는 것인지 설명 필요.
### [GET] /api/hubble/favorite/filters/{filterId}/lists
- wiki에 협의 된 api 와 path가 다른데 이걸로 변경하는건가요?
- 포맷 내용도 반복되거나 불필요한 필드가 들어있습니다. 확인 필요합니다.
## 즐겨찾는 쿼리 API
### [GET] /api/hubble/favorite/queries
- Path query에 serviceId, graphId 누락
- Response 에 publishedAt, serviceId, serviceName, graphId, graphName 누락
- Response 에 totalCount(totalPages와 다름) 누락
### [POST] /api/hubble/favorite/queries
- Request 에 필드명 query가 queryBody로 변경하겠음
- Request 에 relationCount는 front에서 확인 할 수 없는 내용입니다.
금주 회의에서 spec-out으로 얘기한것 아닌가요?
### [PATCH] /api/hubble/favorite/queries/{queryId}
- queryId가 request 였는데 path로 이동 된 건가요?
- ✅ swagger 방식에 맞추기로 함.(path 방식)
- Request body가 협의된 내용과 다름
### [GET] /api/hubble/favorite/queries/{queryId}
- wiki에는 즐겨찾기 쿼리 조회가 아닌, 전체 쿼리 조회 api로 협의했습니다.
### [DELETE] /api/hubble/favorite/queries/{queryId}
- 앞서 언급한 patch와 방식 일치시키면 좋을 듯(request body에 넣느냐, path를 이용하느냐)
- ✅ swagger 방식에 맞추기로 함.(path 방식)
## 예제 쿼리 API
### [GET] /api/hubble/example/queries
- response > data > query --> queryBody 로 변경하겠음
## 스키마 모델 API
### [GET] /api/hubble/services/{serviceId}/graphs/{graphId}/properties
- 현재 필요없는 API
### 누락 된 API
- /graphs/latest/updated/entities?serviceId={serviceId}&graphId={graphId}
- Entity 메인 - 최근 업데이트 Entity 리스트 조회
- /services/{serviceId}/graphs/{graphId}/documents?entityUrl={entityUrl}
- 결과 페이지 - Entity 상세정보 조회 (template)
- /queries/{queryId}
- 쿼리문 조회
- 쿼리를 확인하는 팝업에서 해당 쿼리의 서비스명/그래프명이 포함되어 포맷 변경되었습니다.