-
Notifications
You must be signed in to change notification settings - Fork 3
Update OpenAPI spec for ticket updated attribute metadata #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| id: [2] | ||
| label: ["photo.png"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these arrays because attributes can be arrays? Or what's the reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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