From 5d1431e256e418d7c1de3261260f8c875026ce10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20=C5=BBydek?= Date: Tue, 17 Dec 2024 10:51:58 +0100 Subject: [PATCH] fix: fix invalid case in models --- .changeset/proud-moles-remain.md | 5 +++++ .../java/com/fingerprint/model/DeprecatedGeolocation.java | 2 +- sdk/src/main/java/com/fingerprint/model/Geolocation.java | 2 +- .../java/com/fingerprint/model/RelatedVisitorsResponse.java | 2 +- .../main/java/com/fingerprint/model/VisitorsGetResponse.java | 2 +- template/pojo.mustache | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .changeset/proud-moles-remain.md diff --git a/.changeset/proud-moles-remain.md b/.changeset/proud-moles-remain.md new file mode 100644 index 00000000..0deb5df6 --- /dev/null +++ b/.changeset/proud-moles-remain.md @@ -0,0 +1,5 @@ +--- +"fingerprint-pro-server-api-java-sdk": patch +--- + +Fix invalid phrasing for methods that append to lists in the models diff --git a/sdk/src/main/java/com/fingerprint/model/DeprecatedGeolocation.java b/sdk/src/main/java/com/fingerprint/model/DeprecatedGeolocation.java index a2b638fe..9d5f59b3 100644 --- a/sdk/src/main/java/com/fingerprint/model/DeprecatedGeolocation.java +++ b/sdk/src/main/java/com/fingerprint/model/DeprecatedGeolocation.java @@ -284,7 +284,7 @@ public DeprecatedGeolocation subdivisions(List subdivisi return this; } - public DeprecatedGeolocation addsubdivisionsItem(GeolocationSubdivision subdivisionsItem) { + public DeprecatedGeolocation addGeolocationSubdivisionItem(GeolocationSubdivision subdivisionsItem) { if (this.subdivisions == null) { this.subdivisions = new ArrayList<>(); } diff --git a/sdk/src/main/java/com/fingerprint/model/Geolocation.java b/sdk/src/main/java/com/fingerprint/model/Geolocation.java index 5bb0ac15..99f6cd36 100644 --- a/sdk/src/main/java/com/fingerprint/model/Geolocation.java +++ b/sdk/src/main/java/com/fingerprint/model/Geolocation.java @@ -283,7 +283,7 @@ public Geolocation subdivisions(List subdivisions) { return this; } - public Geolocation addsubdivisionsItem(GeolocationSubdivision subdivisionsItem) { + public Geolocation addGeolocationSubdivisionItem(GeolocationSubdivision subdivisionsItem) { if (this.subdivisions == null) { this.subdivisions = new ArrayList<>(); } diff --git a/sdk/src/main/java/com/fingerprint/model/RelatedVisitorsResponse.java b/sdk/src/main/java/com/fingerprint/model/RelatedVisitorsResponse.java index 30657aa1..0fe1e03b 100644 --- a/sdk/src/main/java/com/fingerprint/model/RelatedVisitorsResponse.java +++ b/sdk/src/main/java/com/fingerprint/model/RelatedVisitorsResponse.java @@ -35,7 +35,7 @@ public RelatedVisitorsResponse relatedVisitors(List relatedVisit return this; } - public RelatedVisitorsResponse addrelatedVisitorsItem(RelatedVisitor relatedVisitorsItem) { + public RelatedVisitorsResponse addRelatedVisitorItem(RelatedVisitor relatedVisitorsItem) { this.relatedVisitors.add(relatedVisitorsItem); return this; } diff --git a/sdk/src/main/java/com/fingerprint/model/VisitorsGetResponse.java b/sdk/src/main/java/com/fingerprint/model/VisitorsGetResponse.java index be8b2b26..ebec7afb 100644 --- a/sdk/src/main/java/com/fingerprint/model/VisitorsGetResponse.java +++ b/sdk/src/main/java/com/fingerprint/model/VisitorsGetResponse.java @@ -73,7 +73,7 @@ public VisitorsGetResponse visits(List visits) { return this; } - public VisitorsGetResponse addvisitsItem(Visit visitsItem) { + public VisitorsGetResponse addVisitItem(Visit visitsItem) { this.visits.add(visitsItem); return this; } diff --git a/template/pojo.mustache b/template/pojo.mustache index ce89dda0..a928e4b4 100644 --- a/template/pojo.mustache +++ b/template/pojo.mustache @@ -128,7 +128,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens } {{#isArray}} - public {{classname}} add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { + public {{classname}} add{{items.datatypeWithEnum}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { {{#vendorExtensions.x-is-jackson-optional-nullable}} if (this.{{name}} == null || !this.{{name}}.isPresent()) { this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{{defaultValue}}});