Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e06273a
Merge pull request #178 from xdev-software/master
AB-xdev Jul 16, 2025
b5ca8b5
Publish to our GitHub Central "repo"
AB-xdev Jul 17, 2025
02651ce
Remove not needed permissions
AB-xdev Jul 17, 2025
d628049
Fix link checker not creating issues
AB-xdev Jul 17, 2025
14f6d8f
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 17, 2025
b277b28
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 17, 2025
3476732
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 17, 2025
45e3f51
Fix typo
AB-xdev Jul 17, 2025
f503c60
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 17, 2025
766c590
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 17, 2025
062dd73
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 17, 2025
7ba5d78
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 18, 2025
00044fb
Update dependency com.fasterxml.jackson:jackson-bom to v2.19.2
xdev-renovate Jul 19, 2025
615373b
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Jul 21, 2025
6720aab
Merge pull request #276 from xdev-software/renovate/com.fasterxml.jac…
AB-xdev Jul 21, 2025
1885f22
Update net.sourceforge.pmd to v7.16.0
xdev-renovate Jul 26, 2025
47d6b36
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Jul 28, 2025
c90e5a2
Merge pull request #176 from xdev-software/renovate/net.sourceforge.pmd
AB-xdev Jul 28, 2025
6bba2c8
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 28, 2025
f288c36
Update dependency org.codehaus.mojo:flatten-maven-plugin to v1.7.2
xdev-renovate Jul 29, 2025
ab27acf
Merge pull request #177 from xdev-software/renovate/org.codehaus.mojo…
AB-xdev Jul 29, 2025
87d4086
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Jul 29, 2025
2afabff
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Aug 4, 2025
12b61ed
Remove unused variable from workflow
AB-xdev Aug 4, 2025
1b28ae4
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 4, 2025
d75370f
[IDEA] Bump checkstyle version
AB-xdev Aug 7, 2025
631ff7d
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 7, 2025
b0f12dc
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 7, 2025
f368480
Update lycheeverse/lychee-action digest to 5c4ee84
xdev-renovate Aug 8, 2025
3849ad7
Update dependency com.puppycrawl.tools:checkstyle to v11
xdev-renovate Aug 8, 2025
0c0b6d7
Merge pull request #179 from xdev-software/renovate/lycheeverse-lyche…
AB-xdev Aug 8, 2025
ee00029
Merge pull request #180 from xdev-software/renovate/com.puppycrawl.to…
AB-xdev Aug 8, 2025
37f7c7a
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 8, 2025
06516dc
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Aug 11, 2025
2fb6cdb
Fixed some incorrectly generated classes for ``additionalProperties: …
AB-xdev Aug 11, 2025
e6a525e
Merge branch 'develop' of https://github.com/xdev-software/brevo-java…
AB-xdev Aug 11, 2025
6c2fff1
Add IdentifierType
AB-xdev Aug 11, 2025
aa8423f
Update IdentifierType.java
AB-xdev Aug 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2
uses: lycheeverse/lychee-action@5c4ee84814c983aa7164eaee476f014e53ff3963 # v2
with:
fail: false # Don't fail on broken links, create an issue instead

Expand All @@ -31,13 +31,13 @@ jobs:
GH_TOKEN: ${{ github.token }}

- name: Close issue if everything is fine
if: env.lychee_exit_code == 0 && steps.find-issue.outputs.number != ''
if: steps.lychee.outputs.exit_code == 0 && steps.find-issue.outputs.number != ''
run: gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }}
env:
GH_TOKEN: ${{ github.token }}

- name: Create Issue From File
if: env.lychee_exit_code != 0
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5
with:
issue-number: ${{ steps.find-issue.outputs.number }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ on:
- 'assets/**'

env:
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo

jobs:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ jobs:
runs-on: ubuntu-latest
needs: [prepare-release]
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

Expand All @@ -121,15 +118,17 @@ jobs:
with: # running setup-java overwrites the settings.xml
distribution: 'temurin'
java-version: '17'
server-id: github-central
server-password: PACKAGES_CENTRAL_TOKEN
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once

- name: Publish to Central Portal
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }}
- name: Publish to GitHub Packages Central
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}

- name: Set up JDK
uses: actions/setup-java@v4
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ jobs:
publish-maven:
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

Expand All @@ -21,14 +18,16 @@ jobs:
with: # running setup-java overwrites the settings.xml
distribution: 'temurin'
java-version: '17'
server-id: github-central
server-password: PACKAGES_CENTRAL_TOKEN
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once

- name: Publish to GitHub Packages
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }}
- name: Publish to GitHub Packages Central
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Set up JDK
Expand Down
2 changes: 1 addition & 1 deletion .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.1.1
* Fixed some incorrectly generated classes for ``additionalProperties: oneOf: ...`` #181

