From 2e45f4d7ea1a6378bcf4039081dbe8225a297876 Mon Sep 17 00:00:00 2001 From: Vadzim Hushchanskou Date: Thu, 28 Nov 2024 16:49:32 +0300 Subject: [PATCH] Client version update, Constants update --- CHANGELOG.md | 4 ++++ gradle.properties | 2 +- .../epam/reportportal/formatting/http/Constants.java | 11 ++++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c25a92a..c237227 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## [Unreleased] +### Added +- New Json and Text types to `Constants` class, by @HardNorth +### Changed +- Client version updated on [5.2.23](https://github.com/reportportal/client-java/releases/tag/5.2.23), by @HardNorth ## [5.2.3] ### Changed diff --git a/gradle.properties b/gradle.properties index 49c64f1..8033d51 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ description=Report Portal Java formatting utils for Agents and Loggers junit5_version=5.6.3 junit5_runner_version=1.6.3 mockito_version=4.5.1 -client_version=5.2.13 +client_version=5.2.23 jsr305_version=3.0.2 scripts_url=https://raw.githubusercontent.com/reportportal/gradle-scripts scripts_branch=master diff --git a/src/main/java/com/epam/reportportal/formatting/http/Constants.java b/src/main/java/com/epam/reportportal/formatting/http/Constants.java index 807847b..fe4fba8 100644 --- a/src/main/java/com/epam/reportportal/formatting/http/Constants.java +++ b/src/main/java/com/epam/reportportal/formatting/http/Constants.java @@ -52,7 +52,13 @@ public class Constants { ContentType.TEXT_PLAIN, ContentType.TEXT_HTML, ContentType.TEXT_XML, - ContentType.APPLICATION_XML + ContentType.APPLICATION_XML, + ContentType.APPLICATION_SOAP_XML, + ContentType.APPLICATION_ATOM_XML, + // Can't use ContentType.TEXT_JSON, etc. because client-java dependency marked as compileOnly + "text/json", + "application/x.reportportal.launch.v2+json", + "application/x.reportportal.test.v2+json" ))); public static final Set FORM_TYPES = Collections.singleton(ContentType.APPLICATION_FORM_URLENCODED); @@ -72,7 +78,10 @@ public class Constants { put(ContentType.APPLICATION_XHTML_XML, XmlPrettier.INSTANCE); put(ContentType.TEXT_XML, XmlPrettier.INSTANCE); put(ContentType.APPLICATION_JSON, JsonPrettier.INSTANCE); + // Can't use ContentType.TEXT_JSON, etc. because client-java dependency marked as compileOnly put("text/json", JsonPrettier.INSTANCE); + put("application/x.reportportal.launch.v2+json", JsonPrettier.INSTANCE); + put("application/x.reportportal.test.v2+json", JsonPrettier.INSTANCE); put(ContentType.TEXT_HTML, HtmlPrettier.INSTANCE); }});