Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the dependencies group with 3 updates #516

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
2 changes: 1 addition & 1 deletion htmx-nima-jstache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-inject</artifactId>
<version>10.5</version>
<version>11.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions http-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-inject</artifactId>
<version>10.5</version>
<version>11.0</version>
<optional>true</optional>
</dependency>

Expand Down Expand Up @@ -99,7 +99,7 @@
<path>
<groupId>io.avaje</groupId>
<artifactId>avaje-inject-generator</artifactId>
<version>10.5</version>
<version>11.0</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion http-hibernate-validator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-inject</artifactId>
<version>10.1</version>
<version>11.0</version>
<scope>provided</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion http-inject-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-inject</artifactId>
<version>10.5</version>
<version>11.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<assertj.version>3.26.3</assertj.version>
<jackson.version>2.18.1</jackson.version>
<jex.version>2.5</jex.version>
<avaje-inject.version>10.5</avaje-inject.version>
<avaje-inject.version>11.0</avaje-inject.version>
<nima.version>4.1.4</nima.version>
<javalin.version>6.3.0</javalin.version>
</properties>
Expand Down
25 changes: 19 additions & 6 deletions tests/test-javalin-jsonb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,22 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-hibernate-validator</artifactId>
<version>3.5-RC3</version>
</dependency>

<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-validator</artifactId>
<version>2.3</version>
</dependency>

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-validator-constraints</artifactId>
<version>2.3</version>
</dependency>

<!-- java annotation processors -->
Expand Down Expand Up @@ -89,6 +95,13 @@
<version>2.3</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-validator-generator</artifactId>
<version>2.3</version>
</dependency>


<!-- test dependencies -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import java.util.List;
import java.util.Set;

import org.jetbrains.annotations.NotNull;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like the incorrect import? Should it be io.avaje.validation.constraints.NotNull ?


import io.avaje.http.api.Header;
import io.avaje.http.api.Ignore;
import io.avaje.http.api.QueryParam;
import io.avaje.jsonb.Json;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import io.avaje.validation.constraints.Email;
import io.avaje.validation.constraints.Size;
import io.avaje.validation.constraints.Valid;

@Json
@Valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

import java.time.LocalDate;

import org.hibernate.validator.constraints.URL;

import io.avaje.http.api.Valid;
import io.avaje.jsonb.Json;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import io.avaje.validation.constraints.Email;
import io.avaje.validation.constraints.Future;
import io.avaje.validation.constraints.NotNull;
import io.avaje.validation.constraints.Size;
import io.avaje.validation.constraints.URI;

