설명
최상위 externalDocs.url에는 API 전체에 적용되는 안내 문서를 연결하세요.
잠재적 영향
링크가 끊기거나 일부 기능만 다루면 독자가 필요한 설정이나 문제 해결 방법을 찾기 어렵습니다.
해결 방법
API 개요에서 링크를 열어 보세요. 상대 URL이라면 문서 도구가 환경별로 어느 페이지를 여는지 확인하세요. 가이드가 별도 사이트에 있으면 전체 URL을 사용하세요.
예시
예시는 /를 주문 가이드 주소로 바꿉니다. 실제로는 API 전체를 안내하는 문서를 선택하세요.
변경 전
json
{
"openapi": "3.0.0",
"info": {
"title": "Simple API Overview",
"version": "1.0.0",
"contact": {
"name": "contact",
"url": "https://www.google.com/",
"email": "user@gmail.com"
}
},
"paths": {
"/": {
"get": {
"operationId": "listVersionsv2",
"summary": "List API versions",
"responses": {
"200": {
"description": "200 response",
"content": {
"application/json": {
"examples": {
"foo": {
"value": {
"versions": [
{
"status": "CURRENT",
"updated": "2011-01-21T11:33:21Z",
"id": "v2.0",
"links": [
{
"href": "http://127.0.0.1:8774/v2/",
"rel": "self"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"externalDocs": {
"url": "/"
}
}
변경 후
json
{
"openapi": "3.0.0",
"info": {
"title": "Simple API Overview",
"version": "1.0.0",
"contact": {
"name": "contact",
"url": "https://www.google.com/",
"email": "user@gmail.com"
}
},
"paths": {
"/": {
"get": {
"operationId": "listVersionsv2",
"summary": "List API versions",
"responses": {
"200": {
"description": "200 response",
"content": {
"application/json": {
"examples": {
"foo": {
"value": {
"versions": [
{
"status": "CURRENT",
"updated": "2011-01-21T11:33:21Z",
"id": "v2.0",
"links": [
{
"href": "http://127.0.0.1:8774/v2/",
"rel": "self"
}
]
}
]
}
}
}
}
}
}
}
}
}
},
"externalDocs": {
"url": "http://docs.my-api.com/store-orders.htm"
}
}