Skip to content

Commit cc5d6be

Browse files
committed
docs. swagger
1 parent 37fba2b commit cc5d6be

File tree

2 files changed

+21
-57
lines changed

2 files changed

+21
-57
lines changed

BackEnd/src/main/java/com/mcmp/costbe/common/CommonController.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.mcmp.costbe.common.config.ReadyzConfig;
44
import com.mcmp.costbe.common.model.ReadyzModel;
55
import com.mcmp.costbe.common.model.ResultModel;
6+
import io.swagger.v3.oas.annotations.Hidden;
67
import io.swagger.v3.oas.annotations.Operation;
78
import io.swagger.v3.oas.annotations.media.Content;
89
import io.swagger.v3.oas.annotations.responses.ApiResponse;
@@ -42,8 +43,9 @@ public ResponseEntity getReadyz(){
4243
}
4344

4445
@PostMapping(path = "/change/readyz")
45-
// @Tag(name = "Application", description = "Status API")
46-
// @Operation(summary = "어플리케이션 상태 변경", description = "어플리케이션의 상태를 변경합니다.")
46+
@Tag(name = "Application", description = "Status API")
47+
@Operation(summary = "어플리케이션 상태 변경", description = "어플리케이션의 상태를 변경합니다.")
48+
@Hidden
4749
// @ApiResponses(value={
4850
// @ApiResponse(responseCode = "200", description = "성공"),
4951
// @ApiResponse(responseCode = "500", description = "서버 오류", content = {@Content(examples = {})})

swagger.yaml

+17-55
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@
5757
"required": true
5858
},
5959
"responses": {
60-
"500": {
61-
"description": "서버 오류"
62-
},
6360
"200": {
6461
"description": "성공",
6562
"content": {
@@ -69,6 +66,9 @@
6966
}
7067
}
7168
}
69+
},
70+
"500": {
71+
"description": "서버 오류"
7272
}
7373
}
7474
}
@@ -127,9 +127,6 @@
127127
"required": true
128128
},
129129
"responses": {
130-
"500": {
131-
"description": "서버 오류"
132-
},
133130
"200": {
134131
"description": "성공",
135132
"content": {
@@ -139,6 +136,9 @@
139136
}
140137
}
141138
}
139+
},
140+
"500": {
141+
"description": "서버 오류"
142142
}
143143
}
144144
}
@@ -197,9 +197,6 @@
197197
"required": true
198198
},
199199
"responses": {
200-
"500": {
201-
"description": "서버 오류"
202-
},
203200
"200": {
204201
"description": "성공",
205202
"content": {
@@ -209,6 +206,9 @@
209206
}
210207
}
211208
}
209+
},
210+
"500": {
211+
"description": "서버 오류"
212212
}
213213
}
214214
}
@@ -232,6 +232,9 @@
232232
"required": true
233233
},
234234
"responses": {
235+
"500": {
236+
"description": "서버 오류"
237+
},
235238
"200": {
236239
"description": "성공",
237240
"content": {
@@ -244,9 +247,6 @@
244247
}
245248
}
246249
}
247-
},
248-
"500": {
249-
"description": "서버 오류"
250250
}
251251
}
252252
}
@@ -340,9 +340,6 @@
340340
"required": true
341341
},
342342
"responses": {
343-
"500": {
344-
"description": "서버 오류"
345-
},
346343
"200": {
347344
"description": "성공",
348345
"content": {
@@ -352,36 +349,9 @@
352349
}
353350
}
354351
}
355-
}
356-
}
357-
}
358-
},
359-
"/api/costopti/be/change/readyz": {
360-
"post": {
361-
"tags": [
362-
"common-controller"
363-
],
364-
"operationId": "changeReadyz",
365-
"requestBody": {
366-
"content": {
367-
"application/json;charset=UTF-8": {
368-
"schema": {
369-
"$ref": "#/components/schemas/ReadyzModel"
370-
}
371-
}
372352
},
373-
"required": true
374-
},
375-
"responses": {
376-
"200": {
377-
"description": "OK",
378-
"content": {
379-
"application/json;charset=UTF-8": {
380-
"schema": {
381-
"type": "string"
382-
}
383-
}
384-
}
353+
"500": {
354+
"description": "서버 오류"
385355
}
386356
}
387357
}
@@ -405,9 +375,6 @@
405375
"required": true
406376
},
407377
"responses": {
408-
"500": {
409-
"description": "서버 오류"
410-
},
411378
"200": {
412379
"description": "성공",
413380
"content": {
@@ -417,6 +384,9 @@
417384
}
418385
}
419386
}
387+
},
388+
"500": {
389+
"description": "서버 오류"
420390
}
421391
}
422392
}
@@ -1726,14 +1696,6 @@
17261696
},
17271697
"description": "이번달 리소스 사용량 및 비용 조회 응답 모델"
17281698
},
1729-
"ReadyzModel": {
1730-
"type": "object",
1731-
"properties": {
1732-
"status": {
1733-
"type": "string"
1734-
}
1735-
}
1736-
},
17371699
"AlarmHistoryReqModel": {
17381700
"required": [
17391701
"selectedCsps",

0 commit comments

Comments
 (0)