crim-ca / weaver

Weaver: Workflow Execution Management Service (EMS); Application, Deployment and Execution Service (ADES); OGC API - Processes; WPS; CWL Application Package
https://pavics-weaver.readthedocs.io
Apache License 2.0
24 stars 6 forks source link

Resolve and improve schema references in generated OpenAPI endpoint and API JSON responses #525

Open fmigneault opened 1 year ago

fmigneault commented 1 year ago

Describe the bug

Multiple schema references are inconsistent or broken due to OGC API repository restructures.

Original references should be used for corresponding schemas. Specific references for OGC API - Processes should be resolved.

All responses from Weaver should include a $schema reference to help machine-readable parsing and validation.

Optionally, nested objects could also offer some $schema references when those are useful for understanding the definitions. For example, a schema field under a Process Description I/O uses JSON-schema specification to describe it. Adding $schema: http://json-schema.org/draft-07/schema# scoped under that I/O would greatly facilitate parsing that nested object by itself without having to resolve the full parent schema that contains it.

References