pygeoapi icon indicating copy to clipboard operation
pygeoapi copied to clipboard

Allow building openapi to fail gracefully

Open KoalaGeo opened this issue 3 weeks ago • 3 comments

Is your feature request related to a problem? Please describe. I'm always frustrated when pygeoapi can't find a table which is defined in the config so fails to build the openapi.yml and therefore fails to deploy

Image

Describe the solution you'd like Instead of failing, it should skip that layer and provide a warning, buy still deploy with all the other layers which do work.

KoalaGeo avatar Dec 17 '25 10:12 KoalaGeo

@KoalaGeo keeping a collection in the openapi document even if it doesn't exist and its endpoints active in the server would be problematic, i.e. the logs would be flooded of exceptions. I'm assuming the meaning of skip is to remove the collection from the generated openapi document, is my assumption right?

francbartoli avatar Dec 17 '25 12:12 francbartoli

@KoalaGeo this functionality exists via running pygeoapi openapi generate --no-fail-on-invalid-collection (see note in https://docs.pygeoapi.io/en/latest/administration.html#creating-the-openapi-document). Does this work for you?

tomkralidis avatar Dec 17 '25 13:12 tomkralidis

Not really, we're deploying the built docker image via k8s, so it's ideally be a ENV we could set True/False whichg we'd vary depending is we're playing the dev environments where not all the data might be available vs on prod where you wouldn't want it to deploy if anything wasn't working completely.

KoalaGeo avatar Dec 17 '25 15:12 KoalaGeo