Skip to content

Commit

Permalink
Merge pull request #255 from rosette-api/COMN-325-migrate-javax-to-ja…
Browse files Browse the repository at this point in the history
…karta

COMN-325: Migrate javax.validation to jakarta.validation
  • Loading branch information
juliencherry authored Jul 23, 2024
2 parents 666e848 + 7284ad1 commit 26bba6c
Show file tree
Hide file tree
Showing 23 changed files with 40 additions and 35 deletions.
5 changes: 5 additions & 0 deletions json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>${jakarta-validation-api.version}</version>
</dependency>
<dependency>
<groupId>com.basistech.rosette</groupId>
<artifactId>rosette-api-model</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.JsonNode;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

import com.basistech.rosette.apimodel.recordsimilarity.RecordSimilarityFieldInfo;
import com.basistech.rosette.apimodel.recordsimilarity.records.AddressField;
Expand Down
6 changes: 3 additions & 3 deletions model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<artifactId>common-api</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${javax-validation-api.version}</version>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>${jakarta-validation-api.version}</version>
</dependency>
<dependency>
<groupId>com.basistech</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import java.util.Map;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.basistech.rosette.apimodel;

import com.basistech.rosette.annotations.JacksonMixin;
import javax.validation.constraints.Min;
import jakarta.validation.constraints.Min;
import lombok.Builder;
import lombok.Value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import lombok.Builder;
import lombok.Value;

import javax.validation.Valid;
import jakarta.validation.Valid;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import lombok.Builder;
import lombok.Value;

import javax.validation.Valid;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import jakarta.validation.Valid;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Min;
import java.util.Set;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import lombok.Builder;
import lombok.Value;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;

/**
* language weight used to resolve ambiguous results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import lombok.Builder;
import lombok.Value;

import javax.validation.constraints.Min;
import jakarta.validation.constraints.Min;

/**
* The start and end offset/index for a given mention in a string of text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import lombok.Builder;
import lombok.Value;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

/**
* Class that represents a name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import lombok.Builder;
import lombok.Value;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import lombok.Builder;
import lombok.Value;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

/**
* Request object for name-similarity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import lombok.Builder;
import lombok.Value;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

/**
* Request for name translation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import lombok.Builder;
import lombok.Value;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;

/**
* Options for topics requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
package com.basistech.rosette.apimodel.recordsimilarity;

import com.fasterxml.jackson.annotation.JsonInclude;
import javax.validation.Valid;
import jakarta.validation.Valid;
import lombok.Builder;
import lombok.Value;
import lombok.extern.jackson.Jacksonized;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

@Jacksonized
@Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonInclude;
import javax.validation.Valid;
import jakarta.validation.Valid;
import lombok.Builder;
import lombok.Value;
import lombok.extern.jackson.Jacksonized;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
import java.util.Map;
import com.basistech.rosette.apimodel.recordsimilarity.records.RecordSimilarityField;

import javax.validation.Valid;
import jakarta.validation.Valid;
import lombok.Builder;
import lombok.Value;

import javax.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotEmpty;

@Builder
@Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

import com.basistech.rosette.apimodel.Request;
import com.fasterxml.jackson.annotation.JsonInclude;
import javax.validation.Valid;
import jakarta.validation.Valid;
import lombok.Value;
import lombok.Builder;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import java.util.Map;

@Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import com.basistech.rosette.apimodel.Response;

import javax.validation.Valid;
import jakarta.validation.Valid;

/**
* Response data model for comparison of two records.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import lombok.experimental.SuperBuilder;
import lombok.extern.jackson.Jacksonized;

import javax.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotBlank;

@SuperBuilder
@Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import lombok.experimental.SuperBuilder;
import lombok.extern.jackson.Jacksonized;

import javax.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotBlank;

@SuperBuilder
@Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import lombok.experimental.SuperBuilder;
import lombok.extern.jackson.Jacksonized;

import javax.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotBlank;

@SuperBuilder
@Value
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<properties>
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
<commons-codec.version>1.17.0</commons-codec.version>
<jakarta-validation-api.version>3.1.0</jakarta-validation-api.version>
<java-poet.version>1.13.0</java-poet.version>
<javax-validation-api.version>2.0.1.Final</javax-validation-api.version>
<junit.version>5.9.3</junit.version>
<lombok.version>1.18.34</lombok.version>
<lombok-maven-plugin.version>1.18.20.0</lombok-maven-plugin.version>
Expand Down

0 comments on commit 26bba6c

Please sign in to comment.