Skip to content

Commit 297604d

Browse files
committed
feat: update pygeoapi configuration for New Mexico water data and remove OpenAPI generation
1 parent 0c904f6 commit 297604d

2 files changed

Lines changed: 4 additions & 19 deletions

File tree

core/pygeoapi-config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ metadata:
2020
identification:
2121
title: Ocotillo OGC API
2222
description: OGC API - Features backed by PostGIS and pygeoapi
23-
keywords: [features, ogcapi, postgis, pygeoapi]
23+
keywords: [features, ogcapi, postgis, pygeoapi, new mexico, water data]
2424
terms_of_service: https://example.com/terms
25-
url: https://example.com
25+
url: https://ocotillo.newmexicowaterdata.org/ogcapi
2626
license:
2727
name: CC-BY 4.0
2828
url: https://creativecommons.org/licenses/by/4.0/
2929
provider:
3030
name: NMBGMR
3131
url: https://geoinfo.nmt.edu
3232
contact:
33-
name: API Support
34-
email: support@example.com
33+
name: NMBGMR Data Team
34+
email: newmexicowaterdata@nmt.edu
3535

3636
resources:
3737
locations:

core/pygeoapi.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -312,18 +312,6 @@ def _write_config(path: Path) -> None:
312312
path.write_text(config, encoding="utf-8")
313313

314314

315-
def _generate_openapi(_config_path: Path, openapi_path: Path) -> None:
316-
openapi = f"""openapi: 3.0.2
317-
info:
318-
title: Ocotillo OGC API
319-
version: 1.0.0
320-
servers:
321-
- url: {_server_url()}
322-
paths: {{}}
323-
"""
324-
openapi_path.write_text(openapi, encoding="utf-8")
325-
326-
327315
def mount_pygeoapi(app: FastAPI) -> None:
328316
if getattr(app.state, "pygeoapi_mounted", False):
329317
return
@@ -334,12 +322,9 @@ def mount_pygeoapi(app: FastAPI) -> None:
334322

335323
pygeoapi_dir = _pygeoapi_dir()
336324
config_path = pygeoapi_dir / "pygeoapi-config.yml"
337-
openapi_path = pygeoapi_dir / "pygeoapi-openapi.yml"
338325
_write_config(config_path)
339-
_generate_openapi(config_path, openapi_path)
340326

341327
os.environ["PYGEOAPI_CONFIG"] = str(config_path)
342-
os.environ["PYGEOAPI_OPENAPI"] = str(openapi_path)
343328

344329
from pygeoapi.starlette_app import APP as pygeoapi_app
345330

0 commit comments

Comments
 (0)