Skip to content

Potential KVP output[include] ambiguity #552

@fmigneault

Description

@fmigneault

Context

Requirement https://github.com/opengeospatial/ogcapi-processes/blob/master/core/requirements/kvp-execute/REQ_output.adoc defines the required include parameter that controls whether the output should be included or not in the result. However, it is not clear (or rather not explicit enough) what should happen when the output is not provided at all.


For example, a process that defines output1 and output2.

Case 1

If ?output1[include]=true is specified, what should happen?
Only output1 is returned, and output2 defaults to include=false? (makes sense IMO)
Seems to align with the JSON {"outputs": {"output1": {}}} that requests output1 explicitly and ignores output2.

Case 2

However, if none of the outputs were specified at all (no KVP with {outputID}[include] specified, only inputs provided), should all outputs be omitted automatically? In JSON, requesting an "empty outputs" requires explicitly {"outputs": {}}. Such an explicit "no output" request could be achieved with the very verbose ?output1[include]=false&output2[include]=false.

Omitting the outputs field entirely in JSON means include all outputs.
This is opposite to KVP that requires to list all of them to be included.


Therefore, we have a mixed behaviour. In Case 1, omitting output2 does not include it in the result, while Case 2 is up to interpretation.
The "request pattern" is not exactly the same between JSON / KVP approaches and can cause confusion.

The problem seems to be that [include] does not define a default.

If default=false was indicated, it would mean that there is no convenience "omit outputs == include all outputs", and that they must all be explicitly added with {outputID}[include]=true. That is perfectly fine (and seems to be what https://github.com/opengeospatial/ogcapi-processes/blob/master/core/sections/clause_16_kvp-execute.adoc showcases by listing them all), but that should be explicitly stated in https://github.com/opengeospatial/ogcapi-processes/blob/master/core/requirements/kvp-execute/REQ_output.adoc (or a separate /req/kvp-execute/output-include?) just to be sure about the intent.

Not having the requirement opens the door to default=true, which would mean any request not explicitly listing all outputs with [include]=false would end up with certain outputs to be returned.

Defining the default also indicates the intended approach. Do we list "everything we want" or "everything we don't want". In spirit of usual "filtering" queries, "everything we want" seems more natural.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions