Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions common/bin/lombok.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config.stopBubbling = true
lombok.log.fieldName = LOG
176 changes: 176 additions & 0 deletions common/bin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2021 Collate
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~ http://www.apache.org/licenses/LICENSE-2.0
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<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">
<parent>
<artifactId>platform</artifactId>
<groupId>org.open-metadata</groupId>
<version>1.12.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<properties>
<dropwizard.swagger.version>2.1.4-1</dropwizard.swagger.version>
</properties>

<artifactId>common</artifactId>
<name>OpenMetadata Common</name>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Required dependency for @Slf4j annotation -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!--test dependencies-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${org.junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<!-- used for generating custom annotations in jsonschema2pojo-maven-plugin -->
<dependency>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-core</artifactId>
<version>${jsonschema2pojo.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.18.0</version>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-jersey</artifactId>
<version>${dropwizard.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.17.1</version>
</dependency>
</dependencies>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<doclint>none</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>googleformatter-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
53 changes: 53 additions & 0 deletions common/bin/src/test/resources/json/dim_location/v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"instance": {
"name": "dim_location",
"id": "25f2c29c-bc32-4a54-a014-c0a6ded20165",
"documentation": "this is the table to hold data on dim_location",
"owner": {
"id": "05612b35-e1ee-4067-83c5-830dcb5ed5b2",
"name": "user5655",
"ownerType": "user"
},
"href": "http://localhost:8585/api/v1/databases/null/tables/dim_location"
},
"tableType": "REGULAR",
"fullyQualifiedName": "hive.dim_location",
"tier": "unknown",
"columns": [
{
"name": "location_id",
"columnDataType": "NUMERIC",
"documentation": "The ID of the Shopify POS. This column is the primary key for the locations table. The location_id is null for orders not placed through Shopify POS, such as those placed through the online store.",
"piiTags": [
"pii"
],
"columnConstraint": "NULL",
"ordinalPosition": 1
},
{
"name": "shop_id",
"columnDataType": "NUMERIC",
"documentation": "The ID of the store. This column is a foreign key reference to the shop_id column in the shops table.",
"piiTags": [
"pii"
],
"columnConstraint": "NULL",
"ordinalPosition": 1
},
{
"name": "name",
"columnDataType": "VARCHAR",
"documentation": "Name of the POS location as provided by the merchant. For example, 150 Elgin Street or Downtown Boutique.",
"piiTags": [
"pii"
],
"columnConstraint": "NULL",
"ordinalPosition": 1
}
],
"tableConstraints": [],
"usage": {
"usageCount": 46420,
"percentileRank": 8.797669437407297
}
}
57 changes: 57 additions & 0 deletions common/bin/src/test/resources/json/dim_location/v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"instance": {
"name": "dim_location",
"id": "25f2c29c-bc32-4a54-a014-c0a6ded20165",
"documentation": "This is the table to hold data on dim_location.",
"owner": {
"id": "05612b35-e1ee-4067-83c5-830dcb5ed5b2",
"name": "user5655",
"ownerType": "user"
},
"href": "http://localhost:8585/api/v1/databases/null/tables/dim_location"
},
"tableType": "REGULAR",
"fullyQualifiedName": "hive.dim_location",
"tier": "unknown",
"columns": [
{
"name": "location_id",
"columnDataType": "NUMERIC",
"documentation": "The ID of the Shopify POS. This column is the primary key for the locations table. The location_id is null for orders not placed through Shopify POS, such as those placed through the online store.",
"columnConstraint": "NULL",
"ordinalPosition": 1
},
{
"name": "shop_id",
"columnDataType": "NUMERIC",
"documentation": "The ID of the store. This column is a foreign key reference to the shop_id column in the shops table.",
"columnConstraint": "NULL",
"ordinalPosition": 1
},
{
"name": "name",
"columnDataType": "VARCHAR",
"documentation": "Name of the POS location as provided by the merchant. For example, 150 Elgin Street or Downtown Boutique.",
"piiTags": [
"pii"
],
"columnConstraint": "NULL",
"ordinalPosition": 1
},
{
"name": "created_on",
"columnDataType": "VARCHAR",
"documentation": "Date when this shop was created.",
"piiTags": [
"pii"
],
"columnConstraint": "NULL",
"ordinalPosition": 1
}
],
"tableConstraints": [],
"usage": {
"usageCount": 56420,
"percentileRank": 9.79
}
}
39 changes: 39 additions & 0 deletions common/bin/src/test/resources/json/entity/testEntity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Test entity",
"description": "Test entity json defintion",
"type": "object",

"definitions": {
"uri": {
"description": "Type used for UUID",
"type": "string",
"format": "uri"
}
},

"properties" : {
"stringProperty": {
"description": "Locally defined property in test",
"type": "string"
},

"uriProperty": {
"description": "Locally defined property in test",
"$ref": "#/definitions/uri"
},

"uuidProperty" : {
"description": "Type referenced from another json file",
"$ref" : "../type/basic.json#/definitions/uuid"
},

"objectTypeProperty" : {
"description": "Object type referenced from another json file",
"$ref" : "../type/objectType.json"
}
},

"required": ["stringProperty"]
}

14 changes: 14 additions & 0 deletions common/bin/src/test/resources/json/type/basic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$id": "https://streaminlinedata.ai/type/common.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Common types",
"description": "Common reusable types",
"definitions": {
"uuid": {
"description": "Type used for UUID",
"type": "string",
"format": "uuid"
}
}
}

19 changes: 19 additions & 0 deletions common/bin/src/test/resources/json/type/objectType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$id": "https://streaminlinedata.ai/type/objectType.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Test object type",
"description": "Test object type",
"type": "object",
"properties": {
"ot1": {
"description": "Driver class to use for the JDBC connection",
"type": "string"
},
"ot2": {
"description": "URL to connect to JDBC server",
"type": "string"
}
},

"required": ["ot1", "ot2"]
}
Loading
Loading