From 5442b61452c82e4ea64e70a2406a676006472726 Mon Sep 17 00:00:00 2001 From: Xeronith Date: Mon, 10 Oct 2022 12:33:35 +0330 Subject: [PATCH] docs(project): :technologist: update swagger --- greataped/app/docs/docs.go | 60 +++++++++++++++++++++++++++++++++ greataped/app/docs/swagger.json | 60 +++++++++++++++++++++++++++++++++ greataped/app/docs/swagger.yaml | 37 ++++++++++++++++++++ 3 files changed, 157 insertions(+) diff --git a/greataped/app/docs/docs.go b/greataped/app/docs/docs.go index 2b067a0..914bd41 100644 --- a/greataped/app/docs/docs.go +++ b/greataped/app/docs/docs.go @@ -48,6 +48,30 @@ const docTemplate = `{ } } }, + "/api/v1/feed/types": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Feed" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, "/api/v1/login": { "post": { "consumes": [ @@ -138,6 +162,42 @@ const docTemplate = `{ } } }, + "/api/v1/users/{username}/feed": { + "get": { + "security": [ + { + "JWT": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Feed" + ], + "parameters": [ + { + "type": "string", + "description": "Username", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/api/v1/verify": { "post": { "consumes": [ diff --git a/greataped/app/docs/swagger.json b/greataped/app/docs/swagger.json index 8c8be54..d55c9e3 100644 --- a/greataped/app/docs/swagger.json +++ b/greataped/app/docs/swagger.json @@ -40,6 +40,30 @@ } } }, + "/api/v1/feed/types": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Feed" + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, "/api/v1/login": { "post": { "consumes": [ @@ -130,6 +154,42 @@ } } }, + "/api/v1/users/{username}/feed": { + "get": { + "security": [ + { + "JWT": [] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Feed" + ], + "parameters": [ + { + "type": "string", + "description": "Username", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "object", + "additionalProperties": true + } + } + } + } + }, "/api/v1/verify": { "post": { "consumes": [ diff --git a/greataped/app/docs/swagger.yaml b/greataped/app/docs/swagger.yaml index 774b0ce..4ece080 100644 --- a/greataped/app/docs/swagger.yaml +++ b/greataped/app/docs/swagger.yaml @@ -115,6 +115,21 @@ paths: type: object tags: - WebFinger + /api/v1/feed/types: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + type: string + type: array + tags: + - Feed /api/v1/login: post: consumes: @@ -170,6 +185,28 @@ paths: $ref: '#/definitions/SignupResponse' tags: - Authentication + /api/v1/users/{username}/feed: + get: + consumes: + - application/json + parameters: + - description: Username + in: path + name: username + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + additionalProperties: true + type: object + security: + - JWT: [] + tags: + - Feed /api/v1/verify: post: consumes: