Skip to content

Commit d135eab

Browse files
committed
Bugfix - Article.contentTagIds field now List<String> - resolves #581
The Article.contentTagIds field had been added with the incorrect type of List<Long> (because of misleading Zendesk documentation), but the IDs are actually `String`s & so can't be deserialised to Longs
1 parent 2c114cf commit d135eab

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/org/zendesk/client/v2/model/hc/Article.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class Article implements SearchResultEntity {
4242

4343
/** The list of content tags attached to the article */
4444
@JsonProperty("content_tag_ids")
45-
private List<Long> contentTagIds;
45+
private List<String> contentTagIds;
4646

4747
/** Whether the source (default) translation of the article is out of date */
4848
private Boolean outdated;
@@ -170,11 +170,11 @@ public void setCommentsDisabled(Boolean commentsDisabled) {
170170
this.commentsDisabled = commentsDisabled;
171171
}
172172

173-
public List<Long> getContentTagIds() {
173+
public List<String> getContentTagIds() {
174174
return contentTagIds;
175175
}
176176

177-
public void setContentTagIds(List<Long> contentTagIds) {
177+
public void setContentTagIds(List<String> contentTagIds) {
178178
this.contentTagIds = contentTagIds;
179179
}
180180

src/test/java/org/zendesk/client/v2/model/ArticleTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void testParseArticle() {
3232
"\"html_url\":\"https://example.zendesk.com/hc/en-us/articles/918273645013-Welcome-to-your-Help-Center-\"," +
3333
"\"author_id\":2314596780," +
3434
"\"comments_disabled\":false," +
35-
"\"content_tag_ids\": [335, 7104]," +
35+
"\"content_tag_ids\": [\"01GMAGH6KPDHEY79MN3S4H8V7D\", \"01GFXGBX7YZ9ASWTCVMASTK8ZS\"]," +
3636
"\"draft\":false," +
3737
"\"promoted\":false," +
3838
"\"position\":0," +
@@ -59,7 +59,7 @@ public void testParseArticle() {
5959
assertEquals("https://example.zendesk.com/hc/en-us/articles/918273645013-Welcome-to-your-Help-Center-", article.getHtmlUrl());
6060
assertEquals((Long) 2314596780L, article.getAuthorId());
6161
assertEquals(false, article.getCommentsDisabled());
62-
assertEquals(Arrays.asList(335L, 7104L), article.getContentTagIds());
62+
assertEquals(Arrays.asList("01GMAGH6KPDHEY79MN3S4H8V7D","01GFXGBX7YZ9ASWTCVMASTK8ZS"), article.getContentTagIds());
6363
assertEquals(false, article.getDraft());
6464
assertEquals(false, article.getPromoted());
6565
assertEquals((Long) 0L, article.getPosition());

0 commit comments

Comments
 (0)