From 3e0a386674032714c33666dca3f96616f3c44790 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 27 Nov 2023 12:52:51 +0100 Subject: [PATCH 1/3] add links for swagger UI and docs --- pv_site_api/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pv_site_api/main.py b/pv_site_api/main.py index 5750b51..2768fba 100644 --- a/pv_site_api/main.py +++ b/pv_site_api/main.py @@ -97,7 +97,11 @@ def is_fake(): folder = os.path.dirname(os.path.abspath(__file__)) description = """ -Description of PV Site API +The Quartz Solar PV Site API generates site-specific pv forecasts for users. + +This API is built with [FastAPI](https://fastapi.tiangolo.com/), offering +users the options to both try API routes with the [`/swagger`](/swagger) UI +and read documentation with the sleek Redocs layout at [`/docs`](/docs). """ origins = os.getenv("ORIGINS", "*").split(",") @@ -581,7 +585,7 @@ def custom_openapi(): version=pv_site_api.__version__, description=description, contact={ - "name": "Nowcasting by Open Climate Fix", + "name": "Quartz Solar by Open Climate Fix", "url": "https://quartz.solar", "email": "info@openclimatefix.org", }, From f23bc13ea37276a31d22758a9fd5cd3605621b82 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 27 Nov 2023 13:19:01 +0100 Subject: [PATCH 2/3] point links towards production api --- pv_site_api/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pv_site_api/main.py b/pv_site_api/main.py index 2768fba..883325b 100644 --- a/pv_site_api/main.py +++ b/pv_site_api/main.py @@ -100,8 +100,9 @@ def is_fake(): The Quartz Solar PV Site API generates site-specific pv forecasts for users. This API is built with [FastAPI](https://fastapi.tiangolo.com/), offering -users the options to both try API routes with the [`/swagger`](/swagger) UI -and read documentation with the sleek Redocs layout at [`/docs`](/docs). +users the options to both try API routes with the [`/swagger`](https://api-site.quartz.solar/swagger) UI +and read the [`/docs`](https://api-site.quartz.solar/docs) with the sleeker +Redocs layout. The information is the same in both places. """ origins = os.getenv("ORIGINS", "*").split(",") From 1980020e990a9da508fdf9afb8083c4dcb572a44 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 27 Nov 2023 13:21:23 +0100 Subject: [PATCH 3/3] fix linting error --- pv_site_api/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pv_site_api/main.py b/pv_site_api/main.py index 883325b..01a233a 100644 --- a/pv_site_api/main.py +++ b/pv_site_api/main.py @@ -100,9 +100,10 @@ def is_fake(): The Quartz Solar PV Site API generates site-specific pv forecasts for users. This API is built with [FastAPI](https://fastapi.tiangolo.com/), offering -users the options to both try API routes with the [`/swagger`](https://api-site.quartz.solar/swagger) UI +users the options to both try API routes with the +[`/swagger`](https://api-site.quartz.solar/swagger) UI and read the [`/docs`](https://api-site.quartz.solar/docs) with the sleeker -Redocs layout. The information is the same in both places. +Redocs layout. The information is the same in both places. """ origins = os.getenv("ORIGINS", "*").split(",")