Closed Atomicology closed 6 years ago
Is it a safe assumption that the last item in the types
list will always be where we want to take properties from? We won't ever see for example, the errors schema in the last position?
@cbrainerd The errors object is added to the response body schema with a default wrapper, so it will always be the first object in the list. As an additional safeguard, I could verify that the errors
key does not exist in the properties
, but that could potentially exclude a valid response. Thus, I chose to rely on the default behavior for the Platform API.
In the following example POST response body schema, the properties will be pulled from the success object rather than the errors object: