From b936136b530adbceffd612606ada1981f40671da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=A4ume?= Date: Wed, 2 Oct 2024 08:48:15 +0200 Subject: [PATCH] PMT-32: Define Endpoint Specification --- api/pmt.yml | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/api/pmt.yml b/api/pmt.yml index 06e99b1..f3739be 100644 --- a/api/pmt.yml +++ b/api/pmt.yml @@ -14,20 +14,22 @@ components: type: http scheme: bearer bearerFormat: JWT - schemas: - HelloOut: - description: "A Test Schema" + schemas: + ProjectInfo: type: object - properties: - msg: + properties: + id: + type: integer + format: int64 + name: type: string + GetAllProjectsDTO: + type: array + items: + $ref: "#/components/schemas/ProjectInfo" responses: - OK: - description: "OK" - content: - text/plain: - schema: - type: string + UnAuthorized: + description: "Un Authorized" InternalError: description: "Internal Server Error" content: @@ -35,16 +37,18 @@ components: schema: type: string paths: - /hello: + /project: get: - operationId: "GetHello" - description: "A Simple Hello World Endpoint" + operationId: "getAllProjects" + description: "Get a List of all Projects" responses: 200: - description: "A Hello Response" + description: "" content: application/json: schema: - $ref: "#/components/schemas/HelloOut" + $ref: "#/components/schemas/GetAllProjectsDTO" + 401: + $ref: "#/components/responses/UnAuthorized" 500: $ref: "#/components/responses/InternalError" \ No newline at end of file