-
Notifications
You must be signed in to change notification settings - Fork 48
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
JSON schemas for endpoints #29
Comments
Also note that |
The OpenAPI basically contains a Schema. Why not validate against the OpenAPI file? |
@m-mohr I was wondering if that would work, but wasn't sure...can we use existing validator that you wrote? Would it validate each Item in a search response as well? |
There are OpenAPI validators out there, we use a Go-based one in openEO, but it seems not that easy than JSON Schema validation.
No, OpenAPI Schema still slightly diverges from JSON Schema and OpenAPI has more things to be checked (e.g. headers).
No, but a OpenAPI tool would do some checks. Issue is that the OpenAPI is not as detailed as our JSON Schemas (common metadata and extensions are missing for example), but on the other hand it would be a pain to (create and) update both JSON Schemas and OpenAPI files. In the long run we really need JSON Schema support in OpenAPI: https://apisyouwonthate.com/blog/openapi-v31-and-json-schema-2019-09 Related to #8, too |
Do not need to duplicate info in JSON Schemas and Open API. API will define responses in Open API docs, not JSON Schema |
@matthewhanson Yes, it does that since today. |
/ returns a STAC catalog
/collections/{cid} returns a Collection
/collections/{cid}/items/{id} returns an Item
So those can all be validated with the schemas in stac-spec
However:
/collections
/collections/{cid}/items
/search
Don't have any schemas and so can't be validated, those should be added here.
Related to #25
The text was updated successfully, but these errors were encountered: