Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
127 changes: 71 additions & 56 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mercateo.oss.parent</groupId>
<groupId>com.mercateo.oss</groupId>
<artifactId>oss-parent-pom</artifactId>
<version>0.9.0</version>
<version>1.0.9</version>
</parent>
<artifactId>common.rest.schemagen</artifactId>
<groupId>com.mercateo</groupId>
<version>0.20.1-SNAPSHOT</version>
<version>0.30.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>rest-schemagen</name>
<description>Jersey add-on for dynamic link and schema building</description>
Expand Down Expand Up @@ -40,35 +40,36 @@
<tag>HEAD</tag>
</scm>
<properties>
<argLine>
<!--Java modularity post v9 takes a dim view of the way this schema runs around internals while reflecting-->
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.time=ALL-UNNAMED
--add-opens=java.base/java.time.zone=ALL-UNNAMED
</argLine>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson.version>2.13.3</jackson.version>
<jmh.version>1.20</jmh.version>
<lombok.version>1.18.12</lombok.version>
<jackson.version>2.15.2</jackson.version>
<jmh.version>1.36</jmh.version>
<lombok.version>1.18.28</lombok.version>
<jersey.version>3.1.2</jersey.version>
<glassfish.version>3.0.4</glassfish.version>
</properties>
<developers>
<developer>
<id>joerg_adler</id>
<name>Joerg Adler</name>
<email>joerg.adler@mercateo.com</email>
<url>http://www.mercateo.com</url>
<organization>Mercateo AG</organization>
<organizationUrl>http://www.mercateo.com</organizationUrl>
<roles>
<role>developer</role>
</roles>
</developer>
</developers>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -79,11 +80,9 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<version>3.11.0</version>
<configuration>
<compilerVersion>1.8</compilerVersion>
<source>1.8</source>
<target>1.8</target>
<release>17</release>
<debug>true</debug>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
Expand All @@ -95,7 +94,7 @@
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -108,7 +107,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -121,7 +120,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<version>3.3.0</version>
<executions>
<execution>
<goals>
Expand All @@ -133,7 +132,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.0</version>
<version>0.8.10</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand All @@ -155,7 +154,7 @@
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>2.25.1</version>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -168,14 +167,14 @@
<version>2.0.0</version>
</dependency>
<dependency>
<artifactId>reflections</artifactId>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.10.2</version>
</dependency>
<dependency>
<artifactId>validation-api</artifactId>
<groupId>javax.validation</groupId>
<version>1.1.0.Final</version>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>3.0.2</version>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
Expand All @@ -184,34 +183,38 @@
</exclusions>
</dependency>
<dependency>
<artifactId>jersey-test-framework-provider-inmemory</artifactId>
<groupId>org.glassfish.hk2</groupId>
<artifactId>hk2</artifactId>
<version>${glassfish.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-inmemory</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>javax.inject</artifactId>
<groupId>org.glassfish.hk2.external</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<exclusions>
<exclusion>
<artifactId>javax.inject</artifactId>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>jakarta.inject</artifactId>
</exclusion>
<exclusion>
<artifactId>aopalliance-repackaged</artifactId>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>aopalliance-repackaged</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<version>2.5.6</version>
<version>2.9.3</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -232,45 +235,56 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
<version>32.1.1-jre</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<exclusions>
<exclusion>
<artifactId>javax.inject</artifactId>
<artifactId>jakarta.inject</artifactId>
<groupId>org.glassfish.hk2.external</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.23.1</version>
<version>3.24.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.6.1</version>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20220320</version>
<version>20230618</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
Expand All @@ -292,7 +306,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.11</version>
<version>1.4.8</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -315,7 +329,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -330,4 +344,5 @@
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright © 2015 Mercateo AG (http://www.mercateo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright © 2015 Mercateo AG (http://www.mercateo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright © 2015 Mercateo AG (http://www.mercateo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -27,17 +27,17 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import javax.ws.rs.ProcessingException;
import javax.ws.rs.core.Link;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.annotations.VisibleForTesting;
import com.mercateo.common.rest.schemagen.link.LinkCreator;
import com.mercateo.common.rest.schemagen.link.helper.JsonLink;
import com.mercateo.common.rest.schemagen.link.relation.RelationContainer;

import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.Link;
import jakarta.xml.bind.annotation.adapters.XmlAdapter;
import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

public class JsonHyperSchema {

@XmlJavaTypeAdapter(JaxbAdapter.class)
Expand Down Expand Up @@ -121,4 +121,4 @@ public String toString() {
"links=" + links +
'}';
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright © 2015 Mercateo AG (http://www.mercateo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -17,9 +17,7 @@

import java.util.Collection;

import javax.ws.rs.core.Link;

import com.mercateo.common.rest.schemagen.JsonHyperSchema;
import jakarta.ws.rs.core.Link;

public class JsonHyperSchemaCreator {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright © 2015 Mercateo AG (http://www.mercateo.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -21,8 +21,6 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;

import javax.annotation.Nullable;

import org.immutables.value.Value;

import com.google.common.annotations.VisibleForTesting;
Expand All @@ -31,6 +29,8 @@
import com.mercateo.common.rest.schemagen.plugin.IndividualSchemaGenerator;
import com.mercateo.common.rest.schemagen.util.EnumUtil;

import jakarta.annotation.Nullable;

@Value.Immutable
@DataClassStyle
public abstract class JsonProperty {
Expand Down
Loading