From 3b741c1357f08af3697feb5eab355f39d310ae30 Mon Sep 17 00:00:00 2001 From: Ko Nak-yean <59277499+nakyeonko3@users.noreply.github.com> Date: Tue, 8 Apr 2025 23:25:12 +0900 Subject: [PATCH 1/2] =?UTF-8?q?API=20=EC=9D=91=EB=8B=B5=20=EC=8A=A4?= =?UTF-8?q?=ED=82=A4=EB=A7=88=20=EC=88=98=EC=A0=95,=20Comment=EC=99=80=20T?= =?UTF-8?q?icket=20=EA=B3=B5=ED=86=B5=20=EC=8A=A4=ED=82=A4=EB=A7=88=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit components/schemas 섹션에 Comment와 Ticket 스키마를 추가 API 응답 스키마에서 해당 Comment와 Ticket 스키마를 사용하도록 수정 --- tickets/openapi.yaml | 82 ++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/tickets/openapi.yaml b/tickets/openapi.yaml index 656c193..1d46b2d 100644 --- a/tickets/openapi.yaml +++ b/tickets/openapi.yaml @@ -26,32 +26,7 @@ paths: type: array description: 티켓 목록 items: - type: object - properties: - id: - type: string - description: 티켓 ID - title: - type: string - description: 티켓 제목 - description: - type: string - description: 티켓 내용 - status: - type: string - description: 티켓 상태 - comments: - type: array - description: 댓글 목록 - items: - type: object - properties: - id: - type: string - description: 댓글 ID - content: - type: string - description: 댓글 내용 + $ref: "#/components/schemas/Ticket" example: tickets: - id: 01JQA8YHB2WQ5GTDWDKWK744B9 @@ -104,8 +79,7 @@ paths: content: application/json: schema: - type: object - properties: {} + $ref: "#/components/schemas/Ticket" example: id: 01JQX1FTS2KJFQRFEWVEM83QH2 title: New Ticket @@ -135,8 +109,7 @@ paths: content: application/json: schema: - type: object - properties: {} + $ref: "#/components/schemas/Ticket" example: id: 01JQA8YHB2WQ5GTDWDKWK744B9 title: Some Ticket @@ -178,8 +151,7 @@ paths: content: application/json: schema: - type: object - properties: {} + $ref: "#/components/schemas/Ticket" example: id: 01JQA8YHB2WQ5GTDWDKWK744B9 title: Some Ticket @@ -208,8 +180,7 @@ paths: content: application/json: schema: - type: object - properties: {} + $ref: "#/components/schemas/Ticket" example: id: 01JQX1FTS2KJFQRFEWVEM83QH2 title: Some Ticket @@ -251,8 +222,9 @@ paths: content: application/json: schema: - type: object - properties: {} + type: array + items: + $ref: "#/components/schemas/Comment" example: - id: 01JQFRVCZ36PC7C3CDYWGGGVH2 content: This is the first comment. @@ -291,8 +263,7 @@ paths: content: application/json: schema: - type: object - properties: {} + $ref: "#/components/schemas/Comment" example: id: 01JQX26V9XH60Y98S7Z1J87EYR content: This is the first comment. @@ -326,15 +297,44 @@ paths: content: application/json: schema: - type: object - properties: {} + $ref: "#/components/schemas/Comment" example: id: 01JQX26V9XH60Y98S7Z1J87EYR content: This is the first comment. headers: {} security: [] components: - schemas: {} + schemas: + Comment: + type: object + properties: + id: + type: string + description: 댓글 ID + content: + type: string + description: 댓글 내용 + + Ticket: + type: object + properties: + id: + type: string + description: 티켓 ID + title: + type: string + description: 티켓 제목 + description: + type: string + description: 티켓 내용 + status: + type: string + description: 티켓 상태 + comments: + type: array + description: 댓글 목록 + items: + $ref: "#/components/schemas/Comment" securitySchemes: {} servers: - url: https://tickets-api.codedemo.co From 2f893131001719f9c3aa7e4f3a31ca60c1224287 Mon Sep 17 00:00:00 2001 From: Ko Nak-yean <59277499+nakyeonko3@users.noreply.github.com> Date: Tue, 8 Apr 2025 23:29:33 +0900 Subject: [PATCH 2/2] =?UTF-8?q?API=20info=20=EC=84=A4=EB=AA=85=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tickets api info 설명 개선 --- tickets/openapi.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tickets/openapi.yaml b/tickets/openapi.yaml index 1d46b2d..4e94da8 100644 --- a/tickets/openapi.yaml +++ b/tickets/openapi.yaml @@ -1,7 +1,12 @@ openapi: 3.0.1 info: title: Tickets API - description: "" + description: | + 티켓 관리 시스템을 위한 RESTful API입니다. + 이 API를 통해 티켓을 생성, 조회, 수정, 삭제하고 댓글을 관리할 수 있습니다. + + 각 티켓은 고유 ID, 제목, 설명, 상태를 가지며 여러 댓글을 포함할 수 있습니다. + 티켓 상태는 open, closed 등으로 관리됩니다. version: 1.0.0 tags: - name: tickets api