Skip to content

Commit 6e6d55e

Browse files
Merge pull request #26 from saasquatch/gradle-dev
0.2.0
2 parents 3796e88 + 5f7a600 commit 6e6d55e

File tree

262 files changed

+133996
-1110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+133996
-1110
lines changed

.github/workflows/JavaCI.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: JavaCI
2-
on: [push, pull_request]
2+
on: [push, pull_request, workflow_dispatch]
33
jobs:
44
build:
55
runs-on: ubuntu-latest
66
steps:
7-
- uses: actions/checkout@v2
8-
- uses: actions/setup-java@v2
7+
- uses: actions/checkout@v3
8+
- uses: actions/setup-java@v3
99
with:
1010
java-version: "8"
1111
distribution: adopt
12-
- name: Maven Package
13-
run: mvn -B -U clean package -DskipTests
14-
- name: Maven Verify
15-
run: mvn -B -U verify
12+
- name: Setup Gradle
13+
uses: gradle/gradle-build-action@v2
14+
- name: Execute Gradle build
15+
run: ./gradlew build

.gitignore

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@
1010
# Mobile Tools for Java (J2ME)
1111
.mtj.tmp/
1212

13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.nar
17-
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
21-
2213
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2314
hs_err_pid*
2415

@@ -38,3 +29,6 @@ buildNumber.properties
3829
.mvn/wrapper/maven-wrapper.jar
3930
.idea
4031
*.iml
32+
.gradle
33+
.gradletasknamecache
34+
.m2

.mvn/wrapper/maven-wrapper.properties

Lines changed: 0 additions & 18 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
5+
## [0.2.0] - 2023-04-24
6+
7+
### Changed
8+
9+
- Switched to Gradle.
10+
- Added support for JSON Schema draft 2019-09 and 2020-12.
11+
- Internal dependency version bumps.
12+
- Test suite cleanup.
13+
14+
### Fixed
15+
16+
- Fixed the `time` format inference in `FormatInferrers.dateTime()` to better adhere to the JSON Schema standard. It is trivial to restore the original behavior with a custom implementation of `FormatInferrer`.
17+
18+
## [0.1.5] - 2022-03-10
19+
20+
### Changed
21+
22+
- Switched to Maven Wrapper.
23+
- Internal dependency version bumps.
24+
25+
## [0.1.4] - 2021-07-21
26+
27+
## [0.1.3] - 2021-05-21
28+
29+
### Changed
30+
31+
- Internal dependency version bumps.
32+
33+
### Fixed
34+
35+
- Fixed errors when building for JDK 11 and 12. See [#6](https://github.com/saasquatch/json-schema-inferrer/pull/6).
36+
37+
## [0.1.2] - 2020-03-12
38+
39+
### Changed
40+
41+
- Internal dependency version bumps.
42+
43+
## [0.1.1] - 2020-02-27
44+
45+
[Unreleased]: https://github.com/saasquatch/json-schema-inferrer/compare/0.2.0...HEAD
46+
47+
[0.0.6]: https://github.com/saasquatch/json-schema-inferrer/compare/0.1.5...0.2.0
48+
49+
[0.0.5]: https://github.com/saasquatch/json-schema-inferrer/compare/0.1.4...0.1.5
50+
51+
[0.0.4]: https://github.com/saasquatch/json-schema-inferrer/compare/0.1.3...0.1.4
52+
53+
[0.0.3]: https://github.com/saasquatch/json-schema-inferrer/compare/0.1.2...0.1.3
54+
55+
[0.0.2]: https://github.com/saasquatch/json-schema-inferrer/compare/0.1.1...0.1.2
56+
57+
[0.0.1]: https://github.com/saasquatch/json-schema-inferrer/releases/tag/0.1.1

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
44
[![JavaCI](https://github.com/saasquatch/json-schema-inferrer/actions/workflows/JavaCI.yml/badge.svg?branch=master)](https://github.com/saasquatch/json-schema-inferrer/actions/workflows/JavaCI.yml)
5-
[![codecov](https://codecov.io/gh/saasquatch/json-schema-inferrer/branch/master/graph/badge.svg)](https://codecov.io/gh/saasquatch/json-schema-inferrer)
65
[![](https://jitpack.io/v/saasquatch/json-schema-inferrer.svg)](https://jitpack.io/#saasquatch/json-schema-inferrer)
76

87
Java library for inferring JSON schema based on sample JSONs.
@@ -176,19 +175,19 @@ Maven
176175
<dependency>
177176
<groupId>com.github.saasquatch</groupId>
178177
<artifactId>json-schema-inferrer</artifactId>
179-
<version>0.1.5</version>
178+
<version>0.2.0</version>
180179
</dependency>
181180
```
182181

183182
Gradle
184183

185184
```gradle
186-
implementation 'com.github.saasquatch:json-schema-inferrer:0.1.5'
185+
implementation 'com.github.saasquatch:json-schema-inferrer:0.2.0'
187186
```
188187

189188
### Transitive Dependencies
190189

191-
This project requires Java 8. The only required transitive dependencies are [Jackson](https://github.com/FasterXML/jackson) and [FindBugs (JSR305)](http://findbugs.sourceforge.net/). If you opt into using some of the built-in [`FormatInferrers`](https://github.com/saasquatch/json-schema-inferrer/blob/master/src/main/java/com/saasquatch/jsonschemainferrer/FormatInferrers.java), [Commons Validator](https://commons.apache.org/proper/commons-validator/) will also be needed.
190+
This project requires Java 8. The only required transitive dependencies are [Jackson](https://github.com/FasterXML/jackson) and [FindBugs (JSR305)](http://findbugs.sourceforge.net/). If you opt into using some of the built-in [`FormatInferrers`](https://github.com/saasquatch/json-schema-inferrer/blob/master/src/main/java/com/saasquatch/jsonschemainferrer/FormatInferrers.java), [Commons Validator](https://commons.apache.org/proper/commons-validator/) will also be needed. This is encapsulated with a [Gradle feature variant](https://docs.gradle.org/current/userguide/feature_variants.html) named `builtInFormatInferrerSupport`.
192191

193192
### Pre-release Versions
194193

build.gradle

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
plugins {
2+
id 'java-library'
3+
}
4+
5+
group = 'com.saasquatch'
6+
version = '1.0-SNAPSHOT'
7+
8+
java {
9+
registerFeature('builtInFormatInferrerSupport') {
10+
usingSourceSet(sourceSets.main)
11+
}
12+
}
13+
14+
tasks.compileJava.options.encoding = 'UTF-8'
15+
tasks.compileTestJava.options.encoding = 'UTF-8'
16+
tasks.javadoc.options.encoding = 'UTF-8'
17+
18+
repositories {
19+
mavenCentral()
20+
}
21+
22+
dependencies {
23+
testImplementation platform('org.junit:junit-bom:5.9.2')
24+
testImplementation 'org.junit.jupiter:junit-jupiter'
25+
implementation 'com.google.code.findbugs:jsr305:3.0.2'
26+
api 'com.fasterxml.jackson.core:jackson-databind:2.15.0'
27+
builtInFormatInferrerSupportImplementation 'commons-validator:commons-validator:1.7'
28+
testImplementation 'com.networknt:json-schema-validator:1.0.80'
29+
testImplementation 'com.google.guava:guava:31.1-jre'
30+
}
31+
32+
tasks.test {
33+
useJUnitPlatform()
34+
}

gradle/wrapper/gradle-wrapper.jar

60.2 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
4+
networkTimeout=10000
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)