# 1.1.0
* Updated generated code from Brevo's openapi.yml
* Updated references to "new" official Brevo client #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import software.xdev.brevo.IdentifierType;
import software.xdev.brevo.api.ContactsApi;
import software.xdev.brevo.client.ApiClient;
import software.xdev.brevo.client.ApiException;
Expand Down Expand Up @@ -42,7 +43,7 @@ public static void main(final String[] args)
new GetContactInfoIdentifierStringParameter(email);
final GetExtendedContactDetails contactInfo = contactsApi.getContactInfo(
identifier,
null,
IdentifierType.EMAIL,
null,
null);
LOG.info("Got contact[email={},listIds={}]", contactInfo.getEmail(), contactInfo.getListIds());
Expand All @@ -51,7 +52,7 @@ public static void main(final String[] args)
contactsApi.updateContact(
identifier,
new UpdateContact().listIds(List.of(listId)),
null);
IdentifierType.EMAIL);
LOG.info("Updated contact to include listId={}", listId);
}
}
Expand Down
10 changes: 5 additions & 5 deletions brevo-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>2.19.1</version>
<version>2.19.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -223,7 +223,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.7.1</version>
<version>1.7.2</version>
<configuration>
<flattenMode>ossrh</flattenMode>
</configuration>
Expand Down Expand Up @@ -449,7 +449,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.26.1</version>
<version>11.0.0</version>
</dependency>
</dependencies>
<configuration>
Expand Down Expand Up @@ -490,12 +490,12 @@
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>7.15.0</version>
<version>7.16.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>7.15.0</version>
<version>7.16.0</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import software.xdev.brevo.model.CreateDoiContactAttributesValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
Expand Down Expand Up @@ -57,7 +56,7 @@ public class CreateContact {

public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
@jakarta.annotation.Nullable
private Map<String, CreateDoiContactAttributesValue> attributes = new HashMap<>();
private Map<String, Object> attributes = new HashMap<>();

public static final String JSON_PROPERTY_EMAIL_BLACKLISTED = "emailBlacklisted";
@jakarta.annotation.Nullable
Expand Down Expand Up @@ -132,13 +131,13 @@ public void setExtId(@jakarta.annotation.Nullable String extId) {
this.extId = extId;
}

public CreateContact attributes(@jakarta.annotation.Nullable Map<String, CreateDoiContactAttributesValue> attributes) {
public CreateContact attributes(@jakarta.annotation.Nullable Map<String, Object> attributes) {

this.attributes = attributes;
return this;
}

public CreateContact putAttributesItem(String key, CreateDoiContactAttributesValue attributesItem) {
public CreateContact putAttributesItem(String key, Object attributesItem) {
if (this.attributes == null) {
this.attributes = new HashMap<>();
}
Expand All @@ -152,16 +151,16 @@ public CreateContact putAttributesItem(String key, CreateDoiContactAttributesVal
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ATTRIBUTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)

public Map<String, CreateDoiContactAttributesValue> getAttributes() {
public Map<String, Object> getAttributes() {
return attributes;
}


@JsonProperty(JSON_PROPERTY_ATTRIBUTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAttributes(@jakarta.annotation.Nullable Map<String, CreateDoiContactAttributesValue> attributes) {
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public void setAttributes(@jakarta.annotation.Nullable Map<String, Object> attributes) {
this.attributes = attributes;
}

Expand Down Expand Up @@ -412,9 +411,13 @@ public String toUrlQueryString(String prefix) {
// add `attributes` to the URL query string
if (getAttributes() != null) {
for (String _key : getAttributes().keySet()) {
if (getAttributes().get(_key) != null) {
joiner.add(getAttributes().get(_key).toUrlQueryString(String.format("%sattributes%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix))));
try {
joiner.add(String.format("%sattributes%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix),
getAttributes().get(_key), URLEncoder.encode(String.valueOf(getAttributes().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import software.xdev.brevo.model.CreateDoiContactAttributesValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import java.io.UnsupportedEncodingException;
Expand All @@ -51,7 +50,7 @@ public class CreateDoiContact {

public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
@jakarta.annotation.Nullable
private Map<String, CreateDoiContactAttributesValue> attributes = new HashMap<>();
private Map<String, Object> attributes = new HashMap<>();

public static final String JSON_PROPERTY_INCLUDE_LIST_IDS = "includeListIds";
@jakarta.annotation.Nonnull
Expand Down Expand Up @@ -97,13 +96,13 @@ public void setEmail(@jakarta.annotation.Nonnull String email) {
this.email = email;
}

public CreateDoiContact attributes(@jakarta.annotation.Nullable Map<String, CreateDoiContactAttributesValue> attributes) {
public CreateDoiContact attributes(@jakarta.annotation.Nullable Map<String, Object> attributes) {

this.attributes = attributes;
return this;
}

public CreateDoiContact putAttributesItem(String key, CreateDoiContactAttributesValue attributesItem) {
public CreateDoiContact putAttributesItem(String key, Object attributesItem) {
if (this.attributes == null) {
this.attributes = new HashMap<>();
}
Expand All @@ -117,16 +116,16 @@ public CreateDoiContact putAttributesItem(String key, CreateDoiContactAttributes
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ATTRIBUTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)

public Map<String, CreateDoiContactAttributesValue> getAttributes() {
public Map<String, Object> getAttributes() {
return attributes;
}


@JsonProperty(JSON_PROPERTY_ATTRIBUTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAttributes(@jakarta.annotation.Nullable Map<String, CreateDoiContactAttributesValue> attributes) {
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public void setAttributes(@jakarta.annotation.Nullable Map<String, Object> attributes) {
this.attributes = attributes;
}

Expand Down Expand Up @@ -338,9 +337,13 @@ public String toUrlQueryString(String prefix) {
// add `attributes` to the URL query string
if (getAttributes() != null) {
for (String _key : getAttributes().keySet()) {
if (getAttributes().get(_key) != null) {
joiner.add(getAttributes().get(_key).toUrlQueryString(String.format("%sattributes%s%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix))));
try {
joiner.add(String.format("%sattributes%s%s=%s", prefix, suffix,
"".equals(suffix) ? "" : String.format("%s%d%s", containerPrefix, _key, containerSuffix),
getAttributes().get(_key), URLEncoder.encode(String.valueOf(getAttributes().get(_key)), "UTF-8").replaceAll("\\+", "%20")));
} catch (UnsupportedEncodingException e) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}
}
Expand Down
Loading