opengeospatial / ets-ogcapi-processes10

Other
3 stars 3 forks source link

Confused expectations regarding number of outputs #60

Closed jerstlouis closed 10 months ago

jerstlouis commented 1 year ago

Describe the bug The ETS is confused about how many outputs to expect. It sends the following execution request for its Job Creation Input Ref and/or Job Creation Input Validation test:

{
    "id": "echo",
    "inputs": {
        "stringInput": "teststring",
        "dateInput": "teststring",
        "imagesInput": "teststring"
    },
    "outputs": {
        "stringOutput": { "transmissionMode": "value" },
        "measureOutput": { "transmissionMode": "value" },
        "dateOutput": { "transmissionMode": "value" },
        "doubleOutput": { "transmissionMode": "value" },
        "arrayOutput": { "transmissionMode": "value" },
        "complexObjectOutput": { "transmissionMode": "value" },
        "boundingBoxOutput": { "transmissionMode": "value" },
        "imagesOutput": { "transmissionMode": "value" }
    }
}

The default response mode is raw, and this execution request selects 8 outputs, therefore the Standard says that the response Content-Type should be multipart/related.

Yet the ETS reports errors on a multipart/related response:

java.lang.AssertionError: Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value at [Source: (String)" --MultipleParts Content-Type: text/plain Content-ID: imagesOutput teststring --MultipleParts Content-Type: text/plain Content-ID: stringOutput teststring --MultipleParts-- "; line: 2, column: 3]

It is also unhappy if returning the response as application/json (document), with the error:

java.lang.AssertionError: body: More than 1 schema is valid. (code: 1023) From: body.<oneOf> expected [true] but found [false]

as previously reported in #54.

It is also unhappy if returning only a stringOutput either as plain text:

java.lang.AssertionError: Unrecognized token 'teststring': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') 

or as a double-quoted application/json string:

java.lang.AssertionError: body: More than 1 schema is valid. (code: 1023) From: body.<oneOf> expected [true] but found [false]

Expected behavior