Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add links for swagger UI and docs to API docs #130

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pv_site_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ 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`](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(",")
Expand Down Expand Up @@ -581,7 +587,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": "[email protected]",
},
Expand Down
Loading