@Json
@Valid
Expand All @@ -22,10 +21,12 @@ public class HelloForm {
@Email
@Size(max = 100)
String email;
@URL
private String url;
@Future
public LocalDate startDate;

@URI
private String url;

@Future
public LocalDate startDate;

public HelloForm(String name, String email) {
this.name = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void hello() {
@Test
void hello2() {

TypeRef<List<HelloDto>> listDto = new TypeRef<List<HelloDto>>() { };
TypeRef<List<HelloDto>> listDto = new TypeRef<>() { };
final List<HelloDto> beans = given()
.get(baseUrl + "/hello")
.then()
Expand All @@ -64,7 +64,7 @@ void hello2() {

@Test
void helloAsyncRequestHandling() {
TypeRef<List<HelloDto>> listDto = new TypeRef<List<HelloDto>>() { };
TypeRef<List<HelloDto>> listDto = new TypeRef<>() { };
final List<HelloDto> beans = given()
.get(baseUrl + "/hello/async")
.then()
Expand Down Expand Up @@ -207,8 +207,6 @@ void postForm_validation_expect_badRequest() {
.as(ErrorResponse.class);

assertNotNull(res);
assertThat(res.getMessage()).contains("failed validation");
assertThat(res.get("url")).isEqualTo("must be a valid URL");
assertThat(res.get("name")).isEqualTo("must not be null");

try {
Expand All @@ -227,7 +225,7 @@ void postForm_validation_expect_badRequest() {
assertEquals(422, httpResponse.statusCode());

final ErrorResponse errorResponse = e.bean(ErrorResponse.class);
assertThat(errorResponse.get("url")).isEqualTo("must be a valid URL");
assertThat(res.get("name")).isEqualTo("must not be null");
assertThat(errorResponse.get("name")).isEqualTo("must not be null");
}
}
Expand Down
16 changes: 14 additions & 2 deletions tests/test-javalin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-hibernate-validator</artifactId>
<version>3.5-RC3</version>
<artifactId>avaje-validator</artifactId>
<version>2.3</version>
</dependency>

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-validator-constraints</artifactId>
<version>2.3</version>
</dependency>

<dependency>
Expand All @@ -81,6 +87,12 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-validator-generator</artifactId>
<version>2.3</version>
</dependency>


<!-- test dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.info.Info;

@InjectModule(name = "app", requires = Validator.class)
@InjectModule(name = "app")
@OpenAPIDefinition(info = @Info(title = "Example service", description = "Example Javalin controllers with Java and Maven"))
public class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.example.myapp.web;

import jakarta.validation.Valid;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import io.avaje.validation.constraints.Email;
import io.avaje.validation.constraints.NotNull;
import io.avaje.validation.constraints.Size;
import io.avaje.validation.constraints.Valid;

@Valid
public class GetBeanForm {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import io.avaje.http.api.Post;
import io.avaje.http.api.Produces;
import io.avaje.http.api.QueryParam;
import io.avaje.http.api.Valid;
import io.javalin.http.Context;
import io.swagger.v3.oas.annotations.Hidden;
import jakarta.inject.Inject;
import jakarta.validation.Valid;

/**
* Hello resource manager.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

import java.time.LocalDate;

import org.hibernate.validator.constraints.URL;

import jakarta.validation.Valid;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import io.avaje.validation.constraints.Email;
import io.avaje.validation.constraints.Future;
import io.avaje.validation.constraints.NotNull;
import io.avaje.validation.constraints.Size;
import io.avaje.validation.constraints.URI;
import io.avaje.validation.constraints.Valid;

@Valid
public class HelloForm {
Expand All @@ -19,7 +18,7 @@ public class HelloForm {
@Email @Size(max = 100)
String email;

@URL
@URI
String url;

@Future
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void hello() {
@Test
void hello2() {

TypeRef<List<HelloDto>> listDto = new TypeRef<List<HelloDto>>() { };
TypeRef<List<HelloDto>> listDto = new TypeRef<>() { };
final List<HelloDto> beans = given()
.get(baseUrl + "/hello")
.then()
Expand All @@ -65,7 +65,7 @@ void hello2() {

@Test
void helloAsyncRequestHandling() {
TypeRef<List<HelloDto>> listDto = new TypeRef<List<HelloDto>>() { };
TypeRef<List<HelloDto>> listDto = new TypeRef<>() { };
final List<HelloDto> beans = given()
.get(baseUrl + "/hello/async")
.then()
Expand Down Expand Up @@ -209,9 +209,7 @@ void postForm_validation_expect_badRequest() {
.as(ErrorResponse.class);

assertNotNull(res);
assertThat(res.getMessage()).contains("failed validation");
assertThat(res.get("url")).isEqualTo("must be a valid URL");
assertThat(res.get("name")).isEqualTo("must not be null");
assertThat(res.getMessage()).contains("must not be null");

try {
client.request()
Expand All @@ -229,7 +227,8 @@ void postForm_validation_expect_badRequest() {
assertEquals(422, httpResponse.statusCode());

final ErrorResponse errorResponse = e.bean(ErrorResponse.class);
assertThat(errorResponse.get("url")).isEqualTo("must be a valid URL");

assertThat(res.getMessage()).contains("must not be null");
assertThat(errorResponse.get("name")).isEqualTo("must not be null");
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test-nima-jsonb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<plugin>
<groupId>io.avaje</groupId>
<artifactId>avaje-inject-maven-plugin</artifactId>
<version>10.5</version>
<version>11.0</version>
<executions>
<execution>
<phase>process-sources</phase>
Expand Down
Loading