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

Issue 221 wfs3 Probe: OpenAPI spec validator for /api endpoint #253

Merged
merged 2 commits into from Jun 11, 2019

Conversation

@justb4
Copy link
Member

commented Jun 9, 2019

This PR adds an OpenAPI Validator that checks the OpenAPI spec file returned by the WFS3 /api endpoint.
The Probe is relatively simple as all work is done by: https://github.com/p1c2u/openapi-spec-validator.

@justb4 justb4 added the enhancement label Jun 9, 2019

@justb4 justb4 added this to the Version 0.6.0 milestone Jun 9, 2019

@justb4 justb4 requested a review from tomkralidis Jun 9, 2019

@justb4 justb4 self-assigned this Jun 9, 2019

@tomkralidis

This comment has been minimized.

Copy link
Member

commented Jun 9, 2019

Thanks @justb4. What's the impact of adding an OpenAPI document validator to GHC (for example, in parallel, do we validate Capabilities XML for current OGC standards)? In addition, is the validator authoritative? Is there something we can leverage from SwaggerHub?

@justb4

This comment has been minimized.

Copy link
Member Author

commented Jun 10, 2019

@tomkralidis see discussion here: geopython/pygeoapi#168
I think an OpenAPI validator is very useful, though indeed it must be authoritative. Also the Probe itself is optional to use (it is specific to (the /api endpoint of WFS3/Features now), but I could imagine a generic version for any OAS endpoint WWW:Link Resource type, possibly even versioned. btw only the ldproxy endpoints do currently validate (but they have no Processes) all other WFS3 endpoints do not validate.

For GetCapabilities GHC runs several validations as Checks: like XML parsing and certain keywords, but not yet schema-validation, but that could be an additional Check.

@tomkralidis

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

Fair enough. +1 as an optional check. Having said this, once we figure out the OGC short names for the new generation of specs, we should be using those (OGC-API-Features:1.0) which ties to the root URL of the WFS3, as opposed to registering an OpenAPI document to GHC.

@justb4

This comment has been minimized.

Copy link
Member Author

commented Jun 11, 2019

I take this that we can merge? "Optional" here means: one can choose to (not) use the new WFS3OpenAPIValidator. The default Probe (assigned when WFS3 Resource added) remains the WFS3Drilldown Probe with basic checks.

@tomkralidis tomkralidis merged commit 9f1818e into master Jun 11, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@tomkralidis tomkralidis deleted the issue-221-wfs3 branch Jun 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.