From 0741615f2b64aeacab7cf874e53c892febe4b248 Mon Sep 17 00:00:00 2001 From: tuz666 Date: Mon, 28 Mar 2022 16:17:41 +0200 Subject: [PATCH] swagger fix --- arcsi/api/show.py | 6 +++- arcsi/static/doc.json | 65 +++++++++++++++++++++++++++++-------------- 2 files changed, 49 insertions(+), 22 deletions(-) diff --git a/arcsi/api/show.py b/arcsi/api/show.py index 923a2d86..276b8bd9 100644 --- a/arcsi/api/show.py +++ b/arcsi/api/show.py @@ -92,6 +92,10 @@ def list_shows(): return shows_schema.dumps(get_shows()) +@arcsi.route("/show/all_without_items", methods=["GET"]) +def list_shows_without_items(): + return shows_schedule_schema.dumps(get_shows()) + @arcsi.route("/show/schedule", methods=["GET"]) def list_shows_for_schedule(): do = DoArchive() @@ -411,4 +415,4 @@ def search_show(): show.cover_image_url = do.download( show.archive_lahmastore_base_url, show.cover_image_url ) - return shows_archive_schema.dumps(shows.items) \ No newline at end of file + return shows_schedule_schema.dumps(shows.items) \ No newline at end of file diff --git a/arcsi/static/doc.json b/arcsi/static/doc.json index 692022a8..d16f9082 100644 --- a/arcsi/static/doc.json +++ b/arcsi/static/doc.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "description": "Arcsi API doc", - "version": "0.9.6", + "version": "0.9.7", "title": "Arcsi", "contact": { "email": "it@lahmacun.hu" @@ -19,15 +19,15 @@ ], "tags": [ { - "name": "User Request", - "description": "API for requesting and return User details" + "name": "Show Requests for frontend", + "description": "API for requesting and return Show details" }, { - "name": "Show Requests for Arcsi", - "description": "API for requesting and return Show details" + "name": "Item Requests for frontend", + "description": "API for requesting and return Item details" }, { - "name": "Show Requests for frontend", + "name": "Show Requests for Arcsi", "description": "API for requesting and return Show details" }, { @@ -35,8 +35,8 @@ "description": "API for requesting and return Item details" }, { - "name": "Item Requests for frontend", - "description": "API for requesting and return Item details" + "name": "User Request", + "description": "API for requesting and return User details" } ], "paths": { @@ -105,7 +105,7 @@ "tags": [ "Show Requests for Arcsi" ], - "summary": "Return Shows for Arcsi Show Archive", + "summary": "Return all Shows for Arcsi's Shows Page", "produces": [ "text/html" ], @@ -128,7 +128,7 @@ "tags": [ "Show Requests for Arcsi" ], - "summary": "Return Show for Arcsi Show Page", + "summary": "Return chosen Show for Arcsi's Show Subpage", "parameters": [ { "in": "path", @@ -163,7 +163,7 @@ "tags": [ "Show Requests for frontend" ], - "summary": "Return Shows for Ananasz Shows Page", + "summary": "Return all Shows for Ananasz's Shows Page", "produces": [ "text/html" ], @@ -181,12 +181,35 @@ } } }, + "/show/all_without_items": { + "get": { + "tags": [ + "Show Requests for frontend" + ], + "summary": "Return all Shows for Ananasz's Shows Page", + "produces": [ + "text/html" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/html": { + "schema": { + "$ref": "component.json#/components/schemas/ShowScheduleResponseBodies" + } + } + } + } + } + } + }, "/show/search?size={size}&page={page}¶m={param}": { "get": { "tags": [ "Show Requests for frontend" ], - "summary": "Return Shows which name or description contains the parameter", + "summary": "Return all searched Shows (their name or description contains the parameter)", "parameters": [ { "in": "path", @@ -232,7 +255,7 @@ "tags": [ "Show Requests for frontend" ], - "summary": "Return Shows for Ananasz Home and Schedule Page", + "summary": "Return all active Shows for Ananasz's Home and Schedule Page", "produces": [ "text/html" ], @@ -255,7 +278,7 @@ "tags": [ "Show Requests for frontend" ], - "summary": "Return Shows for Ananasz Home and Schedule Page", + "summary": "Return all active Shows airing on the chosen day for Ananasz's Home and Schedule Page", "parameters": [ { "in": "path", @@ -287,7 +310,7 @@ "tags": [ "Show Requests for frontend" ], - "summary": "Return Show for Ananasz Show Subpage", + "summary": "Return the chosen Show for Ananasz's Show Subpage", "parameters": [ { "in": "path", @@ -322,7 +345,7 @@ "tags": [ "Item Requests for Arcsi" ], - "summary": "Return Episodes for Arcsi Items Archive", + "summary": "Return all Items for Arcsi's Items Page", "produces": [ "text/html" ], @@ -345,7 +368,7 @@ "tags": [ "Item Requests for Arcsi" ], - "summary": "Return Episode for Arcsi Episode Page", + "summary": "Return the chosen Item for Arcsi's Item Subpage", "parameters": [ { "in": "path", @@ -382,7 +405,7 @@ "tags": [ "Item Requests for frontend" ], - "summary": "Return Latest Episodes for Ananasz Home and Archive Page", + "summary": "Return latest Items for Ananasz's Home and Archive Page", "parameters": [ { "in": "path", @@ -421,7 +444,7 @@ "tags": [ "Item Requests for frontend" ], - "summary": "Return Items which name or description contains the parameter", + "summary": "Return all searched Items (their name or description contains the parameter)", "parameters": [ { "in": "path", @@ -467,7 +490,7 @@ "tags": [ "Item Requests for Arcsi" ], - "summary": "Return Items for old WP Show Page", + "summary": "Return all Items for the given Show (was used by the old WP Show Page)", "parameters": [ { "in": "path", @@ -502,7 +525,7 @@ "tags": [ "Item Requests for frontend" ], - "summary": "Return Episode for Ananasz Episode Subpage", + "summary": "Return Item for Ananasz's Episode Subpage", "parameters": [ { "in": "path",