You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're attempting to migrate to this SDK version, but creating a comment doesn't seem to be working correctly.
Here's the snippet of code (Kotlin) we're using to perform this action:
// ticketId - the ticket to make a comment for// customerAccountToken - specific merge account token for a specific install// vendorMarkdownCommentBody - markdown that the ticketing vendor accept and displays nicelyval mergeClient =MergeApiClient.builder().apiKey(properties.apiKey).build()
val ticketingClient = mergeClient.ticketing()
val ticketsClient = ticketingClient.tickets()
val existingTicket = ticketsClient.retrieve(
ticketId, TicketsRetrieveRequest.builder().build(),
RequestOptions.builder().accountToken(customerAccountToken).build()
)
val commentsClient = ticketingClient.comments()
val createCommentRequest =CommentEndpointRequest.builder()
.model(
CommentRequest.builder()
// pass back in the whole 'existingTicket' object - `tags` is an (empty) array of string on this `Ticket` object
.ticket(CommentRequestTicket.of(existingTicket))
.body(vendorMarkdownCommentBody)
.build())
.build()
// this blows up with a 400 from us to merge.val createdComment = commentsClient.create(
createCommentRequest,
RequestOptions.builder().accountToken(customerAccountToken).build()
)
Here's the request / response that is being generated and received.
{
"warnings": [],
"errors": [
{
"source": {
"pointer": "model/ticket/tags"
},
"title": "Incorrect Field Type",
"detail": "Incorrect type for tags - expected type string, but got type array",
"problem_type": "INCORRECT_FIELD_TYPE"
}
]
}
From the SDK, tags is an empty array, so, either the API needs to accept the empty array, or the SDK needs to stringify? the array / or not send for this request?
The text was updated successfully, but these errors were encountered:
@Bwvolleyball thanks for filing this issue -- this will require Merge to update their OpenAPI spec and regenerate the SDKs. We'll follow up when a fix is live!
We're attempting to migrate to this SDK version, but creating a comment doesn't seem to be working correctly.
Here's the snippet of code (Kotlin) we're using to perform this action:
Here's the request / response that is being generated and received.
Request:
Response:
From the SDK, tags is an empty array, so, either the API needs to accept the empty array, or the SDK needs to stringify? the array / or not send for this request?
The text was updated successfully, but these errors were encountered: