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:
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
The ETS should check the response Content-Type against what it expects and never even attempt to parse a Content-Type that it did not expect as the Content-Type it did expect (application/json,text/plain, multipart/related, application/octet-stream...).
The multipart/related response should be accepted as valid in this case.
The number of expected outputs (which unfortunately potentially changes the Content-Type raw response in 1.0) should NOT depend on the number of inputs supplied. If 8 outputs are requested, and 3 inputs are supplied to the Echo process, the Echo process can return null values but should still return 8 outputs, at least in terms of the selection of the raw response mode (multipart/related vs. single raw output).
This also applies to the default execution where outputs is omitted. All outputs declared in the process description should be returned, even if a single input is supplied, so a raw response in this case would need to be multipart/related.
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:
The default response mode is raw, and this execution request selects 8 outputs, therefore the Standard says that the response
Content-Type
should bemultipart/related
.Yet the ETS reports errors on a
multipart/related
response:It is also unhappy if returning the response as
application/json
(document), with the error:as previously reported in #54.
It is also unhappy if returning only a stringOutput either as plain text:
or as a double-quoted
application/json
string:Expected behavior
Content-Type
against what it expects and never even attempt to parse a Content-Type that it did not expect as the Content-Type it did expect (application/json
,text/plain
,multipart/related
,application/octet-stream
...).multipart/related
response should be accepted as valid in this case.multipart/related
vs. single raw output).outputs
is omitted. All outputs declared in the process description should be returned, even if a single input is supplied, so araw
response in this case would need to bemultipart/related
.