Skip to content

Commit

Permalink
Merge pull request #12 from openearthplatforminitiative/fix/redoc-error
Browse files Browse the repository at this point in the history
fix:redoc-error
  • Loading branch information
A-Stangeland authored Dec 13, 2023
2 parents eca3340 + 0926a1c commit 9956023
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deforestation_api/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async def lifespan(deforestation_app: FastAPI):
@app.get("/redoc", include_in_schema=False)
def redoc():
return get_redoc_html(
openapi_url="/openapi.json",
openapi_url=f"{settings.api_root_path}/openapi.json",
title="Deforestation API",
redoc_favicon_url="https://www.openepi.io/favicon.ico",
)
Expand Down
2 changes: 1 addition & 1 deletion deforestation_api/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Settings(BaseSettings):
lossyear_data_path: str = (
"s3://databricks-data-openepi/deforestation/lossyear.parquet"
)
api_root_path: str = "/"
api_root_path: str = ""
api_description: str = 'This is a RESTful service that provides aggregated deforestation data over the period from 2001 to 2022 based on data provided by <a href="https://glad.umd.edu/">Global Land Analysis and Discovery (GLAD)</a> laboratory at the University of Maryland, in partnership with <a href="https://www.globalforestwatch.org/">Global Forest Watch (GFW)</a>. The data are freely available for use under a <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.<br/><i>Citation: Hansen, M. C., P. V. Potapov, R. Moore, M. Hancher, S. A. Turubanova, A. Tyukavina, D. Thau, S. V. Stehman, S. J. Goetz, T. R. Loveland, A. Kommareddy, A. Egorov, L. Chini, C. O. Justice, and J. R. G. Townshend. 2013. High-Resolution Global Maps of 21st-Century Forest Cover Change. Science 342 (15 November): 850-53. Data available on-line from: <a href="https://glad.earthengine.app/view/global-forest-change">https://glad.earthengine.app/view/global-forest-change</a></i>.<br/><br/>The data provided by the `basin` endpoint are aggregated over river basin polygons provided by <a href="https://www.hydrosheds.org/products/hydrobasins">HydroSHEDS</a>. The basin data are feely available for non-commercial and commercial use under a licence agreement included in the <a href="https://data.hydrosheds.org/file/technical-documentation/HydroSHEDS_TechDoc_v1_4.pdf">HydroSHEDS Technical Documentation</a>.'

api_domain: str = "localhost"
Expand Down
4 changes: 2 additions & 2 deletions deployment/kubernetes/deforestation-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ spec:
app: deforestation-api
spec:
containers:
- image: ghcr.io/openearthplatforminitiative/deforestation-api:0.2.0
- image: ghcr.io/openearthplatforminitiative/deforestation-api:0.2.1
name: deforestation-api
ports:
- containerPort: 8080
env:
- name: API_ROOT_PATH
value: "/deforestation"
- name: VERSION
value: 0.2.0
value: 0.2.1
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit 9956023

Please sign in to comment.