Update OpenAPI spec for ticket updated attribute metadata#268
Update OpenAPI spec for ticket updated attribute metadata#268sametozcan merged 2 commits intomainfrom
Conversation
| id: [2] | ||
| label: ["photo.png"] |
There was a problem hiding this comment.
Are these arrays because attributes can be arrays? Or what's the reason?
There was a problem hiding this comment.
Yes. There are different kind of attributes and the way we have the ID and label can slightly differe in different cases. See examples here
Mainly, file attributes can hold multiple files in a single attribute. That's the reason arrays are used there if the attribute is a file attribute.
There was a problem hiding this comment.
In the case of an attribute is cleared,
idcan either be null or an empty array (for file attribute)labelcan either be an empty string or empty array (for file attribute)
There was a problem hiding this comment.
Does the type field not change depending on if it's an array or single value? Or does the client need to check for array or single value each time?
There was a problem hiding this comment.
Currently type only returns attribute. We can add some extra queries to find the actual type of the attribute and use that as the type so the client would know what to expect there.
Alternatively the client can query that separately if they want to know the type of the attribute for that ticket type.
There was a problem hiding this comment.
Let's wait to hear from the customer so we can improve that furthermore.
steve-henry
left a comment
There was a problem hiding this comment.
Approving as this matches the current API behaviour.
Left one non-blocking question around array vs single value
We have added a new filed to
Ticket Partto share the updated attribute data within the webhook response.Towards https://github.com/intercom/intercom/pull/407086