Check validity of syncronous execution response schema
bpross-52n opened this issue · comments
The validity of the synchronous execute response schema should be checked.
It containes a oneOf
construct including types string
and also the results.yaml schema. Further down the road (inlineOrRefData.yaml -> inputValueNoObject.yaml) appears another oneOf
construct including again the type string
.
This seems to cause an issue with validation, as a string
result can be validated against two schemas.
The issue (if it is one) would also affect the current draft schemas. The SWG should check, whether this is an issue in the schemas and if yes, how to fix it.
More background information:
Validation using openapi4j version 1.0.7 in the Executable Test Suite throws unexpected errors.
The error message is
More than 1 schema is valid. (code: 1023) From: body.<oneOf>
See also: opengeospatial/ets-ogcapi-processes10#54
@bpross-52n Isn't this the issue we discussed recently in the SWG?
Using anyOf
instead of oneOf
is how we've addressed such issue in the past e.g., in Tiles (we had to do a post-release schema update to fix this). It will validate even if two of the options are valid, and so can be used if this should not be flagged as an issue -- if there is no other way to express the schema without over-complicating things. I think we discussed that might be a potential solution here as well?
@jerstlouis Yes, we discussed this. I created the issue for documentary purposes.
SWG meeting from 2024-05-27: Change the anyOf to oneOf in the schema.