Skip to content

Commit

Permalink
Merge pull request #101 from aodn/bugs/6095-fetch-item-error
Browse files Browse the repository at this point in the history
Missing update constructor cause some record failed, use annotation i…
  • Loading branch information
HavierD authored Dec 10, 2024
2 parents 0a9e6e8 + 442bce7 commit 1744e39
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
package au.org.aodn.ogcapi.server.core.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

//https://github.com/stac-extensions/contacts?tab=readme-ov-file#address-object
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AddressModel {

@JsonProperty("delivery_point")
Expand All @@ -21,14 +27,4 @@ public class AddressModel {
@JsonProperty("postal_code")
protected String postalCode;
protected String country;


// for testing usage
public AddressModel(List<String> deliveryPoint, String city, String administrativeArea, String postalCode, String country) {
this.deliveryPoint = deliveryPoint;
this.city = city;
this.administrativeArea = administrativeArea;
this.postalCode = postalCode;
this.country = country;
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
package au.org.aodn.ogcapi.server.core.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

//https://github.com/stac-extensions/contacts?tab=readme-ov-file#info-object
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class InfoModel {
protected String value;
protected List<String> roles;
Expand Down

0 comments on commit 1744e39

Please sign in to comment.