Skip to content

Commit

Permalink
swagger fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tuz666 committed Mar 28, 2022
1 parent 009c762 commit 0741615
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 22 deletions.
6 changes: 5 additions & 1 deletion arcsi/api/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
return shows_schedule_schema.dumps(shows.items)
65 changes: 44 additions & 21 deletions arcsi/static/doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]"
Expand All @@ -19,24 +19,24 @@
],
"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"
},
{
"name": "Item Requests for Arcsi",
"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": {
Expand Down Expand Up @@ -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"
],
Expand All @@ -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",
Expand Down Expand Up @@ -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"
],
Expand All @@ -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}&param={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",
Expand Down Expand Up @@ -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"
],
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
],
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 0741615

Please sign in to comment.