Skip to content
Snippets Groups Projects
Verified Commit a2721630 authored by Tobias Grantner's avatar Tobias Grantner
Browse files

Specified uri as ID in ConceptDto and UnitDto and enabled=false option for certain fields

parent 215b3ce7
No related branches found
No related tags found
6 merge requests!231CI: Remove build for log-service,!228Better error message handling in the frontend,!223Release of version 1.4.0,!177Updated keycloak realms to only allow creation of containers for developers,...,!176Hotfix views,!167Specified uri as ID in ConceptDto and UnitDto and enabled=false option for certain fields
......@@ -9,6 +9,7 @@ import lombok.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.extern.jackson.Jacksonized;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
......@@ -25,6 +26,8 @@ import java.util.List;
@Document(indexName = "concept")
public class ConceptDto {
@Id
@Field(name = "id")
@NotBlank
private String uri;
......@@ -33,11 +36,9 @@ public class ConceptDto {
private String description;
@NotNull
@Field(enabled = false)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", timezone = "UTC")
private Instant created;
@NotNull
@Field(enabled = false)
private List<ColumnBriefDto> columns;
}
......@@ -7,6 +7,7 @@ import lombok.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.extern.jackson.Jacksonized;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
......@@ -23,6 +24,8 @@ import java.util.List;
@Document(indexName = "unit")
public class UnitDto {
@Id
@Field(name = "id")
@NotBlank
private String uri;
......@@ -31,11 +34,9 @@ public class UnitDto {
private String description;
@NotNull
@Field(enabled = false)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", timezone = "UTC")
private Instant created;
@NotNull
@Field(enabled = false)
private List<ColumnBriefDto> columns;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment