Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/418-date-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
atextor authored Oct 20, 2023
2 parents c015c58 + 8d39df9 commit 0ede3c5
Show file tree
Hide file tree
Showing 66 changed files with 372 additions and 299 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/dependency-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Dependency Update

on:
push:
branches:
- 'main'
workflow_dispatch:

permissions:
contents: write

jobs:
dependency:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Submit Dependency Snapshot
uses: advanced-security/maven-dependency-submission-action@v3
4 changes: 4 additions & 0 deletions core/esmf-aspect-model-aas-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
<groupId>org.eclipse.digitaltwin.aas4j</groupId>
<artifactId>dataformat-json</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.esmf</groupId>
<artifactId>esmf-test-resources</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
import java.math.BigInteger;
import java.util.Objects;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

import jakarta.validation.constraints.NotNull;

@JsonTypeInfo( use = JsonTypeInfo.Id.NAME )
@JsonSubTypes( {
@JsonSubTypes.Type( value = ExtendingTestEntity.class, name = "ExtendingTestEntity" )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

import java.util.Objects;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;

public class AspectWithAbstractEntity {

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

import java.util.Objects;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;

public class AspectWithAbstractSingleEntity {

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
import java.util.Collection;
import java.util.Objects;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import org.eclipse.esmf.aspectmodel.java.CollectionAspect;

import jakarta.validation.constraints.NotNull;

public class AspectWithCollectionWithAbstractEntity implements CollectionAspect<Collection<AbstractTestEntity>, AbstractTestEntity> {

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import java.util.Objects;
import java.util.Set;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
* Generated class for Test Aspect. This is a test description
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import java.util.Objects;
import java.util.Set;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
* Generated class for Test Aspect. This is a test description
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
import java.util.List;
import java.util.Objects;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import org.eclipse.esmf.aspectmodel.java.customconstraint.DoubleMax;
import org.eclipse.esmf.aspectmodel.java.customconstraint.DoubleMin;
import org.eclipse.esmf.aspectmodel.java.customconstraint.FloatMax;
Expand All @@ -33,6 +25,14 @@
import org.eclipse.esmf.aspectmodel.java.customconstraint.IntegerMin;
import org.eclipse.esmf.metamodel.impl.BoundDefinition;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

/** Generated class for AspectWithConstraints. */
public class AspectWithConstraints {

Expand Down Expand Up @@ -73,25 +73,25 @@ public class AspectWithConstraints {
@JsonCreator
public AspectWithConstraints(
@JsonProperty( value = "testPropertyWithRegularExpression" )
String testPropertyWithRegularExpression,
String testPropertyWithRegularExpression,
@JsonProperty( value = "testPropertyWithDecimalMinDecimalMaxRangeConstraint" )
BigDecimal testPropertyWithDecimalMinDecimalMaxRangeConstraint,
BigDecimal testPropertyWithDecimalMinDecimalMaxRangeConstraint,
@JsonProperty( value = "testPropertyWithDecimalMaxRangeConstraint" )
BigDecimal testPropertyWithDecimalMaxRangeConstraint,
BigDecimal testPropertyWithDecimalMaxRangeConstraint,
@JsonProperty( value = "testPropertyWithMinMaxRangeConstraint" )
Integer testPropertyWithMinMaxRangeConstraint,
Integer testPropertyWithMinMaxRangeConstraint,
@JsonProperty( value = "testPropertyWithMinRangeConstraint" )
Integer testPropertyWithMinRangeConstraint,
Integer testPropertyWithMinRangeConstraint,
@JsonProperty( value = "testPropertyRangeConstraintWithFloatType" )
Float testPropertyRangeConstraintWithFloatType,
Float testPropertyRangeConstraintWithFloatType,
@JsonProperty( value = "testPropertyRangeConstraintWithDoubleType" )
Double testPropertyRangeConstraintWithDoubleType,
Double testPropertyRangeConstraintWithDoubleType,
@JsonProperty( value = "testPropertyWithMinMaxLengthConstraint" )
String testPropertyWithMinMaxLengthConstraint,
String testPropertyWithMinMaxLengthConstraint,
@JsonProperty( value = "testPropertyWithMinLengthConstraint" )
BigInteger testPropertyWithMinLengthConstraint,
BigInteger testPropertyWithMinLengthConstraint,
@JsonProperty( value = "testPropertyCollectionLengthConstraint" )
List<BigInteger> testPropertyCollectionLengthConstraint ) {
List<BigInteger> testPropertyCollectionLengthConstraint ) {
this.testPropertyWithRegularExpression = testPropertyWithRegularExpression;
this.testPropertyWithDecimalMinDecimalMaxRangeConstraint =
testPropertyWithDecimalMinDecimalMaxRangeConstraint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@

import java.util.Objects;

import javax.validation.constraints.NotNull;
import javax.xml.datatype.XMLGregorianCalendar;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import org.eclipse.esmf.aspectmodel.java.customconstraint.GregorianCalendarMax;
import org.eclipse.esmf.aspectmodel.java.customconstraint.GregorianCalendarMin;
import org.eclipse.esmf.metamodel.impl.BoundDefinition;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;

/** Generated class for AspectWithGTypeForRangeConstraints. */
public class AspectWithGTypeForRangeConstraints {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

import java.util.Objects;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;

/**
* Class for testing aspects with variously typed and constrained numeric properties.
*/
Expand All @@ -29,7 +29,7 @@ public class AspectWithGenericNumericProperty {

@JsonCreator
public AspectWithGenericNumericProperty(
@JsonProperty(value = "testNumber") Number testNumber) {
@JsonProperty( value = "testNumber" ) Number testNumber ) {
this.testNumber = testNumber;
}

Expand All @@ -43,15 +43,15 @@ public Number getTestNumber() {
}

@Override
public boolean equals(final Object o) {
if (this == o) {
public boolean equals( final Object o ) {
if ( this == o ) {
return true;
}
if (o == null || getClass() != o.getClass()) {
if ( o == null || getClass() != o.getClass() ) {
return false;
}
final AspectWithGenericNumericProperty that = (AspectWithGenericNumericProperty) o;
return Objects.equals(testNumber, that.testNumber);
return Objects.equals( testNumber, that.testNumber );
}
}

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

import java.util.Objects;

import javax.validation.constraints.NotNull;

import org.eclipse.esmf.metamodel.datatypes.LangString;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;

/**
* Generated class for AspectWithMultilanguageExampleValue.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,20 @@
import java.math.BigInteger;
import java.util.Objects;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;

/** Generated class for Test Aspect. */
public class AspectWithRangeConstraintWithoutMinMaxIntegerValue {

@NotNull private BigInteger testInt;
@NotNull
private BigInteger testInt;

@JsonCreator
public AspectWithRangeConstraintWithoutMinMaxIntegerValue(
@JsonProperty(value = "testInt") BigInteger testInt) {
@JsonProperty( value = "testInt" ) BigInteger testInt ) {
this.testInt = testInt;
}

Expand All @@ -41,16 +42,16 @@ public BigInteger getTestInt() {
}

@Override
public boolean equals(final Object o) {
if (this == o) {
public boolean equals( final Object o ) {
if ( this == o ) {
return true;
}
if (o == null || getClass() != o.getClass()) {
if ( o == null || getClass() != o.getClass() ) {
return false;
}
final AspectWithRangeConstraintWithoutMinMaxIntegerValue that =
(AspectWithRangeConstraintWithoutMinMaxIntegerValue) o;
return Objects.equals(testInt, that.testInt);
return Objects.equals( testInt, that.testInt );
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

import java.util.Objects;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;

/** Generated class for AspectWithRecursivePropertyWithOptional. */
public class AspectWithRecursivePropertyWithOptional {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
import java.math.BigInteger;
import java.util.Objects;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;

public class ExtendingTestEntity extends AbstractTestEntity {

@NotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import java.net.URI;
import java.util.Objects;

import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.constraints.NotNull;

/**
* Generated class for Unique Identifier.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,8 @@ public void testEnumComplexMapping( final KnownVersion metaModelVersion ) {
+ "['properties']['description']['enum'][0]" ) ).isEqualTo( "Result succeeded" );
assertThat( context.<String> read( "$['components']['schemas']['ResultGood']['properties']['details']"
+ "['properties']['message']['enum'][0]" ) ).isEqualTo( "Evaluation succeeded." );
assertThat( context.<Double> read( "$['components']['schemas']['ResultGood']['properties']['details']"
+ "['properties']['numericCode']['enum'][0]" ) ).isCloseTo( 10.0d, Percentage.withPercentage( 1.0d ) );
assertThat( context.<Integer> read( "$['components']['schemas']['ResultGood']['properties']['details']"
+ "['properties']['numericCode']['enum'][0]" ) ).isEqualTo( 10 );
}

@ParameterizedTest
Expand Down
4 changes: 2 additions & 2 deletions core/esmf-aspect-model-java-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<artifactId>esmf-aspect-model-generator</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.esmf</groupId>
Expand Down
Loading

0 comments on commit 0ede3c5

Please sign in to comment.