[Feature] Support I/O schema
field definition
#245
Labels
project/OGC
Related to OGC testbeds or relavant projects.
triage/conformance
Issue related to fixing/ensuring compliance to specifications.
triage/feature
New requested feature.
Milestone
PR opengeospatial/ogcapi-processes#172 introduces the requirements for
schema
provided in every input and output definition to represent the expected format ofvalue
when submitting inputs and retrieving output results.This field can be easily added for basic types that are defined by Literal I/O and Complex I/O since the type of
value
is always known. The multiplicity viaminOccurs
andmaxOccurs
can also be used to formulate the corresponding JSON schema fields and whether the expectedschema
ofvalue
is a direct value or an array of them. TheAllowedValues
andSupportedValues
definitions can be used to define theenum
values of astring
, if needed, similarly to how it is already resolved to form the CWL payload. Ranges, min/max int/float values require slightly more logic, but should also be solvable with corresponding WPS/CWL parameters.When supporting this feature, the corresponding "Requirements Class"
with "JSON Schema Level"should be added to the conformance list accordingly to how much we support(currently only Level 0).https://github.com/pvretano/ogcapi-processes/blob/issue-170/core/clause_7b_jsonschema.adoc
update: Levels were removed, feature superseded by PR opengeospatial/ogcapi-processes#181
todo
schema
definitionschema
should be optional to remain backward compatible. If provided, it should be used as-is in the resulting process I/O (after validation that it is a proper OpenAPI schema definition).schema
should be required (as per OGC-API). Missing (omitted) explicit specification from deployment, for builtin processes, or already existing processes,schema
should be generated transparently from other I/O metadata to fulfill the requirement.UpdateignoredFormatSchema
to employFileURL
instead ofReferenceURL
since other variants are not publicly accessible nor resolvable by schema validatorsweaver/weaver/wps_restapi/swagger_definitions.py
Lines 575 to 581 in 3ab577b
Removeschema = FormatSchema(missing=drop)
definitions in all[Deploy]Format[MimeType|MediaType]
definitions since the schema will be one level higher, in the I/O definition itself rather than underformats
field.Left for backward compatibility if used by some input that provided more details about the expected schema for a given media-type input/output, but unused.
The text was updated successfully, but these errors were encountered: