From b8a0c3991bdbe105d8fcc7458fc7b87bceff817d Mon Sep 17 00:00:00 2001 From: Francis Galiegue Date: Wed, 29 Oct 2014 12:13:10 +0100 Subject: [PATCH 01/71] Update -core dependency --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index fbc13551a..f9b5bd228 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ apply(plugin: "idea"); apply(plugin: "eclipse"); group = "com.github.fge"; -version = "2.2.5-SNAPSHOT"; +version = "2.2.6-SNAPSHOT"; sourceCompatibility = "1.6"; targetCompatibility = "1.6"; // defaults to sourceCompatibility @@ -64,7 +64,7 @@ repositories { */ dependencies { compile(group: "com.github.fge", name: "json-schema-core", - version: "1.2.4"); + version: "1.2.5"); compile(group: "javax.mail", name: "mailapi", version: "1.4.3"); compile(group: "joda-time", name: "joda-time", version: "2.3"); compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", From 698385765781856f86e63adec96920e71915922d Mon Sep 17 00:00:00 2001 From: Francis Galiegue Date: Wed, 29 Oct 2014 14:20:21 +0100 Subject: [PATCH 02/71] Fill release notes Signed-off-by: Francis Galiegue --- RELEASE-NOTES.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 33328c35c..35a219faa 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1 +1,37 @@ -### RESET +### 2.2.6 + +* Fix issue #112: fix circular validation detection; use a "validation stack" to + detect and spot those situations. +* Depend on -core 1.2.5. +* Update dependencies for libphonenumber, jsr305. + +### 2.2.5 + +* Fix issue #102: detect, and fail on, circular validation. +* Simplify ValidationProcessor. +* Remove one-jar generation; the -lib jar now includes Main-Class. + +### 2.2.4 + +* Add a "lib" target to the build. +* Issue #99: append syntax errors when throwing an InvalidSchemaException. +* Issue #100: attempt to load resources from the context classloader if loading + from JsonLoader.class fails. + +### 2.2.3 + +* Re-release... 2.2.2 was compiled with JDK 8 :/ + +### 2.2.2 + +* Depend on -core 1.2.1 to work around Rhino bug with other packages sealing the + context. + +### 2.2.1 + +* Main now uses current working directory as default URI namespace. + +### 2.2.0 + +* New major release. + From 5a437893f5e7d65836d048f66d74213f3d3f6310 Mon Sep 17 00:00:00 2001 From: Francis Galiegue Date: Wed, 29 Oct 2014 14:29:30 +0100 Subject: [PATCH 03/71] 2.2.6 Signed-off-by: Francis Galiegue --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index f9b5bd228..6aebc88d6 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ apply(plugin: "idea"); apply(plugin: "eclipse"); group = "com.github.fge"; -version = "2.2.6-SNAPSHOT"; +version = "2.2.6"; sourceCompatibility = "1.6"; targetCompatibility = "1.6"; // defaults to sourceCompatibility From eed998bad029c0d6025e0ac3f750e2a1a564a9c3 Mon Sep 17 00:00:00 2001 From: Francis Galiegue Date: Wed, 29 Oct 2014 15:15:41 +0100 Subject: [PATCH 04/71] Announce 2.2.6 Signed-off-by: Francis Galiegue --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f2e5e6ae6..f59b24370 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ run by yourself. ## Versions -* current stable version: **2.2.5** +* current stable version: **2.2.6** ([ChangeLog](https://github.com/fge/json-schema-validator/wiki/ChangeLog_22x), [Javadoc](http://fge.github.io/json-schema-validator/2.2.x/index.html), [code samples](http://fge.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). From fd781ef26318ce4b7bde294307dd32d6c2e8da03 Mon Sep 17 00:00:00 2001 From: Francis Galiegue Date: Wed, 11 Mar 2015 12:50:30 +0100 Subject: [PATCH 05/71] Update README with the research for a new maintainer Signed-off-by: Francis Galiegue --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index f59b24370..6ce978e2c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ +# This project is looking for a new maintainer + +I don't have the time, nor incentive anymore, to maintain this project. + +I am fully aware that there are now quite a few people/entities which use this project, as such I am +looking fow a new maintainer, whether that be an individual or an entity, willing to take over. + +Please [contact me personally](mailto:fgaliegue@gmail.com) if you are interested. Ideally, you +should be equally committed to this project **and** JSON Schema as a whole. + ## Read me first The **current** version of this project is licensed under both LGPLv3 (or later) and ASL 2.0. The old version From 2a7a51229f08940116bdc3e22803ec0c7f6fd73f Mon Sep 17 00:00:00 2001 From: Dave Clayton Date: Thu, 7 Jul 2016 23:25:28 +0100 Subject: [PATCH 06/71] Add configuration for testing travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..f5c99a7f6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1 @@ +language: java \ No newline at end of file From d4c07af2bb77079c560358a29b099c1dc2579759 Mon Sep 17 00:00:00 2001 From: Dave Clayton Date: Thu, 7 Jul 2016 23:30:39 +0100 Subject: [PATCH 07/71] Update to reflect new project maintainer --- README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.md b/README.md index 6ce978e2c..f59b24370 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,3 @@ -# This project is looking for a new maintainer - -I don't have the time, nor incentive anymore, to maintain this project. - -I am fully aware that there are now quite a few people/entities which use this project, as such I am -looking fow a new maintainer, whether that be an individual or an entity, willing to take over. - -Please [contact me personally](mailto:fgaliegue@gmail.com) if you are interested. Ideally, you -should be equally committed to this project **and** JSON Schema as a whole. - ## Read me first The **current** version of this project is licensed under both LGPLv3 (or later) and ASL 2.0. The old version From 73e658d12ae660304206f8e951c9e01e1a144f11 Mon Sep 17 00:00:00 2001 From: Dave Clayton Date: Thu, 7 Jul 2016 23:45:03 +0100 Subject: [PATCH 08/71] Update documentation to link to Travis builds --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index f59b24370..98fb6f9e0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +## Travis builds now enabled + +Builds are now verified by Travis (see [issue #20](https://github.com/daveclayton/json-patch/issues/20) from the json-patch project for details) + +https://travis-ci.org/daveclayton/json-schema-validator + ## Read me first The **current** version of this project is licensed under both LGPLv3 (or later) and ASL 2.0. The old version From 62704bc173870e2aa1e4dafe0e81c3f807c7bd5d Mon Sep 17 00:00:00 2001 From: Phillip Wirth Date: Wed, 10 Aug 2016 21:34:25 +0200 Subject: [PATCH 09/71] fixes gh-80, broken links --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 98fb6f9e0..ce673cd5e 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ https://travis-ci.org/daveclayton/json-schema-validator The **current** version of this project is licensed under both LGPLv3 (or later) and ASL 2.0. The old version (2.0.x) was licensed under LGPL 3.0 (or later) only. -**Version 2.2 is out**. See [here](https://github.com/fge/json-schema-validator/wiki/Whatsnew_22) +**Version 2.2 is out**. See [here](https://github.com/daveclayton/json-schema-validator/wiki/Whatsnew_22) for the list of changes compared to 2.0. And of course, it still has [all the -features](https://github.com/fge/json-schema-validator/wiki/Features) of older versions. +features](https://github.com/daveclayton/json-schema-validator/wiki/Features) of older versions. ## What this is @@ -34,19 +34,19 @@ timely manner. ## Testing online You can [test this library online](http://json-schema-validator.herokuapp.com); this web site is in -a [project of its own](https://github.com/fge/json-schema-validator-demo), which you can fork and +a [project of its own](https://github.com/daveclayton/json-schema-validator-demo), which you can fork and run by yourself. ## Versions * current stable version: **2.2.6** - ([ChangeLog](https://github.com/fge/json-schema-validator/wiki/ChangeLog_22x), - [Javadoc](http://fge.github.io/json-schema-validator/2.2.x/index.html), [code - samples](http://fge.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). + ([ChangeLog](https://github.com/daveclayton/json-schema-validator/wiki/ChangeLog_22x), + [Javadoc](http://daveclayton.github.io/json-schema-validator/2.2.x/index.html), [code + samples](http://daveclayton.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). * old stable version: **2.0.4** - ([ChangeLog](https://github.com/fge/json-schema-validator/wiki/ChangeLog_20x), - [Javadoc](http://fge.github.io/json-schema-validator/2.0.x/index.html), [code - samples](http://fge.github.io/json-schema-validator/2.0.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). + ([ChangeLog](https://github.com/daveclayton/json-schema-validator/wiki/ChangeLog_20x), + [Javadoc](http://daveclayton.github.io/json-schema-validator/2.0.x/index.html), [code + samples](http://daveclayton.github.io/json-schema-validator/2.0.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). ## Available downloads @@ -100,8 +100,8 @@ This implementation is based on the following drafts: ## More... For a detailed discussion of the implementation, see -[here](https://github.com/fge/json-schema-validator/wiki/Status). +[here](https://github.com/daveclayton/json-schema-validator/wiki/Status). -Please see the [wiki](https://github.com/fge/json-schema-validator/wiki/) for more +Please see the [wiki](https://github.com/daveclayton/json-schema-validator/wiki/) for more details. From a679f30d545906a8ff152bf0f2e25160a701b3f5 Mon Sep 17 00:00:00 2001 From: Andreas Gebhardt Date: Mon, 26 Dec 2016 18:41:23 +0100 Subject: [PATCH 10/71] add Travis badge --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ce673cd5e..9978c15bd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status][Travis badge]][Travis] + ## Travis builds now enabled Builds are now verified by Travis (see [issue #20](https://github.com/daveclayton/json-patch/issues/20) from the json-patch project for details) @@ -105,3 +107,5 @@ For a detailed discussion of the implementation, see Please see the [wiki](https://github.com/daveclayton/json-schema-validator/wiki/) for more details. +[Travis Badge]: https://api.travis-ci.org/daveclayton/json-schema-validator.svg?branch=master +[Travis]: https://travis-ci.org/daveclayton/json-schema-validator From c2379dcfdf743d3ccba8bf54f9168ee2c296951f Mon Sep 17 00:00:00 2001 From: Andreas Gebhardt Date: Mon, 26 Dec 2016 19:31:15 +0100 Subject: [PATCH 11/71] update (compile time) dependencies * com.google.code.findbugs:jsr305 :: 3.0.0 -> 3.0.1 * com.googlecode.libphonenumber:libphonenumber :: 6.2 -> 8.0.0 * joda-time:joda-time :: 2.3 -> 2.9.7 * net.sf.jopt-simple:jopt-simple :: 4.6 -> 5.0.3 --- build.gradle | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 6aebc88d6..6f4c2797d 100644 --- a/build.gradle +++ b/build.gradle @@ -63,15 +63,12 @@ repositories { * List of dependencies */ dependencies { - compile(group: "com.github.fge", name: "json-schema-core", - version: "1.2.5"); + compile(group: "com.github.fge", name: "json-schema-core", version: "1.2.5"); compile(group: "javax.mail", name: "mailapi", version: "1.4.3"); - compile(group: "joda-time", name: "joda-time", version: "2.3"); - compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", - version: "6.2"); - compile(group: "com.google.code.findbugs", name: "jsr305", - version: "3.0.0"); - compile(group: "net.sf.jopt-simple", name: "jopt-simple", version: "4.6"); + compile(group: "joda-time", name: "joda-time", version: "2.9.7"); + compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.0.0"); + compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.1"); + compile(group: "net.sf.jopt-simple", name: "jopt-simple", version: "5.0.3"); testCompile(group: "org.testng", name: "testng", version: "6.8.7") { exclude(group: "junit", module: "junit"); exclude(group: "org.beanshell", module: "bsh"); From f8fb1d63a4033bf03bbaefebad71d5f9794e3f4b Mon Sep 17 00:00:00 2001 From: Andreas Gebhardt Date: Mon, 26 Dec 2016 19:35:07 +0100 Subject: [PATCH 12/71] update test dependencies * org.mockito:mockito-core :: 1.9.5 -> 2.4.2 * org.testng:testng :: 6.8.7 -> 6.10 --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6f4c2797d..cb84aa119 100644 --- a/build.gradle +++ b/build.gradle @@ -69,12 +69,12 @@ dependencies { compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.0.0"); compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.1"); compile(group: "net.sf.jopt-simple", name: "jopt-simple", version: "5.0.3"); - testCompile(group: "org.testng", name: "testng", version: "6.8.7") { + testCompile(group: "org.testng", name: "testng", version: "6.10") { exclude(group: "junit", module: "junit"); exclude(group: "org.beanshell", module: "bsh"); exclude(group: "org.yaml", module: "snakeyaml"); }; - testCompile(group: "org.mockito", name: "mockito-core", version: "1.9.5"); + testCompile(group: "org.mockito", name: "mockito-core", version: "2.4.2"); testCompile(group: "org.easytesting", name: "fest-assert", version: "1.4"); } From ab7b86f612ae5939308c9473cc4c31c4d1d3a733 Mon Sep 17 00:00:00 2001 From: Andreas Gebhardt Date: Mon, 26 Dec 2016 18:51:52 +0100 Subject: [PATCH 13/71] add badges for LGPLv3 and ASL 2.0 --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9978c15bd..4d252c34d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![License LGPLv3][LGPLv3 badge]][LGPLv3] +[![License ASL 2.0][ASL 2.0 badge]][ASL 2.0] [![Build Status][Travis badge]][Travis] ## Travis builds now enabled @@ -8,8 +10,8 @@ https://travis-ci.org/daveclayton/json-schema-validator ## Read me first -The **current** version of this project is licensed under both LGPLv3 (or later) and ASL 2.0. The old version -(2.0.x) was licensed under LGPL 3.0 (or later) only. +The **current** version of this project is licensed under both [LGPLv3] (or later) and [ASL 2.0]. The old version +(2.0.x) was licensed under [LGPL 3.0][LGPLv3] (or later) only. **Version 2.2 is out**. See [here](https://github.com/daveclayton/json-schema-validator/wiki/Whatsnew_22) for the list of changes compared to 2.0. And of course, it still has [all the @@ -107,5 +109,9 @@ For a detailed discussion of the implementation, see Please see the [wiki](https://github.com/daveclayton/json-schema-validator/wiki/) for more details. +[LGPLv3 badge]: https://img.shields.io/:license-LGPLv3-blue.svg +[LGPLv3]: http://www.gnu.org/licenses/lgpl-3.0.html +[ASL 2.0 badge]: https://img.shields.io/:license-Apache%202.0-blue.svg +[ASL 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html [Travis Badge]: https://api.travis-ci.org/daveclayton/json-schema-validator.svg?branch=master [Travis]: https://travis-ci.org/daveclayton/json-schema-validator From 672defcaf02facc376bf77edf13edc0e3a1da513 Mon Sep 17 00:00:00 2001 From: Andreas Gebhardt Date: Mon, 26 Dec 2016 19:05:52 +0100 Subject: [PATCH 14/71] add badge for latest version on Maven Central --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4d252c34d..e7f7a7c93 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![License LGPLv3][LGPLv3 badge]][LGPLv3] [![License ASL 2.0][ASL 2.0 badge]][ASL 2.0] [![Build Status][Travis badge]][Travis] +![Maven Central](https://img.shields.io/maven-central/v/com.github.fge/json-schema-validator.svg) ## Travis builds now enabled From b25b083583bbc002e3d6314947222d849df233cc Mon Sep 17 00:00:00 2001 From: zhangzhe Date: Tue, 21 Feb 2017 12:16:59 +0800 Subject: [PATCH 15/71] Modified annotation. --- src/main/java/com/github/fge/jsonschema/main/JsonSchema.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/fge/jsonschema/main/JsonSchema.java b/src/main/java/com/github/fge/jsonschema/main/JsonSchema.java index 2ec548ae0..f13e50d6a 100644 --- a/src/main/java/com/github/fge/jsonschema/main/JsonSchema.java +++ b/src/main/java/com/github/fge/jsonschema/main/JsonSchema.java @@ -113,7 +113,7 @@ public ProcessingReport validate(final JsonNode instance, * Validate an instance and return a processing report * *

This calls {@link #validate(JsonNode, boolean)} with {@code false} as - * a third argument.

+ * a second argument.

* * @param instance the instance to validate * @return a processing report From 41f22fbbf94639230305346db93526f3bbb04c76 Mon Sep 17 00:00:00 2001 From: Archimedes Trajano Date: Fri, 28 Aug 2015 13:42:22 -0400 Subject: [PATCH 16/71] Changed JsonSchema to an interface Fixes https://github.com/fge/json-schema-validator/issues/159 --- .../fge/jsonschema/main/JsonSchema.java | 98 ++---------- .../jsonschema/main/JsonSchemaFactory.java | 2 +- .../fge/jsonschema/main/JsonSchemaImpl.java | 150 ++++++++++++++++++ .../fge/jsonschema/main/JsonValidator.java | 4 +- .../validation/InstanceValidator.java | 1 - .../examples/doc-files/Example9.java | 1 + 6 files changed, 166 insertions(+), 90 deletions(-) create mode 100644 src/main/java/com/github/fge/jsonschema/main/JsonSchemaImpl.java diff --git a/src/main/java/com/github/fge/jsonschema/main/JsonSchema.java b/src/main/java/com/github/fge/jsonschema/main/JsonSchema.java index 2ec548ae0..639a24713 100644 --- a/src/main/java/com/github/fge/jsonschema/main/JsonSchema.java +++ b/src/main/java/com/github/fge/jsonschema/main/JsonSchema.java @@ -26,69 +26,15 @@ import com.github.fge.jsonschema.core.report.ListProcessingReport; import com.github.fge.jsonschema.core.report.MessageProvider; import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.core.report.ReportProvider; -import com.github.fge.jsonschema.core.tree.SchemaTree; -import com.github.fge.jsonschema.core.tree.SimpleJsonTree; -import com.github.fge.jsonschema.processors.data.FullData; -import com.github.fge.jsonschema.processors.validation.ValidationProcessor; - -import javax.annotation.concurrent.Immutable; /** * Single-schema instance validator * - *

This is the class you will use the most often. It is, in essence, a {@link + *

This is the interface you will use the most often. It is, in essence, a {@link * JsonValidator} initialized with a single JSON Schema. Note however that this * class still retains the ability to resolve JSON References.

- * - *

It has no public constructors: you should use the appropriate methods in - * {@link JsonSchemaFactory} to obtain an instance of this class.

*/ -@Immutable -public final class JsonSchema -{ - private final ValidationProcessor processor; - private final SchemaTree schema; - private final ReportProvider reportProvider; - - /** - * Package private constructor - * - * @param processor the validation processor - * @param schema the schema to bind to this instance - * @param reportProvider the report provider - */ - JsonSchema(final ValidationProcessor processor, final SchemaTree schema, - final ReportProvider reportProvider) - { - this.processor = processor; - this.schema = schema; - this.reportProvider = reportProvider; - } - - private ProcessingReport doValidate(final JsonNode node, - final boolean deepCheck) - throws ProcessingException - { - final FullData data = new FullData(schema, new SimpleJsonTree(node), - deepCheck); - final ProcessingReport report = reportProvider.newReport(); - final ProcessingResult result - = ProcessingResult.of(processor, report, data); - return result.getReport(); - } - - private ProcessingReport doValidateUnchecked(final JsonNode node, - final boolean deepCheck) - { - final FullData data = new FullData(schema, new SimpleJsonTree(node), - deepCheck); - final ProcessingReport report = reportProvider.newReport(); - final ProcessingResult result - = ProcessingResult.uncheckedResult(processor, report, data); - return result.getReport(); - } - +public interface JsonSchema { /** * Validate an instance and return a processing report * @@ -102,12 +48,8 @@ private ProcessingReport doValidateUnchecked(final JsonNode node, * * @since 2.1.8 */ - public ProcessingReport validate(final JsonNode instance, - final boolean deepCheck) - throws ProcessingException - { - return doValidate(instance, deepCheck); - } + ProcessingReport validate(JsonNode instance, boolean deepCheck) + throws ProcessingException; /** * Validate an instance and return a processing report @@ -119,11 +61,8 @@ public ProcessingReport validate(final JsonNode instance, * @return a processing report * @throws ProcessingException a processing error occurred during validation */ - public ProcessingReport validate(final JsonNode instance) - throws ProcessingException - { - return validate(instance, false); - } + ProcessingReport validate(JsonNode instance) + throws ProcessingException; /** * Validate an instance and return a processing report (unchecked version) @@ -148,12 +87,8 @@ public ProcessingReport validate(final JsonNode instance) * * @since 2.1.8 */ - public ProcessingReport validateUnchecked(final JsonNode instance, - final boolean deepCheck) - { - return doValidateUnchecked(instance, deepCheck); - } - + ProcessingReport validateUnchecked(JsonNode instance, + boolean deepCheck); /** * Validate an instance and return a processing report (unchecked version) * @@ -164,10 +99,7 @@ public ProcessingReport validateUnchecked(final JsonNode instance, * @return a report (a {@link ListProcessingReport} if an exception was * thrown during processing) */ - public ProcessingReport validateUnchecked(final JsonNode instance) - { - return doValidateUnchecked(instance, false); - } + ProcessingReport validateUnchecked(JsonNode instance); /** * Check whether an instance is valid against this schema @@ -176,11 +108,8 @@ public ProcessingReport validateUnchecked(final JsonNode instance) * @return true if the instance is valid * @throws ProcessingException an error occurred during processing */ - public boolean validInstance(final JsonNode instance) - throws ProcessingException - { - return doValidate(instance, false).isSuccess(); - } + boolean validInstance(JsonNode instance) + throws ProcessingException; /** * Check whether an instance is valid against this schema (unchecked @@ -192,8 +121,5 @@ public boolean validInstance(final JsonNode instance) * @param instance the instance to validate * @return true if the instance is valid */ - public boolean validInstanceUnchecked(final JsonNode instance) - { - return doValidateUnchecked(instance, false).isSuccess(); - } + boolean validInstanceUnchecked(JsonNode instance); } diff --git a/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactory.java b/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactory.java index bfaca5fe0..4977e4968 100644 --- a/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactory.java +++ b/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactory.java @@ -60,7 +60,7 @@ *
  • a {@link SyntaxValidator}, to validate schemas;
  • *
  • a {@link JsonValidator}, to validate an instance against a schema; *
  • - *
  • a {@link JsonSchema}, to validate instances against a fixed schema. + *
  • a {@link JsonSchemaImpl}, to validate instances against a fixed schema. *
  • * * diff --git a/src/main/java/com/github/fge/jsonschema/main/JsonSchemaImpl.java b/src/main/java/com/github/fge/jsonschema/main/JsonSchemaImpl.java new file mode 100644 index 000000000..900e24b61 --- /dev/null +++ b/src/main/java/com/github/fge/jsonschema/main/JsonSchemaImpl.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) + * + * This software is dual-licensed under: + * + * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any + * later version; + * - the Apache Software License (ASL) version 2.0. + * + * The text of this file and of both licenses is available at the root of this + * project or, if you have the jar distribution, in directory META-INF/, under + * the names LGPL-3.0.txt and ASL-2.0.txt respectively. + * + * Direct link to the sources: + * + * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt + * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt + */ + +package com.github.fge.jsonschema.main; + +import com.fasterxml.jackson.databind.JsonNode; +import com.github.fge.jsonschema.core.exceptions.ProcessingException; +import com.github.fge.jsonschema.core.processing.ProcessingResult; +import com.github.fge.jsonschema.core.processing.Processor; +import com.github.fge.jsonschema.core.report.ListProcessingReport; +import com.github.fge.jsonschema.core.report.MessageProvider; +import com.github.fge.jsonschema.core.report.ProcessingReport; +import com.github.fge.jsonschema.core.report.ReportProvider; +import com.github.fge.jsonschema.core.tree.SchemaTree; +import com.github.fge.jsonschema.core.tree.SimpleJsonTree; +import com.github.fge.jsonschema.processors.data.FullData; +import com.github.fge.jsonschema.processors.validation.ValidationProcessor; + +import javax.annotation.concurrent.Immutable; + +/** + * Single-schema instance validator + * + *

    This is the class you will use the most often. It is, in essence, a {@link + * JsonValidator} initialized with a single JSON Schema. Note however that this + * class still retains the ability to resolve JSON References.

    + * + *

    It has no public constructors: you should use the appropriate methods in + * {@link JsonSchemaFactory} to obtain an instance of this class.

    + */ +@Immutable +final class JsonSchemaImpl implements JsonSchema +{ + private final ValidationProcessor processor; + private final SchemaTree schema; + private final ReportProvider reportProvider; + + /** + * Package private constructor + * + * @param processor the validation processor + * @param schema the schema to bind to this instance + * @param reportProvider the report provider + */ + JsonSchemaImpl(final ValidationProcessor processor, final SchemaTree schema, + final ReportProvider reportProvider) + { + this.processor = processor; + this.schema = schema; + this.reportProvider = reportProvider; + } + + private ProcessingReport doValidate(final JsonNode node, + final boolean deepCheck) + throws ProcessingException + { + final FullData data = new FullData(schema, new SimpleJsonTree(node), + deepCheck); + final ProcessingReport report = reportProvider.newReport(); + final ProcessingResult result + = ProcessingResult.of(processor, report, data); + return result.getReport(); + } + + private ProcessingReport doValidateUnchecked(final JsonNode node, + final boolean deepCheck) + { + final FullData data = new FullData(schema, new SimpleJsonTree(node), + deepCheck); + final ProcessingReport report = reportProvider.newReport(); + final ProcessingResult result + = ProcessingResult.uncheckedResult(processor, report, data); + return result.getReport(); + } + + /** + * {@inheritDoc} + */ + @Override + public ProcessingReport validate(final JsonNode instance, + final boolean deepCheck) + throws ProcessingException + { + return doValidate(instance, deepCheck); + } + + /** + * {@inheritDoc} + */ + @Override + public ProcessingReport validate(final JsonNode instance) + throws ProcessingException + { + return validate(instance, false); + } + + /** + * {@inheritDoc} + */ + @Override + public ProcessingReport validateUnchecked(final JsonNode instance, + final boolean deepCheck) + { + return doValidateUnchecked(instance, deepCheck); + } + + /** + * {@inheritDoc} + */ + @Override + public ProcessingReport validateUnchecked(final JsonNode instance) + { + return doValidateUnchecked(instance, false); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean validInstance(final JsonNode instance) + throws ProcessingException + { + return doValidate(instance, false).isSuccess(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean validInstanceUnchecked(final JsonNode instance) + { + return doValidateUnchecked(instance, false).isSuccess(); + } +} diff --git a/src/main/java/com/github/fge/jsonschema/main/JsonValidator.java b/src/main/java/com/github/fge/jsonschema/main/JsonValidator.java index 72b8a31ba..0fa7cc28c 100644 --- a/src/main/java/com/github/fge/jsonschema/main/JsonValidator.java +++ b/src/main/java/com/github/fge/jsonschema/main/JsonValidator.java @@ -188,7 +188,7 @@ JsonSchema buildJsonSchema(final JsonNode schema, final JsonPointer pointer) if (tree.getNode().isMissingNode()) throw new JsonReferenceException(new ProcessingMessage() .setMessage(BUNDLE.getMessage("danglingRef"))); - return new JsonSchema(processor, tree, reportProvider); + return new JsonSchemaImpl(processor, tree, reportProvider); } /** @@ -212,7 +212,7 @@ JsonSchema buildJsonSchema(final String uri) if (tree.getNode().isMissingNode()) throw new JsonReferenceException(new ProcessingMessage() .setMessage(BUNDLE.getMessage("danglingRef"))); - return new JsonSchema(processor, tree, reportProvider); + return new JsonSchemaImpl(processor, tree, reportProvider); } /** diff --git a/src/main/java/com/github/fge/jsonschema/processors/validation/InstanceValidator.java b/src/main/java/com/github/fge/jsonschema/processors/validation/InstanceValidator.java index 9267950bb..4b79aa145 100644 --- a/src/main/java/com/github/fge/jsonschema/processors/validation/InstanceValidator.java +++ b/src/main/java/com/github/fge/jsonschema/processors/validation/InstanceValidator.java @@ -31,7 +31,6 @@ import com.github.fge.jsonschema.core.tree.JsonTree; import com.github.fge.jsonschema.core.tree.SchemaTree; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; -import com.github.fge.jsonschema.main.JsonSchema; import com.github.fge.jsonschema.main.JsonValidator; import com.github.fge.jsonschema.processors.data.FullData; import com.github.fge.jsonschema.processors.data.SchemaContext; diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example9.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example9.java index df3714f3d..ce02e0d65 100644 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example9.java +++ b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example9.java @@ -40,6 +40,7 @@ import com.github.fge.jsonschema.library.Library; import com.github.fge.jsonschema.library.LibraryBuilder; import com.github.fge.jsonschema.main.JsonSchema; +import com.github.fge.jsonschema.main.JsonSchemaImpl; import com.github.fge.jsonschema.main.JsonSchemaFactory; import com.github.fge.jsonschema.messages.JsonSchemaValidationBundle; import com.github.fge.jsonschema.processors.data.FullData; From 42ab7698dbf23110698c49527c7c7e38d07cb1fd Mon Sep 17 00:00:00 2001 From: Thomas Holmes Date: Thu, 16 Jul 2015 16:55:37 -0700 Subject: [PATCH 17/71] Switch KeywordValidators to use a factory model --- .../validator/KeywordValidatorFactory.java | 20 +++++++ .../ReflectionKeywordValidatorFactory.java | 52 +++++++++++++++++++ .../fge/jsonschema/library/Keyword.java | 10 ++-- .../jsonschema/library/KeywordBuilder.java | 39 +++++++------- .../fge/jsonschema/library/Library.java | 12 ++--- .../jsonschema/library/LibraryBuilder.java | 10 ++-- .../validator/CommonValidatorDictionary.java | 41 +++++++-------- .../validator/DraftV3ValidatorDictionary.java | 31 +++++------ .../validator/DraftV4ValidatorDictionary.java | 39 ++++++-------- .../processors/build/ValidatorBuilder.java | 43 +++++---------- .../keyword/special/ExtendsKeywordTest.java | 34 ++++++------ .../keyword/special/NotKeywordTest.java | 35 +++++++------ .../keyword/special/PatternKeywordTest.java | 39 +++++++------- .../AbstractKeywordValidatorTest.java | 40 +++++++------- .../callback/CallbackValidatorTest.java | 40 ++++++++------ .../build/ValidatorBuilderTest.java | 36 +++++++------ 16 files changed, 286 insertions(+), 235 deletions(-) create mode 100755 src/main/java/com/github/fge/jsonschema/keyword/validator/KeywordValidatorFactory.java create mode 100755 src/main/java/com/github/fge/jsonschema/keyword/validator/ReflectionKeywordValidatorFactory.java diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/KeywordValidatorFactory.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/KeywordValidatorFactory.java new file mode 100755 index 000000000..db84c642e --- /dev/null +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/KeywordValidatorFactory.java @@ -0,0 +1,20 @@ +package com.github.fge.jsonschema.keyword.validator; + +import com.fasterxml.jackson.databind.JsonNode; +import com.github.fge.jsonschema.core.exceptions.ProcessingException; + +/** + * Interface for a keyword validator factory + */ +public interface KeywordValidatorFactory +{ + /** + * Create a validator for the instance + * + * @param node the instance to validate + * @return a validator for the given instance + * @throws ProcessingException an error occurs creating the validator + */ + KeywordValidator getKeywordValidator(JsonNode node) + throws ProcessingException; +} diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/ReflectionKeywordValidatorFactory.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/ReflectionKeywordValidatorFactory.java new file mode 100755 index 000000000..54e394c1c --- /dev/null +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/ReflectionKeywordValidatorFactory.java @@ -0,0 +1,52 @@ +package com.github.fge.jsonschema.keyword.validator; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import com.fasterxml.jackson.databind.JsonNode; +import com.github.fge.jsonschema.core.exceptions.ProcessingException; +import com.github.fge.jsonschema.messages.JsonSchemaConfigurationBundle; +import com.github.fge.msgsimple.bundle.MessageBundle; +import com.github.fge.msgsimple.load.MessageBundles; + +/** + * A validator factory that uses reflection to create an instance of the + * specified KeywordValidator class + */ +public class ReflectionKeywordValidatorFactory + implements KeywordValidatorFactory +{ + private static final String ERRMSG = "failed to build keyword validator"; + private static final MessageBundle BUNDLE + = MessageBundles.getBundle(JsonSchemaConfigurationBundle.class); + + private final Constructor constructor; + + public ReflectionKeywordValidatorFactory(String name, + Class clazz) + { + try { + constructor = clazz.getConstructor(JsonNode.class); + } catch (NoSuchMethodException ignored) { + throw new IllegalArgumentException(BUNDLE.printf( + "noAppropriateConstructor", name, clazz.getCanonicalName() + )); + } + } + + @Override + public KeywordValidator getKeywordValidator(JsonNode node) + throws ProcessingException + { + try { + return constructor.newInstance(node); + } catch (InstantiationException e) { + throw new ProcessingException(ERRMSG, e); + } catch (IllegalAccessException e) { + throw new ProcessingException(ERRMSG, e); + } catch (InvocationTargetException e) { + throw new ProcessingException(ERRMSG, e); + } + } + +} diff --git a/src/main/java/com/github/fge/jsonschema/library/Keyword.java b/src/main/java/com/github/fge/jsonschema/library/Keyword.java index b9a6d8ea1..adace7d33 100644 --- a/src/main/java/com/github/fge/jsonschema/library/Keyword.java +++ b/src/main/java/com/github/fge/jsonschema/library/Keyword.java @@ -22,9 +22,7 @@ import com.github.fge.Frozen; import com.github.fge.jsonschema.core.keyword.syntax.checkers.SyntaxChecker; import com.github.fge.jsonschema.keyword.digest.Digester; -import com.github.fge.jsonschema.keyword.validator.KeywordValidator; - -import java.lang.reflect.Constructor; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; /** @@ -51,9 +49,9 @@ public final class Keyword final Digester digester; /** - * {@link KeywordValidator} constructor + * Validator factory */ - final Constructor constructor; + final KeywordValidatorFactory validatorFactory; /** * Instantiate a new keyword builder @@ -79,7 +77,7 @@ public static KeywordBuilder newBuilder(final String name) name = builder.name; syntaxChecker = builder.syntaxChecker; digester = builder.digester; - constructor = builder.constructor; + validatorFactory = builder.validatorFactory; } /** diff --git a/src/main/java/com/github/fge/jsonschema/library/KeywordBuilder.java b/src/main/java/com/github/fge/jsonschema/library/KeywordBuilder.java index fd1f9b330..553b1f8a0 100644 --- a/src/main/java/com/github/fge/jsonschema/library/KeywordBuilder.java +++ b/src/main/java/com/github/fge/jsonschema/library/KeywordBuilder.java @@ -19,7 +19,6 @@ package com.github.fge.jsonschema.library; -import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.Thawed; import com.github.fge.jackson.NodeType; import com.github.fge.jsonschema.core.keyword.syntax.checkers.SyntaxChecker; @@ -27,12 +26,12 @@ import com.github.fge.jsonschema.keyword.digest.helpers.IdentityDigester; import com.github.fge.jsonschema.keyword.digest.helpers.SimpleDigester; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; +import com.github.fge.jsonschema.keyword.validator.ReflectionKeywordValidatorFactory; import com.github.fge.jsonschema.messages.JsonSchemaConfigurationBundle; import com.github.fge.msgsimple.bundle.MessageBundle; import com.github.fge.msgsimple.load.MessageBundles; -import java.lang.reflect.Constructor; - /** * A keyword builder -- the thawed version of a {@link Keyword} * @@ -48,7 +47,7 @@ public final class KeywordBuilder final String name; SyntaxChecker syntaxChecker; Digester digester; - Constructor constructor; + KeywordValidatorFactory validatorFactory; /** * Create a new, empty keyword builder @@ -74,7 +73,7 @@ public final class KeywordBuilder name = keyword.name; syntaxChecker = keyword.syntaxChecker; digester = keyword.digester; - constructor = keyword.constructor; + validatorFactory = keyword.validatorFactory; } /** @@ -149,7 +148,20 @@ public KeywordBuilder withSimpleDigester(final NodeType first, public KeywordBuilder withValidatorClass( final Class c) { - constructor = getConstructor(name, c); + validatorFactory = new ReflectionKeywordValidatorFactory(name, c); + return this; + } + + /** + * Set the validator factory for this keyword + * + * @param factory the factory + * @return this + */ + public KeywordBuilder withValidatorFactory( + KeywordValidatorFactory factory) + { + validatorFactory = factory; return this; } @@ -169,24 +181,11 @@ public Keyword freeze() * We can have a keyword without a validator; however, if there is one, * there must be a digester. */ - BUNDLE.checkArgumentPrintf(constructor == null || digester != null, + BUNDLE.checkArgumentPrintf(validatorFactory == null || digester != null, "malformedKeyword", name); return new Keyword(this); } - - private static Constructor getConstructor( - final String name, final Class c) - { - try { - return c.getConstructor(JsonNode.class); - } catch (NoSuchMethodException ignored) { - throw new IllegalArgumentException(BUNDLE.printf( - "noAppropriateConstructor", name, c.getCanonicalName() - )); - } - } - private static NodeType checkType(final NodeType type) { return BUNDLE.checkNotNull(type, "nullType"); diff --git a/src/main/java/com/github/fge/jsonschema/library/Library.java b/src/main/java/com/github/fge/jsonschema/library/Library.java index 74aa566ce..24087f1a6 100644 --- a/src/main/java/com/github/fge/jsonschema/library/Library.java +++ b/src/main/java/com/github/fge/jsonschema/library/Library.java @@ -26,9 +26,7 @@ import com.github.fge.jsonschema.core.util.Dictionary; import com.github.fge.jsonschema.format.FormatAttribute; import com.github.fge.jsonschema.keyword.digest.Digester; -import com.github.fge.jsonschema.keyword.validator.KeywordValidator; - -import java.lang.reflect.Constructor; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; /** * A schema keyword library @@ -54,9 +52,9 @@ public final class Library final Dictionary digesters; /** - * Dictionary of keyword validator constructors + * Dictionary of keyword validator factories */ - final Dictionary> validators; + final Dictionary validators; /** * Dictionary of format attributes @@ -97,7 +95,7 @@ public static LibraryBuilder newBuilder() */ Library(final Dictionary syntaxCheckers, final Dictionary digesters, - final Dictionary> validators, + final Dictionary validators, final Dictionary formatAttributes) { this.syntaxCheckers = syntaxCheckers; @@ -131,7 +129,7 @@ public Dictionary getDigesters() * * @return a dictionary */ - public Dictionary> getValidators() + public Dictionary getValidators() { return validators; } diff --git a/src/main/java/com/github/fge/jsonschema/library/LibraryBuilder.java b/src/main/java/com/github/fge/jsonschema/library/LibraryBuilder.java index b65f64264..93d2a170a 100644 --- a/src/main/java/com/github/fge/jsonschema/library/LibraryBuilder.java +++ b/src/main/java/com/github/fge/jsonschema/library/LibraryBuilder.java @@ -25,13 +25,11 @@ import com.github.fge.jsonschema.core.util.DictionaryBuilder; import com.github.fge.jsonschema.format.FormatAttribute; import com.github.fge.jsonschema.keyword.digest.Digester; -import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; import com.github.fge.jsonschema.messages.JsonSchemaConfigurationBundle; import com.github.fge.msgsimple.bundle.MessageBundle; import com.github.fge.msgsimple.load.MessageBundles; -import java.lang.reflect.Constructor; - /** * Mutable version of a library * @@ -60,7 +58,7 @@ public final class LibraryBuilder /** * Dictionary builder of keyword validator constructors */ - final DictionaryBuilder> validators; + final DictionaryBuilder validators; /** * Dictionary builder of format attributes @@ -107,9 +105,9 @@ public LibraryBuilder addKeyword(final Keyword keyword) syntaxCheckers.addEntry(name, keyword.syntaxChecker); - if (keyword.constructor != null) { + if (keyword.validatorFactory != null) { digesters.addEntry(name, keyword.digester); - validators.addEntry(name, keyword.constructor); + validators.addEntry(name, keyword.validatorFactory); } return this; } diff --git a/src/main/java/com/github/fge/jsonschema/library/validator/CommonValidatorDictionary.java b/src/main/java/com/github/fge/jsonschema/library/validator/CommonValidatorDictionary.java index 20ade1257..b96141b72 100644 --- a/src/main/java/com/github/fge/jsonschema/library/validator/CommonValidatorDictionary.java +++ b/src/main/java/com/github/fge/jsonschema/library/validator/CommonValidatorDictionary.java @@ -19,10 +19,11 @@ package com.github.fge.jsonschema.library.validator; -import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jsonschema.core.util.Dictionary; import com.github.fge.jsonschema.core.util.DictionaryBuilder; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; +import com.github.fge.jsonschema.keyword.validator.ReflectionKeywordValidatorFactory; import com.github.fge.jsonschema.keyword.validator.common.AdditionalItemsValidator; import com.github.fge.jsonschema.keyword.validator.common.AdditionalPropertiesValidator; import com.github.fge.jsonschema.keyword.validator.common.EnumValidator; @@ -35,27 +36,25 @@ import com.github.fge.jsonschema.keyword.validator.common.PatternValidator; import com.github.fge.jsonschema.keyword.validator.common.UniqueItemsValidator; -import java.lang.reflect.Constructor; - /** * Keyword validator constructors common to draft v4 and v3 */ public final class CommonValidatorDictionary { - private static final Dictionary> + private static final Dictionary DICTIONARY; private CommonValidatorDictionary() { } - public static Dictionary> get() + public static Dictionary get() { return DICTIONARY; } static { - final DictionaryBuilder> + final DictionaryBuilder builder = Dictionary.newBuilder(); String keyword; @@ -66,67 +65,63 @@ public static Dictionary> get() */ keyword = "additionalItems"; c = AdditionalItemsValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "minItems"; c = MinItemsValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "maxItems"; c = MaxItemsValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "uniqueItems"; c = UniqueItemsValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); /* * Numbers and integers */ keyword = "minimum"; c = MinimumValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "maximum"; c = MaximumValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); /* * Objects */ keyword = "additionalProperties"; c = AdditionalPropertiesValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); /* * Strings */ keyword = "minLength"; c = MinLengthValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "maxLength"; c = MaxLengthValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "pattern"; c = PatternValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "enum"; c = EnumValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); DICTIONARY = builder.freeze(); } - private static Constructor constructor( + private static KeywordValidatorFactory factory(String name, final Class c) { - try { - return c.getConstructor(JsonNode.class); - } catch (NoSuchMethodException e) { - throw new RuntimeException("No appropriate constructor", e); - } + return new ReflectionKeywordValidatorFactory(name, c); } } diff --git a/src/main/java/com/github/fge/jsonschema/library/validator/DraftV3ValidatorDictionary.java b/src/main/java/com/github/fge/jsonschema/library/validator/DraftV3ValidatorDictionary.java index a6d648c11..ecf982b1f 100644 --- a/src/main/java/com/github/fge/jsonschema/library/validator/DraftV3ValidatorDictionary.java +++ b/src/main/java/com/github/fge/jsonschema/library/validator/DraftV3ValidatorDictionary.java @@ -19,10 +19,11 @@ package com.github.fge.jsonschema.library.validator; -import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jsonschema.core.util.Dictionary; import com.github.fge.jsonschema.core.util.DictionaryBuilder; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; +import com.github.fge.jsonschema.keyword.validator.ReflectionKeywordValidatorFactory; import com.github.fge.jsonschema.keyword.validator.common.DependenciesValidator; import com.github.fge.jsonschema.keyword.validator.draftv3.DisallowKeywordValidator; import com.github.fge.jsonschema.keyword.validator.draftv3.DivisibleByValidator; @@ -30,27 +31,25 @@ import com.github.fge.jsonschema.keyword.validator.draftv3.ExtendsValidator; import com.github.fge.jsonschema.keyword.validator.draftv3.PropertiesValidator; -import java.lang.reflect.Constructor; - /** * Draft v3 specific keyword validator constructors */ public final class DraftV3ValidatorDictionary { - private static final Dictionary> + private static final Dictionary DICTIONARY; private DraftV3ValidatorDictionary() { } - public static Dictionary> get() + public static Dictionary get() { return DICTIONARY; } static { - final DictionaryBuilder> + final DictionaryBuilder builder = Dictionary.newBuilder(); String keyword; @@ -63,41 +62,37 @@ public static Dictionary> get() */ keyword = "divisibleBy"; c = DivisibleByValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); /* * Object */ keyword = "properties"; c = PropertiesValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "dependencies"; c = DependenciesValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "type"; c = DraftV3TypeValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "disallow"; c = DisallowKeywordValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "extends"; c = ExtendsValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); DICTIONARY = builder.freeze(); } - private static Constructor constructor( + private static KeywordValidatorFactory factory(String name, final Class c) { - try { - return c.getConstructor(JsonNode.class); - } catch (NoSuchMethodException e) { - throw new RuntimeException("No appropriate constructor found", e); - } + return new ReflectionKeywordValidatorFactory(name, c); } } diff --git a/src/main/java/com/github/fge/jsonschema/library/validator/DraftV4ValidatorDictionary.java b/src/main/java/com/github/fge/jsonschema/library/validator/DraftV4ValidatorDictionary.java index 6e517c7c9..a82a74b49 100644 --- a/src/main/java/com/github/fge/jsonschema/library/validator/DraftV4ValidatorDictionary.java +++ b/src/main/java/com/github/fge/jsonschema/library/validator/DraftV4ValidatorDictionary.java @@ -19,10 +19,11 @@ package com.github.fge.jsonschema.library.validator; -import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jsonschema.core.util.Dictionary; import com.github.fge.jsonschema.core.util.DictionaryBuilder; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; +import com.github.fge.jsonschema.keyword.validator.ReflectionKeywordValidatorFactory; import com.github.fge.jsonschema.keyword.validator.common.DependenciesValidator; import com.github.fge.jsonschema.keyword.validator.draftv4.AllOfValidator; import com.github.fge.jsonschema.keyword.validator.draftv4.AnyOfValidator; @@ -34,27 +35,25 @@ import com.github.fge.jsonschema.keyword.validator.draftv4.OneOfValidator; import com.github.fge.jsonschema.keyword.validator.draftv4.RequiredKeywordValidator; -import java.lang.reflect.Constructor; - /** * Draft v4 specific keyword validator constructors */ public final class DraftV4ValidatorDictionary { - private static final Dictionary> + private static final Dictionary DICTIONARY; private DraftV4ValidatorDictionary() { } - public static Dictionary> get() + public static Dictionary get() { return DICTIONARY; } static { - final DictionaryBuilder> + final DictionaryBuilder builder = Dictionary.newBuilder(); String keyword; @@ -67,60 +66,56 @@ public static Dictionary> get() */ keyword = "multipleOf"; c = MultipleOfValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); /* * Object */ keyword = "minProperties"; c = MinPropertiesValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "maxProperties"; c = MaxPropertiesValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "required"; c = RequiredKeywordValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "dependencies"; c = DependenciesValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); /* * All */ keyword = "anyOf"; c = AnyOfValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "allOf"; c = AllOfValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "oneOf"; c = OneOfValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "not"; c = NotValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); keyword = "type"; c = DraftV4TypeValidator.class; - builder.addEntry(keyword, constructor(c)); + builder.addEntry(keyword, factory(keyword, c)); DICTIONARY = builder.freeze(); } - private static Constructor constructor( + private static KeywordValidatorFactory factory(String name, final Class c) { - try { - return c.getConstructor(JsonNode.class); - } catch (NoSuchMethodException e) { - throw new RuntimeException("No appropriate constructor found", e); - } + return new ReflectionKeywordValidatorFactory(name, c); } } diff --git a/src/main/java/com/github/fge/jsonschema/processors/build/ValidatorBuilder.java b/src/main/java/com/github/fge/jsonschema/processors/build/ValidatorBuilder.java index f8fba5171..27409c83b 100644 --- a/src/main/java/com/github/fge/jsonschema/processors/build/ValidatorBuilder.java +++ b/src/main/java/com/github/fge/jsonschema/processors/build/ValidatorBuilder.java @@ -19,23 +19,22 @@ package com.github.fge.jsonschema.processors.build; +import java.util.Map; +import java.util.SortedMap; + import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jsonschema.core.exceptions.ProcessingException; import com.github.fge.jsonschema.core.processing.Processor; import com.github.fge.jsonschema.core.report.ProcessingReport; import com.github.fge.jsonschema.core.util.Dictionary; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; import com.github.fge.jsonschema.library.Library; import com.github.fge.jsonschema.processors.data.SchemaDigest; import com.github.fge.jsonschema.processors.data.ValidatorList; import com.github.fge.jsonschema.processors.validation.ValidationProcessor; import com.google.common.collect.Maps; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.Map; -import java.util.SortedMap; - /** * Keyword builder processor * @@ -48,20 +47,18 @@ public final class ValidatorBuilder implements Processor { - private static final String ERRMSG = "failed to build keyword validator"; - - private final Map> - constructors; + private final Map + factories; public ValidatorBuilder(final Library library) { - constructors = library.getValidators().entries(); + factories = library.getValidators().entries(); } public ValidatorBuilder( - final Dictionary> dict) + final Dictionary dict) { - constructors = dict.entries(); + factories = dict.entries(); } /** @@ -82,35 +79,19 @@ public ValidatorList process(final ProcessingReport report, String keyword; JsonNode digest; KeywordValidator validator; - Constructor constructor; + KeywordValidatorFactory factory; for (final Map.Entry entry: input.getDigests().entrySet()) { keyword = entry.getKey(); digest = entry.getValue(); - constructor = constructors.get(keyword); - validator = buildKeyword(constructor, digest); + factory = factories.get(keyword); + validator = factory.getKeywordValidator(digest); map.put(keyword, validator); } return new ValidatorList(input.getContext(), map.values()); } - private static KeywordValidator buildKeyword( - final Constructor constructor, - final JsonNode node) - throws ProcessingException - { - try { - return constructor.newInstance(node); - } catch (InstantiationException e) { - throw new ProcessingException(ERRMSG, e); - } catch (IllegalAccessException e) { - throw new ProcessingException(ERRMSG, e); - } catch (InvocationTargetException e) { - throw new ProcessingException(ERRMSG, e); - } - } - @Override public String toString() { diff --git a/src/test/java/com/github/fge/jsonschema/keyword/special/ExtendsKeywordTest.java b/src/test/java/com/github/fge/jsonschema/keyword/special/ExtendsKeywordTest.java index 36bcee0c9..32fab2b55 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/special/ExtendsKeywordTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/special/ExtendsKeywordTest.java @@ -19,6 +19,19 @@ package com.github.fge.jsonschema.keyword.special; +import static com.github.fge.jsonschema.TestUtils.anyMessage; +import static com.github.fge.jsonschema.matchers.ProcessingMessageAssert.assertMessage; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.fail; + +import org.mockito.ArgumentCaptor; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; import com.github.fge.jackson.JacksonUtils; @@ -33,22 +46,12 @@ import com.github.fge.jsonschema.core.tree.SimpleJsonTree; import com.github.fge.jsonschema.core.tree.key.SchemaKey; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; import com.github.fge.jsonschema.library.validator.DraftV3ValidatorDictionary; import com.github.fge.jsonschema.messages.JsonSchemaValidationBundle; import com.github.fge.jsonschema.processors.data.FullData; import com.github.fge.msgsimple.bundle.MessageBundle; import com.github.fge.msgsimple.load.MessageBundles; -import org.mockito.ArgumentCaptor; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -import static com.github.fge.jsonschema.TestUtils.*; -import static com.github.fge.jsonschema.matchers.ProcessingMessageAssert.*; -import static org.mockito.Mockito.*; -import static org.testng.Assert.*; public final class ExtendsKeywordTest { @@ -65,13 +68,12 @@ public final class ExtendsKeywordTest private ProcessingMessage msg; public ExtendsKeywordTest() - throws IllegalAccessException, InvocationTargetException, - InstantiationException + throws ProcessingException { - final Constructor constructor + final KeywordValidatorFactory factory = DraftV3ValidatorDictionary.get().entries().get("extends"); - validator = constructor == null ? null - : constructor.newInstance(FACTORY.nullNode()); + validator = factory == null ? null + : factory.getKeywordValidator(FACTORY.nullNode()); } @BeforeMethod diff --git a/src/test/java/com/github/fge/jsonschema/keyword/special/NotKeywordTest.java b/src/test/java/com/github/fge/jsonschema/keyword/special/NotKeywordTest.java index 3270529a3..243f1ddf8 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/special/NotKeywordTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/special/NotKeywordTest.java @@ -19,6 +19,20 @@ package com.github.fge.jsonschema.keyword.special; +import static com.github.fge.jsonschema.TestUtils.anyMessage; +import static com.github.fge.jsonschema.matchers.ProcessingMessageAssert.assertMessage; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.fail; + +import org.mockito.ArgumentCaptor; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; import com.github.fge.jackson.JacksonUtils; @@ -34,22 +48,12 @@ import com.github.fge.jsonschema.core.tree.SimpleJsonTree; import com.github.fge.jsonschema.core.tree.key.SchemaKey; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; import com.github.fge.jsonschema.library.validator.DraftV4ValidatorDictionary; import com.github.fge.jsonschema.messages.JsonSchemaValidationBundle; import com.github.fge.jsonschema.processors.data.FullData; import com.github.fge.msgsimple.bundle.MessageBundle; import com.github.fge.msgsimple.load.MessageBundles; -import org.mockito.ArgumentCaptor; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -import static com.github.fge.jsonschema.TestUtils.*; -import static com.github.fge.jsonschema.matchers.ProcessingMessageAssert.*; -import static org.mockito.Mockito.*; -import static org.testng.Assert.*; public final class NotKeywordTest { @@ -65,13 +69,12 @@ public final class NotKeywordTest private ProcessingReport report; public NotKeywordTest() - throws IllegalAccessException, InvocationTargetException, - InstantiationException + throws ProcessingException { - final Constructor constructor + final KeywordValidatorFactory factory = DraftV4ValidatorDictionary.get().entries().get("not"); - validator = constructor == null ? null - : constructor.newInstance(FACTORY.nullNode()); + validator = factory == null ? null + : factory.getKeywordValidator(FACTORY.nullNode()); } @BeforeMethod diff --git a/src/test/java/com/github/fge/jsonschema/keyword/special/PatternKeywordTest.java b/src/test/java/com/github/fge/jsonschema/keyword/special/PatternKeywordTest.java index 6ff655ae0..873041061 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/special/PatternKeywordTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/special/PatternKeywordTest.java @@ -19,6 +19,22 @@ package com.github.fge.jsonschema.keyword.special; +import static com.github.fge.jsonschema.TestUtils.anyMessage; +import static com.github.fge.jsonschema.matchers.ProcessingMessageAssert.assertMessage; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.testng.Assert.assertNotNull; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.util.Iterator; +import java.util.List; + +import org.mockito.ArgumentCaptor; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.github.fge.jackson.JsonLoader; @@ -33,26 +49,13 @@ import com.github.fge.jsonschema.core.tree.SimpleJsonTree; import com.github.fge.jsonschema.core.tree.key.SchemaKey; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; import com.github.fge.jsonschema.library.validator.CommonValidatorDictionary; import com.github.fge.jsonschema.messages.JsonSchemaValidationBundle; import com.github.fge.jsonschema.processors.data.FullData; import com.github.fge.msgsimple.bundle.MessageBundle; import com.github.fge.msgsimple.load.MessageBundles; import com.google.common.collect.Lists; -import org.mockito.ArgumentCaptor; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -import java.io.IOException; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.Iterator; -import java.util.List; - -import static com.github.fge.jsonschema.TestUtils.*; -import static com.github.fge.jsonschema.matchers.ProcessingMessageAssert.*; -import static org.mockito.Mockito.*; -import static org.testng.Assert.*; public final class PatternKeywordTest { @@ -65,20 +68,20 @@ public final class PatternKeywordTest private static final MessageBundle BUNDLE = MessageBundles.getBundle(JsonSchemaValidationBundle.class); - private final Constructor constructor; + private final KeywordValidatorFactory factory; private final JsonNode testData; public PatternKeywordTest() throws IOException { - constructor = CommonValidatorDictionary.get().entries().get("pattern"); + factory = CommonValidatorDictionary.get().entries().get("pattern"); testData = JsonLoader.fromResource("/keyword/special/pattern.json"); } @Test public void keywordExists() { - assertNotNull(constructor, "no support for pattern??"); + assertNotNull(factory, "no support for pattern??"); } @DataProvider @@ -120,7 +123,7 @@ public void instancesAreValidatedCorrectly(final JsonNode schema, // It is a null node which is ignored by the constructor, so we can // do that - final KeywordValidator validator = constructor.newInstance(schema); + final KeywordValidator validator = factory.getKeywordValidator(schema); validator.validate(processor, report, BUNDLE, data); if (valid) { diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/AbstractKeywordValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/AbstractKeywordValidatorTest.java index aa69bcec9..9916d8a8d 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/AbstractKeywordValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/AbstractKeywordValidatorTest.java @@ -19,6 +19,22 @@ package com.github.fge.jsonschema.keyword.validator; +import static com.github.fge.jsonschema.TestUtils.anyMessage; +import static com.github.fge.jsonschema.matchers.ProcessingMessageAssert.assertMessage; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; +import static org.mockito.Mockito.verify; +import static org.testng.Assert.assertNotNull; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.util.Iterator; +import java.util.List; + +import org.mockito.ArgumentCaptor; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.github.fge.jackson.JsonLoader; @@ -38,20 +54,6 @@ import com.github.fge.msgsimple.bundle.MessageBundle; import com.github.fge.msgsimple.load.MessageBundles; import com.google.common.collect.Lists; -import org.mockito.ArgumentCaptor; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -import java.io.IOException; -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; -import java.util.Iterator; -import java.util.List; - -import static com.github.fge.jsonschema.TestUtils.*; -import static com.github.fge.jsonschema.matchers.ProcessingMessageAssert.*; -import static org.mockito.Mockito.*; -import static org.testng.Assert.*; @Test public abstract class AbstractKeywordValidatorTest @@ -60,16 +62,16 @@ public abstract class AbstractKeywordValidatorTest = MessageBundles.getBundle(JsonSchemaValidationBundle.class); private final String keyword; - private final Constructor constructor; + private final KeywordValidatorFactory factory; private final JsonNode testNode; protected AbstractKeywordValidatorTest( - final Dictionary> dict, + final Dictionary dict, final String prefix, final String keyword) throws IOException { this.keyword = keyword; - constructor = dict.entries().get(keyword); + factory = dict.entries().get(keyword); final String resourceName = String.format("/keyword/validators/%s/%s.json", prefix, keyword); testNode = JsonLoader.fromResource(resourceName); @@ -78,7 +80,7 @@ protected AbstractKeywordValidatorTest( @Test public final void keywordExists() { - assertNotNull(constructor, "no support for " + keyword + "??"); + assertNotNull(factory, "no support for " + keyword + "??"); } @DataProvider @@ -120,7 +122,7 @@ public final void instancesAreValidatedCorrectly(final JsonNode digest, @SuppressWarnings("unchecked") final Processor processor = mock(Processor.class); - final KeywordValidator validator = constructor.newInstance(digest); + final KeywordValidator validator = factory.getKeywordValidator(digest); validator.validate(processor, report, BUNDLE, data); if (valid) { diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/CallbackValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/CallbackValidatorTest.java index 07ba21ec8..d5d936e94 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/CallbackValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/CallbackValidatorTest.java @@ -19,6 +19,21 @@ package com.github.fge.jsonschema.keyword.validator.callback; +import static com.github.fge.jsonschema.TestUtils.anyReport; +import static com.github.fge.jsonschema.TestUtils.onlyOnce; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.fail; + +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; @@ -36,19 +51,11 @@ import com.github.fge.jsonschema.core.tree.key.SchemaKey; import com.github.fge.jsonschema.core.util.Dictionary; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; import com.github.fge.jsonschema.messages.JsonSchemaValidationBundle; import com.github.fge.jsonschema.processors.data.FullData; import com.github.fge.msgsimple.bundle.MessageBundle; import com.github.fge.msgsimple.load.MessageBundles; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.Test; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -import static com.github.fge.jsonschema.TestUtils.*; -import static org.mockito.Mockito.*; -import static org.testng.Assert.*; @Test public abstract class CallbackValidatorTest @@ -62,7 +69,7 @@ public abstract class CallbackValidatorTest protected static final ObjectNode sub2 = FACTORY.objectNode(); protected final String keyword; - private final Constructor constructor; + private final KeywordValidatorFactory factory; protected final JsonPointer ptr1; protected final JsonPointer ptr2; @@ -72,21 +79,20 @@ public abstract class CallbackValidatorTest private KeywordValidator validator; protected CallbackValidatorTest( - final Dictionary> dict, + final Dictionary dict, final String keyword, final JsonPointer ptr1, final JsonPointer ptr2) { this.keyword = keyword; - constructor = dict.entries().get(keyword); + factory = dict.entries().get(keyword); this.ptr1 = ptr1; this.ptr2 = ptr2; } @BeforeMethod protected final void initEnvironment() - throws IllegalAccessException, InvocationTargetException, - InstantiationException + throws ProcessingException { - if (constructor == null) + if (factory == null) return; final SchemaTree tree = new CanonicalSchemaTree( @@ -95,13 +101,13 @@ protected final void initEnvironment() data = new FullData(tree, instance); report = mock(ProcessingReport.class); when(report.getLogLevel()).thenReturn(LogLevel.DEBUG); - validator = constructor.newInstance(generateDigest()); + validator = factory.getKeywordValidator(generateDigest()); } @Test public final void keywordExists() { - assertNotNull(constructor, "no support for " + keyword + "??"); + assertNotNull(factory, "no support for " + keyword + "??"); } @Test(dependsOnMethods = "keywordExists") diff --git a/src/test/java/com/github/fge/jsonschema/processors/build/ValidatorBuilderTest.java b/src/test/java/com/github/fge/jsonschema/processors/build/ValidatorBuilderTest.java index 4887af34a..8f038c38c 100644 --- a/src/test/java/com/github/fge/jsonschema/processors/build/ValidatorBuilderTest.java +++ b/src/test/java/com/github/fge/jsonschema/processors/build/ValidatorBuilderTest.java @@ -19,6 +19,16 @@ package com.github.fge.jsonschema.processors.build; +import static org.mockito.Mockito.mock; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertSame; +import static org.testng.Assert.fail; + +import java.util.List; +import java.util.Map; + +import org.testng.annotations.Test; + import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jackson.JacksonUtils; import com.github.fge.jsonschema.core.exceptions.ProcessingException; @@ -27,20 +37,14 @@ import com.github.fge.jsonschema.core.util.Dictionary; import com.github.fge.jsonschema.core.util.DictionaryBuilder; import com.github.fge.jsonschema.keyword.validator.KeywordValidator; +import com.github.fge.jsonschema.keyword.validator.KeywordValidatorFactory; +import com.github.fge.jsonschema.keyword.validator.ReflectionKeywordValidatorFactory; import com.github.fge.jsonschema.processors.data.FullData; import com.github.fge.jsonschema.processors.data.SchemaDigest; import com.github.fge.jsonschema.processors.data.ValidatorList; import com.github.fge.msgsimple.bundle.MessageBundle; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import org.testng.annotations.Test; - -import java.lang.reflect.Constructor; -import java.util.List; -import java.util.Map; - -import static org.mockito.Mockito.*; -import static org.testng.Assert.*; public final class ValidatorBuilderTest { @@ -53,17 +57,17 @@ public final class ValidatorBuilderTest public ValidatorBuilderTest() throws NoSuchMethodException { - final DictionaryBuilder> + final DictionaryBuilder builder = Dictionary.newBuilder(); - Constructor constructor; + KeywordValidatorFactory factory; - constructor = Keyword1.class .getConstructor(JsonNode.class); - builder.addEntry(K1, constructor); - constructor = Keyword2.class.getConstructor(JsonNode.class); - builder.addEntry(K2, constructor); - constructor = Challenged.class.getConstructor(JsonNode.class); - builder.addEntry(CHALLENGED, constructor); + factory = new ReflectionKeywordValidatorFactory(K1, Keyword1.class); + builder.addEntry(K1, factory); + factory = new ReflectionKeywordValidatorFactory(K2, Keyword2.class); + builder.addEntry(K2, factory); + factory = new ReflectionKeywordValidatorFactory(CHALLENGED, Challenged.class); + builder.addEntry(CHALLENGED, factory); validatorBuilder = new ValidatorBuilder(builder.freeze()); } From ac2e2238a3552485bd01a8cf3957eb92eed7d058 Mon Sep 17 00:00:00 2001 From: Vikas Bodke Date: Tue, 10 Feb 2015 23:06:49 +0530 Subject: [PATCH 18/71] Fixes issue #143 opened by @rberger The secFracs field will support upto 12 chars --- .../format/common/DateTimeAttribute.java | 8 ++-- .../resources/format/common/date-time.json | 44 ++++++++++++++++++- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/github/fge/jsonschema/format/common/DateTimeAttribute.java b/src/main/java/com/github/fge/jsonschema/format/common/DateTimeAttribute.java index d2055314b..20a4a9821 100644 --- a/src/main/java/com/github/fge/jsonschema/format/common/DateTimeAttribute.java +++ b/src/main/java/com/github/fge/jsonschema/format/common/DateTimeAttribute.java @@ -42,13 +42,13 @@ public final class DateTimeAttribute extends AbstractFormatAttribute { private static final List FORMATS = ImmutableList.of( - "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.SSSZ" + "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}Z" ); private static final DateTimeFormatter FORMATTER; static { - final DateTimeParser msParser = new DateTimeFormatterBuilder() - .appendLiteral('.').appendDecimal(millisOfSecond(), 1, 3) + final DateTimeParser secFracsParser = new DateTimeFormatterBuilder() + .appendLiteral('.').appendFractionOfSecond(1,12) .toParser(); DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder(); @@ -64,7 +64,7 @@ public final class DateTimeAttribute .appendFixedDecimal(minuteOfHour(), 2) .appendLiteral(':') .appendFixedDecimal(secondOfMinute(), 2) - .appendOptional(msParser) + .appendOptional(secFracsParser) .appendTimeZoneOffset("Z", false, 2, 2); FORMATTER = builder.toFormatter(); diff --git a/src/test/resources/format/common/date-time.json b/src/test/resources/format/common/date-time.json index 1f2d96f1d..f79dcc701 100644 --- a/src/test/resources/format/common/date-time.json +++ b/src/test/resources/format/common/date-time.json @@ -25,7 +25,7 @@ "message": "err.format.invalidDate", "msgData": { "value": "2012-02-30T00:00:00+0000", - "expected": [ "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.SSSZ" ] + "expected": [ "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}Z" ] }, "msgParams": [ "value", "expected" ] }, @@ -35,8 +35,48 @@ "message": "err.format.invalidDate", "msgData": { "value": "201202030", - "expected": [ "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.SSSZ" ] + "expected": [ "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}Z" ] }, "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-08-07T20:42:32.1234Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.12345Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.123456Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.1234567Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.12345678Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.12345678Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.123456789Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.1234567890Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.12345678901Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.123456789012Z", + "valid": true } ] From 6b4c650f022f02f354a5e8e3099380f174f805d3 Mon Sep 17 00:00:00 2001 From: mmolina Date: Sat, 21 Nov 2015 00:32:30 +0100 Subject: [PATCH 19/71] Configurable cache size for processing validations Also: Changing default cache size to 512 --- .../jsonschema/cfg/ValidationConfiguration.java | 11 +++++++++++ .../cfg/ValidationConfigurationBuilder.java | 14 ++++++++++++++ .../fge/jsonschema/main/JsonSchemaFactory.java | 2 +- .../processors/validation/ValidationChain.java | 4 ++-- .../jsonschema/validator/configuration.properties | 1 + .../cfg/ValidationConfigurationTest.java | 12 ++++++++++++ 6 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/fge/jsonschema/cfg/ValidationConfiguration.java b/src/main/java/com/github/fge/jsonschema/cfg/ValidationConfiguration.java index b67fdc840..54a1b9360 100644 --- a/src/main/java/com/github/fge/jsonschema/cfg/ValidationConfiguration.java +++ b/src/main/java/com/github/fge/jsonschema/cfg/ValidationConfiguration.java @@ -70,6 +70,11 @@ public final class ValidationConfiguration * Whether to use {@code format} in the resulting factory */ final boolean useFormat; + + /** + * Cache size for processing validations + */ + final int cacheSize; /** * The set of syntax messages @@ -113,6 +118,7 @@ public static ValidationConfiguration byDefault() libraries = ImmutableMap.copyOf(builder.libraries); defaultLibrary = builder.defaultLibrary; useFormat = builder.useFormat; + cacheSize = builder.cacheSize; syntaxMessages = builder.syntaxMessages; validationMessages = builder.validationMessages; } @@ -146,6 +152,11 @@ public boolean getUseFormat() { return useFormat; } + + public int getCacheSize() + { + return cacheSize; + } public MessageBundle getSyntaxMessages() { diff --git a/src/main/java/com/github/fge/jsonschema/cfg/ValidationConfigurationBuilder.java b/src/main/java/com/github/fge/jsonschema/cfg/ValidationConfigurationBuilder.java index 61cdec21c..949a18b3b 100644 --- a/src/main/java/com/github/fge/jsonschema/cfg/ValidationConfigurationBuilder.java +++ b/src/main/java/com/github/fge/jsonschema/cfg/ValidationConfigurationBuilder.java @@ -80,6 +80,11 @@ public final class ValidationConfigurationBuilder * Whether to use {@code format} ({@code true} by default) */ boolean useFormat = true; + + /** + * Cache maximum size of 512 records by default + */ + int cacheSize = 512; /** * The set of syntax messages @@ -119,6 +124,7 @@ public final class ValidationConfigurationBuilder libraries = Maps.newHashMap(cfg.libraries); defaultLibrary = cfg.defaultLibrary; useFormat = cfg.useFormat; + cacheSize = cfg.cacheSize; syntaxMessages = cfg.syntaxMessages; validationMessages = cfg.validationMessages; } @@ -217,6 +223,14 @@ public ValidationConfigurationBuilder setValidationMessages( return this; } + public ValidationConfigurationBuilder setCacheSize( + final int cacheSize) + { + BUNDLE.checkArgument(cacheSize >= -1, "invalidCacheSize"); + this.cacheSize = cacheSize; + return this; + } + /** * Return a frozen version of this configuration * diff --git a/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactory.java b/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactory.java index bfaca5fe0..c9adbcc23 100644 --- a/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactory.java +++ b/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactory.java @@ -275,6 +275,6 @@ private Processor buildProcessor() final Processor processor = map.getProcessor(); return new CachingProcessor(processor, - SchemaContextEquivalence.getInstance()); + SchemaContextEquivalence.getInstance(), validationCfg.getCacheSize()); } } diff --git a/src/main/java/com/github/fge/jsonschema/processors/validation/ValidationChain.java b/src/main/java/com/github/fge/jsonschema/processors/validation/ValidationChain.java index bc4e4ad9e..061574aec 100644 --- a/src/main/java/com/github/fge/jsonschema/processors/validation/ValidationChain.java +++ b/src/main/java/com/github/fge/jsonschema/processors/validation/ValidationChain.java @@ -71,7 +71,7 @@ public ValidationChain(final RefResolver refResolver, = ProcessorChain.startWith(refResolver).chainWith(syntaxProcessor); resolver = new CachingProcessor, ValueHolder>( - chain1.getProcessor(), SchemaHolderEquivalence.INSTANCE + chain1.getProcessor(), SchemaHolderEquivalence.INSTANCE, cfg.getCacheSize() ); final SchemaDigester digester = new SchemaDigester(library); @@ -86,7 +86,7 @@ public ValidationChain(final RefResolver refResolver, } builder = new CachingProcessor( - chain2.getProcessor(), SchemaContextEquivalence.getInstance() + chain2.getProcessor(), SchemaContextEquivalence.getInstance(), cfg.getCacheSize() ); } diff --git a/src/main/resources/com/github/fge/jsonschema/validator/configuration.properties b/src/main/resources/com/github/fge/jsonschema/validator/configuration.properties index ae76069c4..55996e6ff 100644 --- a/src/main/resources/com/github/fge/jsonschema/validator/configuration.properties +++ b/src/main/resources/com/github/fge/jsonschema/validator/configuration.properties @@ -37,3 +37,4 @@ nullFormat = format attribute name cannot be null nullAttribute = attempt to register null implementation of format attribute "%s" nullKeyword = attempt to add null keyword to library nullType = null type argument to digester constructor +invalidCacheSize = cache size must be greater than -1. -1 value sets a cache with unlimited records, zero-value disables the cache diff --git a/src/test/java/com/github/fge/jsonschema/cfg/ValidationConfigurationTest.java b/src/test/java/com/github/fge/jsonschema/cfg/ValidationConfigurationTest.java index 79684b6ce..c508bca9f 100644 --- a/src/test/java/com/github/fge/jsonschema/cfg/ValidationConfigurationTest.java +++ b/src/test/java/com/github/fge/jsonschema/cfg/ValidationConfigurationTest.java @@ -103,6 +103,18 @@ public void cannotPutNullValidationMessageBundle() } } + @Test + public void cannotPutInvalidCacheSize() + { + try { + cfg.setCacheSize(-2); + fail("No exception thrown!!"); + } catch (IllegalArgumentException e) { + assertEquals(e.getMessage(), + BUNDLE.getMessage("invalidCacheSize")); + } + } + @Test public void defaultLibraryIsDraftV4() { From fe5ae3ace0b37547ea11bdb8d3fd76177c70c562 Mon Sep 17 00:00:00 2001 From: huggsboson Date: Tue, 2 May 2017 11:46:30 -0700 Subject: [PATCH 20/71] Update README.md --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ce673cd5e..cce802c43 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ ## Travis builds now enabled -Builds are now verified by Travis (see [issue #20](https://github.com/daveclayton/json-patch/issues/20) from the json-patch project for details) +Builds are now verified by Travis (see [issue #20](https://github.com/huggsboson/json-patch/issues/20) from the json-patch project for details) -https://travis-ci.org/daveclayton/json-schema-validator +https://travis-ci.org/huggsboson/json-schema-validator ## Read me first The **current** version of this project is licensed under both LGPLv3 (or later) and ASL 2.0. The old version (2.0.x) was licensed under LGPL 3.0 (or later) only. -**Version 2.2 is out**. See [here](https://github.com/daveclayton/json-schema-validator/wiki/Whatsnew_22) +**Version 2.2 is out**. See [here](https://github.com/huggsboson/json-schema-validator/wiki/Whatsnew_22) for the list of changes compared to 2.0. And of course, it still has [all the features](https://github.com/daveclayton/json-schema-validator/wiki/Features) of older versions. @@ -34,19 +34,19 @@ timely manner. ## Testing online You can [test this library online](http://json-schema-validator.herokuapp.com); this web site is in -a [project of its own](https://github.com/daveclayton/json-schema-validator-demo), which you can fork and +a [project of its own](https://github.com/huggsboson/json-schema-validator-demo), which you can fork and run by yourself. ## Versions * current stable version: **2.2.6** - ([ChangeLog](https://github.com/daveclayton/json-schema-validator/wiki/ChangeLog_22x), - [Javadoc](http://daveclayton.github.io/json-schema-validator/2.2.x/index.html), [code - samples](http://daveclayton.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). + ([ChangeLog](https://github.com/huggsboson/json-schema-validator/wiki/ChangeLog_22x), + [Javadoc](http://huggsboson.github.io/json-schema-validator/2.2.x/index.html), [code + samples](http://huggsboson.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). * old stable version: **2.0.4** - ([ChangeLog](https://github.com/daveclayton/json-schema-validator/wiki/ChangeLog_20x), - [Javadoc](http://daveclayton.github.io/json-schema-validator/2.0.x/index.html), [code - samples](http://daveclayton.github.io/json-schema-validator/2.0.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). + ([ChangeLog](https://github.com/huggsboson/json-schema-validator/wiki/ChangeLog_20x), + [Javadoc](http://huggsboson.github.io/json-schema-validator/2.0.x/index.html), [code + samples](http://huggsboson.github.io/json-schema-validator/2.0.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). ## Available downloads @@ -100,8 +100,8 @@ This implementation is based on the following drafts: ## More... For a detailed discussion of the implementation, see -[here](https://github.com/daveclayton/json-schema-validator/wiki/Status). +[here](https://github.com/huggsboson/json-schema-validator/wiki/Status). -Please see the [wiki](https://github.com/daveclayton/json-schema-validator/wiki/) for more +Please see the [wiki](https://github.com/huggsboson/json-schema-validator/wiki/) for more details. From ee09b5b7637ba286d9ec77597cf99f6b50f06068 Mon Sep 17 00:00:00 2001 From: huggsboson Date: Tue, 2 May 2017 13:13:48 -0700 Subject: [PATCH 21/71] Update README.md --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index cce802c43..0d0d7256f 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ ## Travis builds now enabled -Builds are now verified by Travis (see [issue #20](https://github.com/huggsboson/json-patch/issues/20) from the json-patch project for details) +Builds are now verified by Travis (see [issue #20](https://github.com/java-json-tools/json-patch/issues/20) from the json-patch project for details) -https://travis-ci.org/huggsboson/json-schema-validator +https://travis-ci.org/java-json-tools/json-schema-validator ## Read me first The **current** version of this project is licensed under both LGPLv3 (or later) and ASL 2.0. The old version (2.0.x) was licensed under LGPL 3.0 (or later) only. -**Version 2.2 is out**. See [here](https://github.com/huggsboson/json-schema-validator/wiki/Whatsnew_22) +**Version 2.2 is out**. See [here](https://github.com/java-json-tools/json-schema-validator/wiki/Whatsnew_22) for the list of changes compared to 2.0. And of course, it still has [all the features](https://github.com/daveclayton/json-schema-validator/wiki/Features) of older versions. @@ -34,19 +34,19 @@ timely manner. ## Testing online You can [test this library online](http://json-schema-validator.herokuapp.com); this web site is in -a [project of its own](https://github.com/huggsboson/json-schema-validator-demo), which you can fork and +a [project of its own](https://github.com/java-json-tools/json-schema-validator-demo), which you can fork and run by yourself. ## Versions * current stable version: **2.2.6** - ([ChangeLog](https://github.com/huggsboson/json-schema-validator/wiki/ChangeLog_22x), - [Javadoc](http://huggsboson.github.io/json-schema-validator/2.2.x/index.html), [code - samples](http://huggsboson.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). + ([ChangeLog](https://github.com/java-json-tools/json-schema-validator/wiki/ChangeLog_22x), + [Javadoc](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html), [code + samples](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). * old stable version: **2.0.4** - ([ChangeLog](https://github.com/huggsboson/json-schema-validator/wiki/ChangeLog_20x), - [Javadoc](http://huggsboson.github.io/json-schema-validator/2.0.x/index.html), [code - samples](http://huggsboson.github.io/json-schema-validator/2.0.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). + ([ChangeLog](https://github.com/java-json-tools/json-schema-validator/wiki/ChangeLog_20x), + [Javadoc](http://java-json-tools.github.io/json-schema-validator/2.0.x/index.html), [code + samples](http://java-json-tools.github.io/json-schema-validator/2.0.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). ## Available downloads @@ -100,8 +100,8 @@ This implementation is based on the following drafts: ## More... For a detailed discussion of the implementation, see -[here](https://github.com/huggsboson/json-schema-validator/wiki/Status). +[here](https://github.com/java-json-tools/json-schema-validator/wiki/Status). -Please see the [wiki](https://github.com/huggsboson/json-schema-validator/wiki/) for more +Please see the [wiki](https://github.com/java-json-tools/json-schema-validator/wiki/) for more details. From 33abfcac16ee2a39b738a5bf2c4910838b597255 Mon Sep 17 00:00:00 2001 From: John Huffaker Date: Fri, 2 Jun 2017 17:05:35 -0700 Subject: [PATCH 22/71] Gradle and build updates --- build.gradle | 98 ++++++++++-------------- dorelease.sh | 16 ++++ gradle/wrapper/gradle-wrapper.properties | 23 +----- 3 files changed, 58 insertions(+), 79 deletions(-) diff --git a/build.gradle b/build.gradle index 6aebc88d6..24e3be32f 100644 --- a/build.gradle +++ b/build.gradle @@ -17,25 +17,6 @@ * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt */ -/* - * This has to be here... It will not be taken into account in common.gradle! - * - * Looks like a serious bug... See also: - * - * http://forums.gradle.org/gradle/topics/buildscript_in_subprojects_ignored - */ -/* - * This has to be here... It will not be taken into account in common.gradle! - * - * Looks like a serious bug... See also: - * - * http://forums.gradle.org/gradle/topics/buildscript_in_subprojects_ignored - * - * We also use Spring's propdeps plugin to have a _real_ provided scope. See: - * - * https://github.com/spring-projects/gradle-plugins/tree/master/propdeps-plugin - */ - apply(plugin: "java"); apply(plugin: "maven"); apply(plugin: "signing"); @@ -43,15 +24,11 @@ apply(plugin: "osgi"); apply(plugin: "idea"); apply(plugin: "eclipse"); -group = "com.github.fge"; -version = "2.2.6"; +group = "com.github.java-json-tools"; +version = "2.2.7"; sourceCompatibility = "1.6"; targetCompatibility = "1.6"; // defaults to sourceCompatibility -project.ext { - description = "A Java implementation of the JSON Schema specification"; -}; - /* * Repositories to use */ @@ -63,8 +40,7 @@ repositories { * List of dependencies */ dependencies { - compile(group: "com.github.fge", name: "json-schema-core", - version: "1.2.5"); + compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.8"); compile(group: "javax.mail", name: "mailapi", version: "1.4.3"); compile(group: "joda-time", name: "joda-time", version: "2.3"); compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", @@ -90,7 +66,7 @@ javadoc.options.links("http://fge.github.io/btf/"); javadoc.options.links("http://fge.github.io/msg-simple/"); javadoc.options.links("http://fge.github.io/jackson-coreutils/"); javadoc.options.links("http://fge.github.io/uri-template/"); -javadoc.options.links("http://fge.github.io/json-schema-core/1.2.x/"); +javadoc.options.links("http://java-json-tools.github.io/json-schema-core/1.2.x/"); /* @@ -128,12 +104,14 @@ javadoc.options { * Equally annoyingly, the docFilesSubDirs option above does not seem to have * any effect :/ */ -task copyDocFiles(dependsOn: javadoc) << { - copy { - from("src/main/javadoc") { - include "**/doc-files/**"; - }; - into javadoc.destinationDir; +task copyDocFiles(dependsOn: javadoc) { + doLast { + copy { + from("src/main/javadoc") { + include "**/doc-files/**"; + }; + into javadoc.destinationDir; + } } } @@ -167,12 +145,14 @@ artifacts { } task wrapper(type: Wrapper) { - gradleVersion = "1.11"; + gradleVersion = "3.5"; distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"; } -task pom << { - pom {}.writeTo("${projectDir}/pom.xml"); +task pom { + doLast { + pom {}.writeTo("${projectDir}/pom.xml"); + } } /* @@ -180,25 +160,27 @@ task pom << { */ project.ext { - gitrwscm = sprintf("git@github.com:fge/%s", name); - gitroscm = sprintf("https://github.com/fge/%s.git", name); - projectURL = sprintf("https://github.com/fge/%s", name); + description = "A Java implementation of the JSON Schema specification"; + scmUrl = sprintf("git@github.com:box-metadata/%s", name); + projectURL = sprintf("https://github.com/box-metadata/%s", name); sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"; sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots/"; }; -task checkSigningRequirements << { - def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ]; - def noDice = false; - requiredProperties.each { - if (project.properties[it] == null) { - noDice = true; - System.err.printf("property \"%s\" is not defined!", it); +task checkSigningRequirements { + doLast { + def requiredProperties = [ "sonatypeUsername", "sonatypePassword" ]; + def noDice = false; + requiredProperties.each { + if (project.properties[it] == null) { + noDice = true; + System.err.printf("property \"%s\" is not defined!", it); + } } + if (noDice) + throw new IllegalStateException("missing required properties for " + + "upload"); } - if (noDice) - throw new IllegalStateException("missing required properties for " + - "upload"); } uploadArchives { @@ -234,15 +216,15 @@ uploadArchives { uploadArchives.repositories.mavenDeployer ]*.pom*.whenConfigured { pom -> pom.project { - name "${name}"; + name "${project.name}"; packaging "jar"; - description "${description}"; + description "${project.ext.description}"; url "${projectURL}"; scm { - url "${gitrwscm}"; - connection "${gitrwscm}"; - developerConnection "${gitroscm}"; + url "${scmUrl}"; + connection "scm:git:${scmUrl}"; + developerConnection "scm:git:${scmUrl}"; } licenses { @@ -260,9 +242,9 @@ uploadArchives { developers { developer { - id "fge"; - name "Francis Galiegue"; - email "fgaliegue@gmail.com"; + id "huggsboson"; + name "John Huffaker"; + email "jhuffaker+java-json-tools@gmail.com"; } } } diff --git a/dorelease.sh b/dorelease.sh index decafaa51..223917e47 100755 --- a/dorelease.sh +++ b/dorelease.sh @@ -1,4 +1,20 @@ #!/bin/bash +# Release instructions +# 1. Follow the gpg setup instructions: http://central.sonatype.org/pages/working-with-pgp-signatures.html +# a. gpg2 --export-secret-keys > ~/.gnupg/secring.gpg +# 2. In ~/.gradle add: +# sonatypeUsername=your sonatype user name +# sonatypePassword=password in vault for oss sonatype +# +# signing.keyId=generated key +# signing.password=password for gpg key +# signing.secretKeyRingFile=/Users/username/.gnupg/secring.gpg +# +# 3. ./dorelease.sh +# 4. Go to UI at: https://oss.sonatype.org +# 5. Login as sonatypeUsername +# 6. Follow the instructions here: http://central.sonatype.org/pages/releasing-the-deployment.html + ./gradlew --recompile-scripts clean test uploadArchives diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 70597454a..de9128cf2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,25 +1,6 @@ -# -# Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) -# -# This software is dual-licensed under: -# -# - the Lesser General Public License (LGPL) version 3.0 or, at your option, any -# later version; -# - the Apache Software License (ASL) version 2.0. -# -# The text of this file and of both licenses is available at the root of this -# project or, if you have the jar distribution, in directory META-INF/, under -# the names LGPL-3.0.txt and ASL-2.0.txt respectively. -# -# Direct link to the sources: -# -# - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt -# - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt -# - -#Mon Apr 14 09:45:58 CEST 2014 +#Fri Jun 02 16:48:25 PDT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-1.11-all.zip +distributionUrl=http\://services.gradle.org/distributions/gradle-3.5-all.zip From 7782e512b25717b4f7ec5259fdf89a4462758269 Mon Sep 17 00:00:00 2001 From: huggsboson Date: Fri, 2 Jun 2017 17:19:28 -0700 Subject: [PATCH 23/71] Update README.md --- README.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index f6f05fddb..2422c79bd 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,7 @@ [![License LGPLv3][LGPLv3 badge]][LGPLv3] [![License ASL 2.0][ASL 2.0 badge]][ASL 2.0] [![Build Status][Travis badge]][Travis] -![Maven Central](https://img.shields.io/maven-central/v/com.github.fge/json-schema-validator.svg) - -## Travis builds now enabled - -Builds are now verified by Travis (see [issue #20](https://github.com/java-json-tools/json-patch/issues/20) from the json-patch project for details) - -https://travis-ci.org/java-json-tools/json-schema-validator +![Maven Central](https://img.shields.io/maven-central/v/com.github.java-json-tools/json-schema-validator.svg) ## Read me first @@ -16,7 +10,7 @@ The **current** version of this project is licensed under both [LGPLv3] (or late **Version 2.2 is out**. See [here](https://github.com/java-json-tools/json-schema-validator/wiki/Whatsnew_22) for the list of changes compared to 2.0. And of course, it still has [all the -features](https://github.com/daveclayton/json-schema-validator/wiki/Features) of older versions. +features](https://github.com/java-json-tools/json-schema-validator/wiki/Features) of older versions. ## What this is @@ -63,7 +57,7 @@ Gradle: ```groovy dependencies { - compile(group: "com.github.fge", name: "json-schema-validator", version: "yourVersionHere"); + compile(group: "com.github.java-json-tools", name: "json-schema-validator", version: "2.2.8"); } ``` @@ -71,13 +65,14 @@ Maven: ```xml - com.github.fge + com.github.java-json-tools json-schema-validator - your-version-here + 2.2.8 ``` ### "Full" jar; command line +OUTDATED: Let me know if you need this in the issues section. This jar contains the library plus all its dependencies. Download the **lib** jar (a little more than 6 MiB) from [Bintray](https://bintray.com/fge/maven/json-schema-validator/view). @@ -114,5 +109,5 @@ details. [LGPLv3]: http://www.gnu.org/licenses/lgpl-3.0.html [ASL 2.0 badge]: https://img.shields.io/:license-Apache%202.0-blue.svg [ASL 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html -[Travis Badge]: https://api.travis-ci.org/daveclayton/json-schema-validator.svg?branch=master -[Travis]: https://travis-ci.org/daveclayton/json-schema-validator +[Travis Badge]: https://api.travis-ci.org/java-json-tools/json-schema-validator.svg?branch=master +[Travis]: https://travis-ci.org/java-json-tools/json-schema-validator From c2ad15d0bdcdd620e01999269e919f2a2dca215b Mon Sep 17 00:00:00 2001 From: John Huffaker Date: Fri, 2 Jun 2017 17:23:16 -0700 Subject: [PATCH 24/71] Release 2.2.8 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 1f7b331fa..7093e6645 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ apply(plugin: "idea"); apply(plugin: "eclipse"); group = "com.github.java-json-tools"; -version = "2.2.7"; +version = "2.2.8"; sourceCompatibility = "1.6"; targetCompatibility = "1.6"; // defaults to sourceCompatibility From 01d2d6488480008e899506f261f5fe467f276257 Mon Sep 17 00:00:00 2001 From: Tuan Dinh Date: Sun, 11 Jun 2017 22:51:49 +1000 Subject: [PATCH 25/71] Use a stricter date-time attribute formatter(rfc3339) --- .../common/RFC3339DateTimeAttribute.java | 68 ++++++++++++++++ .../CommonFormatAttributesDictionary.java | 4 +- .../resources/format/common/date-time.json | 77 +++++++++++++++++-- 3 files changed, 141 insertions(+), 8 deletions(-) create mode 100644 src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java diff --git a/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java new file mode 100644 index 000000000..7e659b436 --- /dev/null +++ b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java @@ -0,0 +1,68 @@ +package com.github.fge.jsonschema.format.common; + +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.format.DateTimeParseException; +import java.time.temporal.ChronoField; +import java.util.List; + +import com.github.fge.jackson.NodeType; +import com.github.fge.jsonschema.core.exceptions.ProcessingException; +import com.github.fge.jsonschema.core.report.ProcessingReport; +import com.github.fge.jsonschema.format.AbstractFormatAttribute; +import com.github.fge.jsonschema.format.FormatAttribute; +import com.github.fge.jsonschema.processors.data.FullData; +import com.github.fge.msgsimple.bundle.MessageBundle; +import com.google.common.collect.ImmutableList; + +/** + * A {@link DateTimeFormatter} for date and time format defined in RFC3339. + * @see RFC 3339 - Section 5.6 + */ +public class RFC3339DateTimeAttribute extends AbstractFormatAttribute { + + private static final List RFC3339_FORMATS = ImmutableList.of( + "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" + ); + + private static final DateTimeFormatter RFC3339_FORMATTER; + + static { + final DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder() + .appendPattern("yyyy-MM-dd") + .appendLiteral('T') + .appendPattern("HH:mm:ss") + .optionalStart() + .appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true).parseDefaulting(ChronoField.NANO_OF_SECOND, 0) + .optionalEnd() + .appendOffset("+HH:mm", "Z"); + RFC3339_FORMATTER = builder.toFormatter(); + } + + private static final FormatAttribute INSTANCE = new RFC3339DateTimeAttribute(); + + public static FormatAttribute getInstance() + { + return INSTANCE; + } + + private RFC3339DateTimeAttribute() + { + super("date-time", NodeType.STRING); + } + + @Override + public void validate(final ProcessingReport report, + final MessageBundle bundle, final FullData data) + throws ProcessingException + { + final String value = data.getInstance().getNode().textValue(); + + try { + RFC3339_FORMATTER.parse(value); + } catch (DateTimeParseException ignored) { + report.error(newMsg(data, bundle, "err.format.invalidDate") + .putArgument("value", value).putArgument("expected", RFC3339_FORMATS)); + } + } +} diff --git a/src/main/java/com/github/fge/jsonschema/library/format/CommonFormatAttributesDictionary.java b/src/main/java/com/github/fge/jsonschema/library/format/CommonFormatAttributesDictionary.java index 919758bf9..97e9d884b 100644 --- a/src/main/java/com/github/fge/jsonschema/library/format/CommonFormatAttributesDictionary.java +++ b/src/main/java/com/github/fge/jsonschema/library/format/CommonFormatAttributesDictionary.java @@ -22,9 +22,9 @@ import com.github.fge.jsonschema.core.util.Dictionary; import com.github.fge.jsonschema.core.util.DictionaryBuilder; import com.github.fge.jsonschema.format.FormatAttribute; -import com.github.fge.jsonschema.format.common.DateTimeAttribute; import com.github.fge.jsonschema.format.common.EmailAttribute; import com.github.fge.jsonschema.format.common.IPv6Attribute; +import com.github.fge.jsonschema.format.common.RFC3339DateTimeAttribute; import com.github.fge.jsonschema.format.common.RegexAttribute; import com.github.fge.jsonschema.format.common.URIAttribute; @@ -49,7 +49,7 @@ private CommonFormatAttributesDictionary() FormatAttribute attribute; name = "date-time"; - attribute = DateTimeAttribute.getInstance(); + attribute = RFC3339DateTimeAttribute.getInstance(); builder.addEntry(name, attribute); name = "email"; diff --git a/src/test/resources/format/common/date-time.json b/src/test/resources/format/common/date-time.json index f79dcc701..7b755a5ab 100644 --- a/src/test/resources/format/common/date-time.json +++ b/src/test/resources/format/common/date-time.json @@ -1,6 +1,6 @@ [ { - "data": "2012-12-02T13:05:00+0100", + "data": "2012-12-02T13:05:00+01:00", "valid": true }, { @@ -19,13 +19,60 @@ "data": "2012-08-07T20:42:32.13Z", "valid": true }, + { + "data": "2012-08-07T20:42:32+10:00", + "valid": true + }, + { + "data": "2012-08-07T20:42:32-05:30", + "valid": true + }, + { + "data": "2012-12-02T13:05:00+0100", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00+0100", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00+0100", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00+0100", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00Z[Europe/Paris]", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00Z[Europe/Paris]", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, { + "data": "2012-12-02T13:05:00+0100", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00+0100", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, { "data": "2012-02-30T00:00:00+0000", "valid": false, "message": "err.format.invalidDate", "msgData": { "value": "2012-02-30T00:00:00+0000", - "expected": [ "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}Z" ] + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] }, "msgParams": [ "value", "expected" ] }, @@ -35,7 +82,7 @@ "message": "err.format.invalidDate", "msgData": { "value": "201202030", - "expected": [ "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}Z" ] + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] }, "msgParams": [ "value", "expected" ] }, @@ -69,14 +116,32 @@ }, { "data": "2012-08-07T20:42:32.1234567890Z", - "valid": true + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-08-07T20:42:32.1234567890Z", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] }, { "data": "2012-08-07T20:42:32.12345678901Z", - "valid": true + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-08-07T20:42:32.12345678901Z", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] }, { "data": "2012-08-07T20:42:32.123456789012Z", - "valid": true + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-08-07T20:42:32.123456789012Z", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] } ] From d273e06cc4e604ceb833dc6fae9c8123fb155c1d Mon Sep 17 00:00:00 2001 From: Tuan Dinh Date: Wed, 14 Jun 2017 23:26:43 +1000 Subject: [PATCH 26/71] Used joda-time lib for RFC3339DateTimeAttribute. Added more unit tests --- .../common/RFC3339DateTimeAttribute.java | 80 ++++++++++++----- .../resources/format/common/date-time.json | 89 ++++++++++--------- 2 files changed, 108 insertions(+), 61 deletions(-) diff --git a/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java index 7e659b436..18e73f035 100644 --- a/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java +++ b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java @@ -1,11 +1,11 @@ package com.github.fge.jsonschema.format.common; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeFormatterBuilder; -import java.time.format.DateTimeParseException; -import java.time.temporal.ChronoField; import java.util.List; +import org.joda.time.format.DateTimeFormatter; +import org.joda.time.format.DateTimeFormatterBuilder; +import org.joda.time.format.DateTimeParser; + import com.github.fge.jackson.NodeType; import com.github.fge.jsonschema.core.exceptions.ProcessingException; import com.github.fge.jsonschema.core.report.ProcessingReport; @@ -22,21 +22,22 @@ public class RFC3339DateTimeAttribute extends AbstractFormatAttribute { private static final List RFC3339_FORMATS = ImmutableList.of( - "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" + "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ); - private static final DateTimeFormatter RFC3339_FORMATTER; + private static final DateTimeFormatter FORMATTER; static { - final DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder() - .appendPattern("yyyy-MM-dd") - .appendLiteral('T') - .appendPattern("HH:mm:ss") - .optionalStart() - .appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, true).parseDefaulting(ChronoField.NANO_OF_SECOND, 0) - .optionalEnd() - .appendOffset("+HH:mm", "Z"); - RFC3339_FORMATTER = builder.toFormatter(); + final DateTimeParser secFracsParser = new DateTimeFormatterBuilder() + .appendLiteral('.').appendFractionOfSecond(1,12) + .toParser(); + + DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder() + .appendPattern("yyyy-MM-dd'T'HH:mm:ss") + .appendOptional(secFracsParser) + .appendTimeZoneOffset("Z", true, 2, 2); + + FORMATTER = builder.toFormatter(); } private static final FormatAttribute INSTANCE = new RFC3339DateTimeAttribute(); @@ -58,11 +59,50 @@ public void validate(final ProcessingReport report, { final String value = data.getInstance().getNode().textValue(); - try { - RFC3339_FORMATTER.parse(value); - } catch (DateTimeParseException ignored) { - report.error(newMsg(data, bundle, "err.format.invalidDate") - .putArgument("value", value).putArgument("expected", RFC3339_FORMATS)); + try + { + FORMATTER.parseDateTime(value); + + final String secFracsAndOffset = value.substring("yyyy-MM-ddTHH:mm:ss".length()); + final String offset; + if (!secFracsAndOffset.startsWith(".")) { + offset = secFracsAndOffset; + } else{ + if (secFracsAndOffset.contains("Z")) { + offset = secFracsAndOffset.substring(secFracsAndOffset.indexOf("Z")); + } else if (secFracsAndOffset.contains("+")) { + offset = secFracsAndOffset.substring(secFracsAndOffset.indexOf("+")); + } else { + offset = secFracsAndOffset.substring(secFracsAndOffset.indexOf("-")); + } + } + if (!isOffSetStrictRFC3339(offset)) { + throw new IllegalArgumentException(); + } + + } catch (IllegalArgumentException ignored) { + report.error(newMsg(data, bundle, "err.format.invalidDate") + .putArgument("value", value).putArgument("expected", RFC3339_FORMATS)); } + } + + /** + * Return true if date-time offset stricly follows RFC3339: + * time-hour = 2DIGIT ; 00-23 + * time-minute = 2DIGIT ; 00-59 + * time-numoffset = ("+" / "-") time-hour ":" time-minute + * time-offset = "Z" / time-numoffset, + * and false otherwise + * @param offset + * @return + */ + private boolean isOffSetStrictRFC3339(final String offset) + { + if (offset.endsWith("Z")) return true; + if (offset.length() == 6 && offset.contains(":")) { + return true; + } + return false; + } } diff --git a/src/test/resources/format/common/date-time.json b/src/test/resources/format/common/date-time.json index 7b755a5ab..1ee20602d 100644 --- a/src/test/resources/format/common/date-time.json +++ b/src/test/resources/format/common/date-time.json @@ -26,14 +26,14 @@ { "data": "2012-08-07T20:42:32-05:30", "valid": true - }, + }, { - "data": "2012-12-02T13:05:00+0100", + "data": "201202030", "valid": false, "message": "err.format.invalidDate", "msgData": { - "value": "2012-12-02T13:05:00+0100", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + "value": "201202030", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] }, "msgParams": [ "value", "expected" ] }, @@ -43,7 +43,17 @@ "message": "err.format.invalidDate", "msgData": { "value": "2012-12-02T13:05:00+0100", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00+01:30:30", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00+01:30:30", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] }, "msgParams": [ "value", "expected" ] }, @@ -53,36 +63,47 @@ "message": "err.format.invalidDate", "msgData": { "value": "2012-12-02T13:05:00Z[Europe/Paris]", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] }, "msgParams": [ "value", "expected" ] - }, { - "data": "2012-12-02T13:05:00+0100", + }, + { + "data": "2012-12-02T13:05:00+10:00Z", "valid": false, "message": "err.format.invalidDate", "msgData": { - "value": "2012-12-02T13:05:00+0100", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + "value": "2012-12-02T13:05:00+10:00Z", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] }, "msgParams": [ "value", "expected" ] }, { - "data": "2012-02-30T00:00:00+0000", + "data": "2012-12-02T13:05:00America/New_York", "valid": false, "message": "err.format.invalidDate", "msgData": { - "value": "2012-02-30T00:00:00+0000", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + "value": "2012-12-02T13:05:00America/New_York", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] }, "msgParams": [ "value", "expected" ] }, { - "data": "201202030", + "data": "2012-12-02T13:05:00[America/New_York]", "valid": false, "message": "err.format.invalidDate", "msgData": { - "value": "201202030", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] + "value": "2012-12-02T13:05:00[America/New_York]", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00.123456", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00.123456", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] }, "msgParams": [ "value", "expected" ] }, @@ -91,19 +112,19 @@ "valid": true }, { - "data": "2012-08-07T20:42:32.12345Z", + "data": "2012-08-07T20:42:32.1234+05:00", "valid": true }, { - "data": "2012-08-07T20:42:32.123456Z", + "data": "2012-08-07T20:42:32.12345Z", "valid": true }, { - "data": "2012-08-07T20:42:32.1234567Z", + "data": "2012-08-07T20:42:32.123456Z", "valid": true }, { - "data": "2012-08-07T20:42:32.12345678Z", + "data": "2012-08-07T20:42:32.1234567Z", "valid": true }, { @@ -116,32 +137,18 @@ }, { "data": "2012-08-07T20:42:32.1234567890Z", - "valid": false, - "message": "err.format.invalidDate", - "msgData": { - "value": "2012-08-07T20:42:32.1234567890Z", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] - }, - "msgParams": [ "value", "expected" ] + "valid": true }, { "data": "2012-08-07T20:42:32.12345678901Z", - "valid": false, - "message": "err.format.invalidDate", - "msgData": { - "value": "2012-08-07T20:42:32.12345678901Z", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] - }, - "msgParams": [ "value", "expected" ] + "valid": true }, { "data": "2012-08-07T20:42:32.123456789012Z", - "valid": false, - "message": "err.format.invalidDate", - "msgData": { - "value": "2012-08-07T20:42:32.123456789012Z", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,9}((+|-)HH:mm|Z)" ] - }, - "msgParams": [ "value", "expected" ] + "valid": true + }, + { + "data": "2012-08-07T20:42:32.123456789012+05:00", + "valid": true } ] From 70ae8c09650faccd685441bd6e984ddf380ea3d5 Mon Sep 17 00:00:00 2001 From: Joshua Ali Date: Tue, 24 Apr 2018 11:52:03 +1000 Subject: [PATCH 27/71] Support email address formats from RFC 6531 --- build.gradle | 2 +- src/test/resources/format/common/email.json | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 7093e6645..42c67baf5 100644 --- a/build.gradle +++ b/build.gradle @@ -41,7 +41,7 @@ repositories { */ dependencies { compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.8"); - compile(group: "javax.mail", name: "mailapi", version: "1.4.3"); + compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.0.0"); compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.1"); diff --git a/src/test/resources/format/common/email.json b/src/test/resources/format/common/email.json index 452e548aa..669b42c08 100644 --- a/src/test/resources/format/common/email.json +++ b/src/test/resources/format/common/email.json @@ -14,12 +14,7 @@ }, { "data": "éioaj@my.name", - "valid": false, - "message": "err.format.invalidEmail", - "msgData": { - "value": "éioaj@my.name" - }, - "msgParams": [ "value" ] + "valid": true }, { "data": "a@", From 3c0b7bbb4dcd2459d1020c41329c3d45e528c75f Mon Sep 17 00:00:00 2001 From: John Huffaker Date: Fri, 11 May 2018 21:38:26 -0700 Subject: [PATCH 28/71] Set version to 2.2.10-SNAPSHOT --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 7093e6645..46fbe230e 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ apply(plugin: "idea"); apply(plugin: "eclipse"); group = "com.github.java-json-tools"; -version = "2.2.8"; +version = "2.2.10-SNAPSHOT"; sourceCompatibility = "1.6"; targetCompatibility = "1.6"; // defaults to sourceCompatibility @@ -40,7 +40,7 @@ repositories { * List of dependencies */ dependencies { - compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.8"); + compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.9"); compile(group: "javax.mail", name: "mailapi", version: "1.4.3"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.0.0"); From 0992fe13bc1b788480bdd4fa1a4f652299970b49 Mon Sep 17 00:00:00 2001 From: John Huffaker Date: Tue, 15 May 2018 14:25:52 -0700 Subject: [PATCH 29/71] Roll back to old date time validator (#262) Allow people to still use the new formatter via the mechanism described in example 8. fixes #261 --- .../common/RFC3339DateTimeAttribute.java | 9 + .../CommonFormatAttributesDictionary.java | 4 +- .../format/rfc3339/DateTimeTest.java | 45 +++++ .../resources/format/common/date-time.json | 94 ++--------- .../resources/format/rfc3339/date-time.json | 154 ++++++++++++++++++ 5 files changed, 221 insertions(+), 85 deletions(-) create mode 100644 src/test/java/com/github/fge/jsonschema/format/rfc3339/DateTimeTest.java create mode 100644 src/test/resources/format/rfc3339/date-time.json diff --git a/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java index 18e73f035..b8a0fbe4c 100644 --- a/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java +++ b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java @@ -2,6 +2,8 @@ import java.util.List; +import com.github.fge.jsonschema.cfg.ValidationConfiguration; +import com.github.fge.jsonschema.library.DraftV4Library; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.DateTimeFormatterBuilder; import org.joda.time.format.DateTimeParser; @@ -18,6 +20,13 @@ /** * A {@link DateTimeFormatter} for date and time format defined in RFC3339. * @see RFC 3339 - Section 5.6 + * + * This is backwards incompat with the original DateTimeAttribute. It will become the default in the future + * to use it currently you need to: + * Library library = DraftV4Library.get().thaw() + * .addFormatAttribute("date-time", RFC3339DateTimeAttribute.getInstance()) + * .freeze(); + * Then follow the rest of the steps in example 8 to hook it into your flow. */ public class RFC3339DateTimeAttribute extends AbstractFormatAttribute { diff --git a/src/main/java/com/github/fge/jsonschema/library/format/CommonFormatAttributesDictionary.java b/src/main/java/com/github/fge/jsonschema/library/format/CommonFormatAttributesDictionary.java index 97e9d884b..919758bf9 100644 --- a/src/main/java/com/github/fge/jsonschema/library/format/CommonFormatAttributesDictionary.java +++ b/src/main/java/com/github/fge/jsonschema/library/format/CommonFormatAttributesDictionary.java @@ -22,9 +22,9 @@ import com.github.fge.jsonschema.core.util.Dictionary; import com.github.fge.jsonschema.core.util.DictionaryBuilder; import com.github.fge.jsonschema.format.FormatAttribute; +import com.github.fge.jsonschema.format.common.DateTimeAttribute; import com.github.fge.jsonschema.format.common.EmailAttribute; import com.github.fge.jsonschema.format.common.IPv6Attribute; -import com.github.fge.jsonschema.format.common.RFC3339DateTimeAttribute; import com.github.fge.jsonschema.format.common.RegexAttribute; import com.github.fge.jsonschema.format.common.URIAttribute; @@ -49,7 +49,7 @@ private CommonFormatAttributesDictionary() FormatAttribute attribute; name = "date-time"; - attribute = RFC3339DateTimeAttribute.getInstance(); + attribute = DateTimeAttribute.getInstance(); builder.addEntry(name, attribute); name = "email"; diff --git a/src/test/java/com/github/fge/jsonschema/format/rfc3339/DateTimeTest.java b/src/test/java/com/github/fge/jsonschema/format/rfc3339/DateTimeTest.java new file mode 100644 index 000000000..d871bc6b4 --- /dev/null +++ b/src/test/java/com/github/fge/jsonschema/format/rfc3339/DateTimeTest.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) + * + * This software is dual-licensed under: + * + * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any + * later version; + * - the Apache Software License (ASL) version 2.0. + * + * The text of this file and of both licenses is available at the root of this + * project or, if you have the jar distribution, in directory META-INF/, under + * the names LGPL-3.0.txt and ASL-2.0.txt respectively. + * + * Direct link to the sources: + * + * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt + * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt + */ + +package com.github.fge.jsonschema.format.rfc3339; + +import com.github.fge.jsonschema.core.util.Dictionary; +import com.github.fge.jsonschema.core.util.DictionaryBuilder; +import com.github.fge.jsonschema.format.AbstractFormatAttributeTest; +import com.github.fge.jsonschema.format.FormatAttribute; +import com.github.fge.jsonschema.format.common.RFC3339DateTimeAttribute; + +import java.io.IOException; +import java.text.Format; + +public final class DateTimeTest + extends AbstractFormatAttributeTest +{ + private static final Dictionary dict = + Dictionary + .newBuilder() + .addEntry("date-time", RFC3339DateTimeAttribute.getInstance()) + .freeze(); + + public DateTimeTest() + throws IOException + { + super(dict, "rfc3339", "date-time"); + } +} diff --git a/src/test/resources/format/common/date-time.json b/src/test/resources/format/common/date-time.json index 1ee20602d..f79dcc701 100644 --- a/src/test/resources/format/common/date-time.json +++ b/src/test/resources/format/common/date-time.json @@ -1,6 +1,6 @@ [ { - "data": "2012-12-02T13:05:00+01:00", + "data": "2012-12-02T13:05:00+0100", "valid": true }, { @@ -20,90 +20,22 @@ "valid": true }, { - "data": "2012-08-07T20:42:32+10:00", - "valid": true - }, - { - "data": "2012-08-07T20:42:32-05:30", - "valid": true - }, - { - "data": "201202030", - "valid": false, - "message": "err.format.invalidDate", - "msgData": { - "value": "201202030", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] - }, - "msgParams": [ "value", "expected" ] - }, - { - "data": "2012-12-02T13:05:00+0100", - "valid": false, - "message": "err.format.invalidDate", - "msgData": { - "value": "2012-12-02T13:05:00+0100", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] - }, - "msgParams": [ "value", "expected" ] - }, - { - "data": "2012-12-02T13:05:00+01:30:30", - "valid": false, - "message": "err.format.invalidDate", - "msgData": { - "value": "2012-12-02T13:05:00+01:30:30", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] - }, - "msgParams": [ "value", "expected" ] - }, - { - "data": "2012-12-02T13:05:00Z[Europe/Paris]", - "valid": false, - "message": "err.format.invalidDate", - "msgData": { - "value": "2012-12-02T13:05:00Z[Europe/Paris]", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] - }, - "msgParams": [ "value", "expected" ] - }, - { - "data": "2012-12-02T13:05:00+10:00Z", - "valid": false, - "message": "err.format.invalidDate", - "msgData": { - "value": "2012-12-02T13:05:00+10:00Z", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] - }, - "msgParams": [ "value", "expected" ] - }, - { - "data": "2012-12-02T13:05:00America/New_York", + "data": "2012-02-30T00:00:00+0000", "valid": false, "message": "err.format.invalidDate", "msgData": { - "value": "2012-12-02T13:05:00America/New_York", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + "value": "2012-02-30T00:00:00+0000", + "expected": [ "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}Z" ] }, "msgParams": [ "value", "expected" ] }, { - "data": "2012-12-02T13:05:00[America/New_York]", - "valid": false, - "message": "err.format.invalidDate", - "msgData": { - "value": "2012-12-02T13:05:00[America/New_York]", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] - }, - "msgParams": [ "value", "expected" ] - }, - { - "data": "2012-12-02T13:05:00.123456", + "data": "201202030", "valid": false, "message": "err.format.invalidDate", "msgData": { - "value": "2012-12-02T13:05:00.123456", - "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + "value": "201202030", + "expected": [ "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}Z" ] }, "msgParams": [ "value", "expected" ] }, @@ -111,10 +43,6 @@ "data": "2012-08-07T20:42:32.1234Z", "valid": true }, - { - "data": "2012-08-07T20:42:32.1234+05:00", - "valid": true - }, { "data": "2012-08-07T20:42:32.12345Z", "valid": true @@ -131,6 +59,10 @@ "data": "2012-08-07T20:42:32.12345678Z", "valid": true }, + { + "data": "2012-08-07T20:42:32.12345678Z", + "valid": true + }, { "data": "2012-08-07T20:42:32.123456789Z", "valid": true @@ -146,9 +78,5 @@ { "data": "2012-08-07T20:42:32.123456789012Z", "valid": true - }, - { - "data": "2012-08-07T20:42:32.123456789012+05:00", - "valid": true } ] diff --git a/src/test/resources/format/rfc3339/date-time.json b/src/test/resources/format/rfc3339/date-time.json new file mode 100644 index 000000000..1ee20602d --- /dev/null +++ b/src/test/resources/format/rfc3339/date-time.json @@ -0,0 +1,154 @@ +[ + { + "data": "2012-12-02T13:05:00+01:00", + "valid": true + }, + { + "data": "2001-02-12T00:00:00Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.123Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.13Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32+10:00", + "valid": true + }, + { + "data": "2012-08-07T20:42:32-05:30", + "valid": true + }, + { + "data": "201202030", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "201202030", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00+0100", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00+0100", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00+01:30:30", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00+01:30:30", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00Z[Europe/Paris]", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00Z[Europe/Paris]", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00+10:00Z", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00+10:00Z", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00America/New_York", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00America/New_York", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00[America/New_York]", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00[America/New_York]", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-12-02T13:05:00.123456", + "valid": false, + "message": "err.format.invalidDate", + "msgData": { + "value": "2012-12-02T13:05:00.123456", + "expected": [ "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ] + }, + "msgParams": [ "value", "expected" ] + }, + { + "data": "2012-08-07T20:42:32.1234Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.1234+05:00", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.12345Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.123456Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.1234567Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.12345678Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.123456789Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.1234567890Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.12345678901Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.123456789012Z", + "valid": true + }, + { + "data": "2012-08-07T20:42:32.123456789012+05:00", + "valid": true + } +] From 1b4c46fc0fbb46f3e67c5f78a7b04760eb92c9f3 Mon Sep 17 00:00:00 2001 From: John Huffaker Date: Tue, 15 May 2018 20:51:25 -0700 Subject: [PATCH 30/71] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2422c79bd..83fd13c79 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ run by yourself. ## Versions -* current stable version: **2.2.6** +* current stable version: **2.2.10** ([ChangeLog](https://github.com/java-json-tools/json-schema-validator/wiki/ChangeLog_22x), [Javadoc](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html), [code samples](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). @@ -57,7 +57,7 @@ Gradle: ```groovy dependencies { - compile(group: "com.github.java-json-tools", name: "json-schema-validator", version: "2.2.8"); + compile(group: "com.github.java-json-tools", name: "json-schema-validator", version: "2.2.10"); } ``` @@ -67,7 +67,7 @@ Maven: com.github.java-json-tools json-schema-validator - 2.2.8 + 2.2.10 ``` From 4bf148aa2463270483cb19d4d3d6360fc9ccaa1c Mon Sep 17 00:00:00 2001 From: John Huffaker Date: Tue, 22 May 2018 17:05:02 -0700 Subject: [PATCH 31/71] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83fd13c79..fa5c60ed9 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ timely manner. ## Testing online You can [test this library online](http://json-schema-validator.herokuapp.com); this web site is in -a [project of its own](https://github.com/java-json-tools/json-schema-validator-demo), which you can fork and +a [project of its own](https://github.com/fge/json-schema-validator-demo), which you can fork and run by yourself. ## Versions From 35aae670774fe201c2fa73c8d040f62251c1fc46 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Mon, 22 Apr 2019 16:26:24 +0200 Subject: [PATCH 32/71] Update to Gradle 5.6.1. --- build.gradle | 6 +- gradle/wrapper/gradle-wrapper.jar | Bin 51106 -> 55616 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 98 ++++++++++++++--------- gradlew.bat | 30 ++++--- 5 files changed, 85 insertions(+), 52 deletions(-) diff --git a/build.gradle b/build.gradle index 46fbe230e..757585494 100644 --- a/build.gradle +++ b/build.gradle @@ -142,8 +142,8 @@ artifacts { archives libJar; } -task wrapper(type: Wrapper) { - gradleVersion = "3.5"; +wrapper { + gradleVersion = "5.6.1"; distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"; } @@ -172,7 +172,7 @@ task checkSigningRequirements { requiredProperties.each { if (project.properties[it] == null) { noDice = true; - System.err.printf("property \"%s\" is not defined!", it); + System.err.printf("property \"%s\" is not defined!\n", it); } } if (noDice) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 3c7abdf12790879c06b07176de29647f77aa4129..5c2d1cf016b3885f6930543d57b744ea8c220a1a 100644 GIT binary patch literal 55616 zcmafaW0WS*vSoFbZJS-TZP!<}ZQEV8ZQHihW!tvx>6!c9%-lQoy;&DmfdT@8fB*sl68LLCKtKQ283+jS?^Q-bNq|NIAW8=eB==8_)^)r*{C^$z z{u;{v?IMYnO`JhmPq7|LA_@Iz75S9h~8`iX>QrjrmMeu{>hn4U;+$dor zz+`T8Q0f}p^Ao)LsYq74!W*)&dTnv}E8;7H*Zetclpo2zf_f>9>HT8;`O^F8;M%l@ z57Z8dk34kG-~Wg7n48qF2xwPp;SOUpd1}9Moir5$VSyf4gF)Mp-?`wO3;2x9gYj59oFwG>?Leva43@e(z{mjm0b*@OAYLC`O9q|s+FQLOE z!+*Y;%_0(6Sr<(cxE0c=lS&-FGBFGWd_R<5$vwHRJG=tB&Mi8@hq_U7@IMyVyKkOo6wgR(<% zQw1O!nnQl3T9QJ)Vh=(`cZM{nsEKChjbJhx@UQH+G>6p z;beBQ1L!3Zl>^&*?cSZjy$B3(1=Zyn~>@`!j%5v7IBRt6X`O)yDpVLS^9EqmHxBcisVG$TRwiip#ViN|4( zYn!Av841_Z@Ys=T7w#>RT&iXvNgDq3*d?$N(SznG^wR`x{%w<6^qj&|g})La;iD?`M=p>99p><39r9+e z`dNhQ&tol5)P#;x8{tT47i*blMHaDKqJs8!Pi*F{#)9%USFxTVMfMOy{mp2ZrLR40 z2a9?TJgFyqgx~|j0eA6SegKVk@|Pd|_6P$HvwTrLTK)Re`~%kg8o9`EAE1oAiY5Jgo=H}0*D?tSCn^=SIN~fvv453Ia(<1|s07aTVVtsRxY6+tT3589iQdi^ zC92D$ewm9O6FA*u*{Fe_=b`%q`pmFvAz@hfF@OC_${IPmD#QMpPNo0mE9U=Ch;k0L zZteokPG-h7PUeRCPPYG%H!WswC?cp7M|w42pbtwj!m_&4%hB6MdLQ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}G9N%|KA ze;=j(T!N<#Wp#72PtU}EB2VP}hWvYH z`VRf)6Y{5pczP81ld32GpQ!$ix%BDr+D};F!heGOF<|_|VcXLJJT=1qWC|($jp^x< z|8I5oe-!AcVfZJFX8CV4e}nx|pzmM*F!nvQ68^-mto#@F|J!Exw7#C2K7JAj*8X>4 c_`eJx(qi9shu`*Bw9mQ#s%Zm&B+s7xKi|i_5dZ)H diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index de9128cf2..7f76b8798 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 02 16:48:25 PDT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=http\://services.gradle.org/distributions/gradle-5.6.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-3.5-all.zip diff --git a/gradlew b/gradlew index 91a7e269e..83f2acfdc 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,20 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# 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 +# +# https://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. +# ############################################################################## ## @@ -6,20 +22,38 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -30,6 +64,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +75,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +105,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -110,10 +125,11 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` @@ -154,11 +170,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index aec99730b..24467a141 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -8,14 +24,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +62,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +75,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line From e2df74134cf72c6b809181225558c7ed61d1864d Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Fri, 30 Aug 2019 11:06:51 +0200 Subject: [PATCH 33/71] Replaced dead javadoc links with www.javadoc.io links. --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 757585494..7fc43b513 100644 --- a/build.gradle +++ b/build.gradle @@ -56,10 +56,10 @@ dependencies { } javadoc.options.links("http://docs.oracle.com/javase/6/docs/api/"); -javadoc.options.links("http://jsr-305.googlecode.com/svn/trunk/javadoc/"); +javadoc.options.links("http://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); javadoc.options.links("http://fasterxml.github.com/jackson-databind/javadoc/2.2.0/"); javadoc.options.links("http://fasterxml.github.com/jackson-core/javadoc/2.2.0/"); -javadoc.options.links("http://docs.guava-libraries.googlecode.com/git-history/v16.0.1/javadoc/"); +javadoc.options.links("http://www.javadoc.io/doc/com.google.guava/guava/16.0.1/"); javadoc.options.links("http://fge.github.io/btf/"); javadoc.options.links("http://fge.github.io/msg-simple/"); javadoc.options.links("http://fge.github.io/jackson-coreutils/"); From e90ae13ae858d44f746b8e97f969683dbe78052a Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Fri, 30 Aug 2019 11:22:44 +0200 Subject: [PATCH 34/71] Don't use extDirs in javadoc. https://www.oracle.com/technetwork/java/javase/9-relnote-issues-3704069.html describes that in JDK 9, support for extdirs was removed. It causes an error with javac 11 that doesn't show up with standard Java on Mac OS X. --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7fc43b513..dbf8ee0a8 100644 --- a/build.gradle +++ b/build.gradle @@ -94,7 +94,6 @@ task sourcesJar(type: Jar, dependsOn: classes) { javadoc.options { overview = "src/main/javadoc/overview.html"; - extDirs = [ file("src/main/javadoc") ]; docFilesSubDirs = true; } From 2b7de8d2f781d268bf71cbda5fd24a6743ef19e7 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Fri, 30 Aug 2019 12:29:15 +0200 Subject: [PATCH 35/71] Fix package errors in javadoc @link references. --- src/main/javadoc/overview.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html index 54ff12bc5..045352fa1 100644 --- a/src/main/javadoc/overview.html +++ b/src/main/javadoc/overview.html @@ -97,7 +97,7 @@

    $ref resolution

    Note that any failure in $ref validation is considered a fatal error.

    The processor in charge of this step is {@link -com.github.fge.jsonschema.processors.ref.RefResolver}. It is located in package +com.github.fge.jsonschema.core.load.RefResolver}. It is located in package json-schema-core.

    Schema syntax checking

    @@ -113,7 +113,7 @@

    Schema syntax checking

    not follow JSON References.

    The processor in charge of this step is {@link -com.github.fge.jsonschema.processors.syntax.SyntaxProcessor}. It is located in +com.github.fge.jsonschema.core.keyword.syntax.SyntaxProcessor}. It is located in the json-schema-core package.

    Digesting

    @@ -154,7 +154,7 @@

    Digesting

    allows to prune a lot of duplicates out of keyword caching.

    The processor in charge of this step is {@link -com.github.fge.jsonschema.processing.digest.SchemaDigester}.

    +com.github.fge.jsonschema.processors.digest.SchemaDigester}.

    Keyword building

    From da8d43cf6a144bd1cfce194095f9d12ff8b70e9c Mon Sep 17 00:00:00 2001 From: Ville Koskela Date: Fri, 30 Aug 2019 08:43:55 -0700 Subject: [PATCH 36/71] Update jsr305 dependency --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index dbf8ee0a8..97a7ac435 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ dependencies { compile(group: "javax.mail", name: "mailapi", version: "1.4.3"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.0.0"); - compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.1"); + compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2"); compile(group: "net.sf.jopt-simple", name: "jopt-simple", version: "5.0.3"); testCompile(group: "org.testng", name: "testng", version: "6.10") { exclude(group: "junit", module: "junit"); From e6d9207704b20f4d32a92f148525457b75bc8a46 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Fri, 30 Aug 2019 17:47:02 +0200 Subject: [PATCH 37/71] Lazily instantiate defaults for JsonSchemaFactoryBuilder. (#293) Fixes #290. --- .../jsonschema/main/JsonSchemaFactoryBuilder.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactoryBuilder.java b/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactoryBuilder.java index b4869a4e5..247da45a1 100644 --- a/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactoryBuilder.java +++ b/src/main/java/com/github/fge/jsonschema/main/JsonSchemaFactoryBuilder.java @@ -74,12 +74,7 @@ public final class JsonSchemaFactoryBuilder * @param factory the factory * @see JsonSchemaFactory#thaw() */ - JsonSchemaFactoryBuilder(final JsonSchemaFactory factory) - { - reportProvider = factory.reportProvider; - loadingCfg = factory.loadingCfg; - validationCfg = factory.validationCfg; - } + JsonSchemaFactoryBuilder(final JsonSchemaFactory factory) {} /** * Set a new report provider for this factory @@ -135,6 +130,12 @@ public JsonSchemaFactoryBuilder setValidationConfiguration( @Override public JsonSchemaFactory freeze() { + if (reportProvider == null) + reportProvider = new ListReportProvider(LogLevel.INFO, LogLevel.FATAL); + if (loadingCfg == null) + loadingCfg = LoadingConfiguration.byDefault(); + if (validationCfg == null) + validationCfg = ValidationConfiguration.byDefault(); return new JsonSchemaFactory(this); } } From 2f2109759436de1922ddce6b8b145c3c51e3d49b Mon Sep 17 00:00:00 2001 From: Bruno Casemiro Kurzawe Date: Fri, 15 Jun 2018 09:14:19 -0300 Subject: [PATCH 38/71] Fixed issue regarding date 2017-10-15 --- .gitignore | 1 + .../format/helpers/AbstractDateFormatAttribute.java | 2 +- src/test/resources/format/draftv3/date.json | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7c16d713f..ec357e3f3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ target build .gradle out +/.nb-gradle/ \ No newline at end of file diff --git a/src/main/java/com/github/fge/jsonschema/format/helpers/AbstractDateFormatAttribute.java b/src/main/java/com/github/fge/jsonschema/format/helpers/AbstractDateFormatAttribute.java index ed253f6ea..687452c1c 100644 --- a/src/main/java/com/github/fge/jsonschema/format/helpers/AbstractDateFormatAttribute.java +++ b/src/main/java/com/github/fge/jsonschema/format/helpers/AbstractDateFormatAttribute.java @@ -61,7 +61,7 @@ public final void validate(final ProcessingReport report, final String value = data.getInstance().getNode().textValue(); try { - formatter.parseDateTime(value); + formatter.parseLocalDate(value); } catch (IllegalArgumentException ignored) { report.error(newMsg(data, bundle, "err.format.invalidDate") .putArgument("value", value).putArgument("expected", format)); diff --git a/src/test/resources/format/draftv3/date.json b/src/test/resources/format/draftv3/date.json index 675faa537..1100d6309 100644 --- a/src/test/resources/format/draftv3/date.json +++ b/src/test/resources/format/draftv3/date.json @@ -1,4 +1,8 @@ [ + { + "data": "2017-10-15", + "valid": true + }, { "data": "2012-12-02", "valid": true From 522f80f832ae8b59474cc603f4c16ad0e65fc9f1 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Sat, 31 Aug 2019 21:49:33 +0200 Subject: [PATCH 39/71] Remove conflict marker --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index 705543152..1ba53a76d 100644 --- a/build.gradle +++ b/build.gradle @@ -40,7 +40,6 @@ repositories { * List of dependencies */ dependencies { -======= compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.9"); compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); From ec3c19f93c10f9b7319d05c3b1935d8281321829 Mon Sep 17 00:00:00 2001 From: capstan Date: Wed, 4 Sep 2019 17:30:13 +0200 Subject: [PATCH 40/71] 2.2.11 --- RELEASE-NOTES.md | 25 +++++++++++++++++++++++++ build.gradle | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 35a219faa..fbf93931e 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,28 @@ +### 2.2.11 + +* Depend on -core 1.2.10. +* Update dependencies on jsr305. +* Fix javadoc generation. +* Fix issue #293: Lazily instantiate defaults for `JsonSchemaFactoryBuilder`. + +### 2.2.10 + +* Revert strict date-time validation from 2.2.9; now such validation is opt-in. + +### 2.2.9 + +* Use stricter date-time attribute formatter. +* Added a cache size for # of records in ValidationConfiguration. + +### 2.2.8 + +* TODO + +### 2.2.7 + +* First time publishing under com.github.java-json-tools. +* TODO + ### 2.2.6 * Fix issue #112: fix circular validation detection; use a "validation stack" to diff --git a/build.gradle b/build.gradle index 1ba53a76d..d66f1f987 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ apply(plugin: "idea"); apply(plugin: "eclipse"); group = "com.github.java-json-tools"; -version = "2.2.10-SNAPSHOT"; +version = "2.2.11"; sourceCompatibility = "1.6"; targetCompatibility = "1.6"; // defaults to sourceCompatibility @@ -40,7 +40,7 @@ repositories { * List of dependencies */ dependencies { - compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.9"); + compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.10"); compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.0.0"); From b7f35ecc9c1cfb6ff099731cd8ca8cddf50d1d8b Mon Sep 17 00:00:00 2001 From: capstan Date: Wed, 4 Sep 2019 22:42:29 +0200 Subject: [PATCH 41/71] Announce 2.2.11 --- README.md | 6 +++--- build.gradle | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fa5c60ed9..306d8a298 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ run by yourself. ## Versions -* current stable version: **2.2.10** +* current stable version: **2.2.11** ([ChangeLog](https://github.com/java-json-tools/json-schema-validator/wiki/ChangeLog_22x), [Javadoc](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html), [code samples](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). @@ -57,7 +57,7 @@ Gradle: ```groovy dependencies { - compile(group: "com.github.java-json-tools", name: "json-schema-validator", version: "2.2.10"); + compile(group: "com.github.java-json-tools", name: "json-schema-validator", version: "2.2.11"); } ``` @@ -67,7 +67,7 @@ Maven: com.github.java-json-tools json-schema-validator - 2.2.10 + 2.2.11 ``` diff --git a/build.gradle b/build.gradle index d66f1f987..e8d638399 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ apply(plugin: "idea"); apply(plugin: "eclipse"); group = "com.github.java-json-tools"; -version = "2.2.11"; +version = "2.2.12-SNAPSHOT"; sourceCompatibility = "1.6"; targetCompatibility = "1.6"; // defaults to sourceCompatibility From 83c3eabfa30563e58a3e0b955a46343b718b2429 Mon Sep 17 00:00:00 2001 From: capstan Date: Thu, 5 Sep 2019 10:27:27 +0200 Subject: [PATCH 42/71] Update release instructions. Cloned from https://github.com/java-json-tools/jackson-coreutils/commit/01e2f47a9f8b580052b2bfe36cb28f582cf3f40a --- dorelease.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dorelease.sh b/dorelease.sh index 223917e47..f5cfc3289 100755 --- a/dorelease.sh +++ b/dorelease.sh @@ -3,11 +3,12 @@ # Release instructions # 1. Follow the gpg setup instructions: http://central.sonatype.org/pages/working-with-pgp-signatures.html # a. gpg2 --export-secret-keys > ~/.gnupg/secring.gpg +# b. gpg2 --list-keys --keyid-format short # 2. In ~/.gradle add: # sonatypeUsername=your sonatype user name # sonatypePassword=password in vault for oss sonatype # -# signing.keyId=generated key +# signing.keyId=generated key in short format # signing.password=password for gpg key # signing.secretKeyRingFile=/Users/username/.gnupg/secring.gpg # @@ -16,5 +17,5 @@ # 5. Login as sonatypeUsername # 6. Follow the instructions here: http://central.sonatype.org/pages/releasing-the-deployment.html -./gradlew --recompile-scripts clean test uploadArchives +./gradlew clean test uploadArchives From 1d37fd86d48439a59d310a89c69006640cef21e9 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Thu, 5 Sep 2019 13:10:58 +0200 Subject: [PATCH 43/71] Sync with ChangeLog_22x from the wiki. Partial fix for #287 --- RELEASE-NOTES.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index fbf93931e..77cd86dd9 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -16,12 +16,14 @@ ### 2.2.8 -* TODO +* update important dependencies like libphonenumber and others. See #210 and #209 ### 2.2.7 * First time publishing under com.github.java-json-tools. -* TODO +* The secFracs field will support up to 12 chars +* Switch KeywordValidators to use a factory model +* Changed JsonSchema to an interface ### 2.2.6 From ed7901ed52fdb944a0124f3ae72a72b00d8c6cd0 Mon Sep 17 00:00:00 2001 From: capstan Date: Thu, 5 Sep 2019 13:21:27 +0200 Subject: [PATCH 44/71] Remove derelict javadoc references. Modern javac removed the `-extdirs` flag, and commit e90ae13 removed the reference to this cached(?) sets of docs. --- .../fge/jsonschema/cfg/package-info.java | 28 -- .../examples/doc-files/Example1.java | 88 ----- .../examples/doc-files/Example10.java | 96 ----- .../examples/doc-files/Example2.java | 81 ---- .../examples/doc-files/Example3.java | 68 ---- .../examples/doc-files/Example4.java | 83 ---- .../examples/doc-files/Example5.java | 101 ----- .../examples/doc-files/Example6.java | 91 ----- .../examples/doc-files/Example7.java | 117 ------ .../examples/doc-files/Example8.java | 151 -------- .../examples/doc-files/Example9.java | 356 ------------------ .../examples/doc-files/custom-fmt-bad.json | 10 - .../examples/doc-files/custom-fmt-good.json | 6 - .../examples/doc-files/custom-fmt.json | 17 - .../doc-files/custom-keyword-bad.json | 1 - .../doc-files/custom-keyword-good.json | 1 - .../examples/doc-files/custom-keyword.json | 7 - .../examples/doc-files/fstab-bad.json | 15 - .../examples/doc-files/fstab-bad2.json | 19 - .../examples/doc-files/fstab-draftv3.json | 53 --- .../examples/doc-files/fstab-good.json | 20 - .../examples/doc-files/fstab-inline.json | 48 --- .../examples/doc-files/fstab-sub.json | 48 --- .../jsonschema/examples/doc-files/fstab.json | 48 --- .../examples/doc-files/split/fstab.json | 18 - .../examples/doc-files/split/mntent.json | 29 -- .../fge/jsonschema/examples/package-info.java | 28 -- .../jsonschema/exceptions/package-info.java | 22 -- .../exceptions/unchecked/package-info.java | 22 -- .../format/common/package-info.java | 23 -- .../format/draftv3/package-info.java | 23 -- .../format/draftv4/package-info.java | 23 -- .../format/helpers/package-info.java | 27 -- .../fge/jsonschema/format/package-info.java | 55 --- .../keyword/digest/common/package-info.java | 23 -- .../keyword/digest/draftv3/package-info.java | 23 -- .../keyword/digest/draftv4/package-info.java | 23 -- .../keyword/digest/helpers/package-info.java | 23 -- .../keyword/digest/package-info.java | 36 -- .../fge/jsonschema/keyword/package-info.java | 44 --- .../validator/common/package-info.java | 23 -- .../validator/draftv3/package-info.java | 23 -- .../validator/draftv4/package-info.java | 23 -- .../validator/helpers/package-info.java | 23 -- .../keyword/validator/package-info.java | 29 -- .../library/digest/package-info.java | 23 -- .../library/format/package-info.java | 23 -- .../fge/jsonschema/library/package-info.java | 33 -- .../library/validator/package-info.java | 23 -- .../fge/jsonschema/main/package-info.java | 30 -- .../fge/jsonschema/messages/package-info.java | 22 -- .../processors/build/package-info.java | 24 -- .../processors/data/package-info.java | 22 -- .../processors/digest/package-info.java | 24 -- .../processors/format/package-info.java | 24 -- .../jsonschema/processors/package-info.java | 41 -- .../processors/ref/package-info.java | 22 -- .../processors/validation/package-info.java | 34 -- src/main/javadoc/overview.html | 193 ---------- 59 files changed, 2654 deletions(-) delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/cfg/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example1.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example10.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example2.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example3.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example4.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example5.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example6.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example7.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example8.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example9.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt-bad.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt-good.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword-bad.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword-good.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-bad.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-bad2.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-draftv3.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-good.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-inline.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-sub.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/split/fstab.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/split/mntent.json delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/examples/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/exceptions/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/exceptions/unchecked/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/format/common/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/format/draftv3/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/format/draftv4/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/format/helpers/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/format/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/digest/common/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/digest/draftv3/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/digest/draftv4/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/digest/helpers/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/digest/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/validator/common/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/validator/draftv3/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/validator/draftv4/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/validator/helpers/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/keyword/validator/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/library/digest/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/library/format/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/library/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/library/validator/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/main/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/messages/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/processors/build/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/processors/data/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/processors/digest/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/processors/format/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/processors/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/processors/ref/package-info.java delete mode 100644 src/main/javadoc/com/github/fge/jsonschema/processors/validation/package-info.java delete mode 100644 src/main/javadoc/overview.html diff --git a/src/main/javadoc/com/github/fge/jsonschema/cfg/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/cfg/package-info.java deleted file mode 100644 index b261e929c..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/cfg/package-info.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Validation processor configuration classes - * - *

    The validation process can be influenced in two ways: how JSON Schemas - * should be loaded and how validation should operate.

    - * - *

    Each of these ways is materialized by a pair of frozen/thawed instances. - *

    - */ -package com.github.fge.jsonschema.cfg; diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example1.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example1.java deleted file mode 100644 index 03921d559..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example1.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaFactory; - -import java.io.IOException; - -/** - * First example: basic usage - * - *
    - * - *

    This shows a basic usage example. The schema used for validation is - * here, which conforms to draft v4, which is - * the default version. You will notice that a JSON Pointer ({@code - * #/definitions/mntent}) is used to address a subschema defining a mount entry. - *

    - * - *

    This example uses {@link JsonSchemaFactory#byDefault()}, and uses - * {@link JsonSchemaFactory#getJsonSchema(JsonNode)} to create the {@link - * JsonSchema} instance.

    - * - *

    The first sample (here) validates - * successfully.

    - * - *

    The second sample (here) fails to - * validate. Please note that the failure occurs at the structural level - * (required entry {@code swap} is missing). Validation therefore stops here, - * and does not attempt to validate the {@code /} member of the instance, which - * is itself invalid.

    - * - *

    The third sample (here) fails to - * validate as well. This time, the problem is with the member values:

    - * - *
      - *
    • the {@code options} member of {@code /tmp} is a string, but an array - * is expected;
    • - *
    • the {@code /} member is missing the required {@code fstype} member. - *
    • - *
    - */ -public final class Example1 -{ - public static void main(final String... args) - throws IOException, ProcessingException - { - final JsonNode fstabSchema = Utils.loadResource("/fstab.json"); - final JsonNode good = Utils.loadResource("/fstab-good.json"); - final JsonNode bad = Utils.loadResource("/fstab-bad.json"); - final JsonNode bad2 = Utils.loadResource("/fstab-bad2.json"); - - final JsonSchemaFactory factory = JsonSchemaFactory.byDefault(); - - final JsonSchema schema = factory.getJsonSchema(fstabSchema); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - - report = schema.validate(bad2); - System.out.println(report); - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example10.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example10.java deleted file mode 100644 index e3d6f3dbf..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example10.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.load.configuration.LoadingConfiguration; -import com.github.fge.jsonschema.core.load.configuration.LoadingConfigurationBuilder; -import com.github.fge.jsonschema.core.ref.JsonRef; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaFactory; - -import java.io.IOException; - -/** - * Tenth example: registering schemas - * - *

    link to source code

    - * - *

    In this example, we register a custom schema with a given URI, and - * initiate the {@link JsonSchema} instance using that URI. This is done by - * customizing a {@link LoadingConfiguration} and registering schemas using - * {@link LoadingConfigurationBuilder#preloadSchema(String, JsonNode)}.

    - * - *

    The only necessary condition for the URI is for it to be an absolute JSON - * reference (see {@link JsonRef#isAbsolute()}), and you can register as many - * schemas as you want. Here, we register both schemas from {@link Example5}. - * You will notice that the scheme for these URIs is {@code xxx}: it does not - * matter in the slightest that it is not a supported scheme by default, the - * schema is registered all the same.

    - * - *

    This also shows that reference resolution still works in such a case, - * since the {@code mntent} schema is referred to via a relative URI from the - * {@code fstab} schema.

    - * - */ -public final class Example10 -{ - private static final String URI_BASE = "xxx://foo.bar/path/to/"; - - public static void main(final String... args) - throws IOException, ProcessingException - { - final LoadingConfigurationBuilder builder - = LoadingConfiguration.newBuilder(); - - JsonNode node; - String uri; - - node = Utils.loadResource("/split/fstab.json"); - uri = URI_BASE + "fstab.json"; - builder.preloadSchema(uri, node); - - node = Utils.loadResource("/split/mntent.json"); - uri = URI_BASE + "mntent.json"; - builder.preloadSchema(uri, node); - - final JsonSchemaFactory factory = JsonSchemaFactory.newBuilder() - .setLoadingConfiguration(builder.freeze()).freeze(); - - final JsonSchema schema - = factory.getJsonSchema(URI_BASE + "fstab.json"); - - final JsonNode good = Utils.loadResource("/fstab-good.json"); - final JsonNode bad = Utils.loadResource("/fstab-bad.json"); - final JsonNode bad2 = Utils.loadResource("/fstab-bad2.json"); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - - report = schema.validate(bad2); - System.out.println(report); - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example2.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example2.java deleted file mode 100644 index 6a5ecf5ba..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example2.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.load.Dereferencing; -import com.github.fge.jsonschema.core.load.configuration.LoadingConfiguration; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaFactory; -import com.github.fge.jsonschema.main.JsonSchemaFactoryBuilder; - -import java.io.IOException; - -/** - * Second example: inline schema addressing - * - *

    link to source code

    - * - *

    This example uses the same schema with one difference: the mntent - * subschema is now referenced via inline addressing using an {@code id}.

    - * - *

    The schema used for validation is - * here.

    - * - *

    In order to use inline schema addressing, we cannot use the default - * factory: we must go through a {@link JsonSchemaFactoryBuilder} and use a - * modified {@link LoadingConfiguration} to tell that we want to use inline - * dereferencing.

    - * - *

    Apart from these, the files used for validation and validation results - * are the same as {@link Example1}.

    - * - * @see Dereferencing - */ -public final class Example2 -{ - public static void main(final String... args) - throws IOException, ProcessingException - { - final JsonNode fstabSchema = Utils.loadResource("/fstab-inline.json"); - final JsonNode good = Utils.loadResource("/fstab-good.json"); - final JsonNode bad = Utils.loadResource("/fstab-bad.json"); - final JsonNode bad2 = Utils.loadResource("/fstab-bad2.json"); - - final LoadingConfiguration cfg = LoadingConfiguration.newBuilder() - .dereferencing(Dereferencing.INLINE).freeze(); - final JsonSchemaFactory factory = JsonSchemaFactory.newBuilder() - .setLoadingConfiguration(cfg).freeze(); - - final JsonSchema schema = factory.getJsonSchema(fstabSchema); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - - report = schema.validate(bad2); - System.out.println(report); - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example3.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example3.java deleted file mode 100644 index a703eb68a..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example3.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaFactory; - -import java.io.IOException; - -/** - * Third example: draft v3 detection via {@code $schema} - * - *

    link to source code

    - * - *

    This shows a basic usage example. This is the same source code as for - * {@link Example1}, except this time the schema (here) conforms to draft v3 instead of - * draft v4 (the {@code $schema} value differs).

    - * - *

    One thing to note is a difference in the validation messages: while - * required properties are described using the {@code required} keyword, with - * draft v3, they were in charge of the {@code properties} keyword.

    - */ -public final class Example3 -{ - public static void main(final String... args) - throws IOException, ProcessingException - { - final JsonNode fstabSchema = Utils.loadResource("/fstab-draftv3.json"); - final JsonNode good = Utils.loadResource("/fstab-good.json"); - final JsonNode bad = Utils.loadResource("/fstab-bad.json"); - final JsonNode bad2 = Utils.loadResource("/fstab-bad2.json"); - - final JsonSchemaFactory factory = JsonSchemaFactory.byDefault(); - - final JsonSchema schema = factory.getJsonSchema(fstabSchema); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - - report = schema.validate(bad2); - System.out.println(report); - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example4.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example4.java deleted file mode 100644 index bd8e01e59..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example4.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaFactory; - -import java.io.IOException; - -/** - * Fourth example: schema loading via URIs, and subschema addressing - * - *

    link to source code

    - * - *

    link to schema

    - * - *

    This demonstrates two capabilities of {@link JsonSchemaFactory}:

    - * - *
      - *
    • the ability to Utils.load schemas via URIs;
    • - *
    • the ability to address subschemas in a schema.
    • - *
    - * - *

    The implementation provides a {@code resource} scheme which allows to Utils.load - * JSON from files in the classpath. It is strictly equivalent to calling {@link - * Class#getResourceAsStream(String)}.

    - * - *

    The URI used is {@code - * resource:/org/eel/kitchen/jsonschema/examples/fstab-sub.json}. Because we - * want to validate against the {@code fstab} subschema, we use {@link - * JsonSchemaFactory#getJsonSchema(String)} to Utils.load the actual schema; the URI - * used as an argument also has a JSON Pointer as a fragment.

    - * - *

    Files validated, and the validation outputs, are the same as for {@link - * Example2}.

    - */ -public final class Example4 -{ - private static final String SCHEMA_URI - = "resource:/com/github/fge/jsonschema/examples/fstab-sub.json#/fstab"; - - public static void main(final String... args) - throws IOException, ProcessingException - { - final JsonNode good = Utils.loadResource("/fstab-good.json"); - final JsonNode bad = Utils.loadResource("/fstab-bad.json"); - final JsonNode bad2 = Utils.loadResource("/fstab-bad2.json"); - - final JsonSchemaFactory factory = JsonSchemaFactory.byDefault(); - - final JsonSchema schema = factory.getJsonSchema(SCHEMA_URI); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - - report = schema.validate(bad2); - System.out.println(report); - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example5.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example5.java deleted file mode 100644 index 1ba94ffc0..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example5.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.load.SchemaLoader; -import com.github.fge.jsonschema.core.load.configuration.LoadingConfiguration; -import com.github.fge.jsonschema.core.load.configuration.LoadingConfigurationBuilder; -import com.github.fge.jsonschema.core.load.uri.URITranslatorConfiguration; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaFactory; -import com.github.fge.jsonschema.main.JsonSchemaFactoryBuilder; - -import java.io.IOException; - -/** - * Fifth example: setting a URI namespace; relative URI resolution - * - *

    link to source code

    - * - *

    This example demonstrates another capability of {@link JsonSchemaFactory}: - * the ability to set a URI namespace. This requires to customize the factory, - * and therefore go through {@link JsonSchemaFactoryBuilder} again.

    - * - *

    In order to set a URI namespace, we must grab a {@link - * LoadingConfigurationBuilder}, set the namespace, freeze it, and pass it to - * the factory builder and then freeze the factory.

    - * - *

    The net effect is that all schema loading done by {@link SchemaLoader} - * will now resolve against this namespace, and this includes arguments to - * {@link JsonSchemaFactory#getJsonSchema(String)}.

    - * - *

    The schemas are split in two:

    - * - *
      - *
    • one describing fstab: here; - *
    • - *
    • another describing an entry: - * here.
    • - *
    - * - *

    The first refers to the second one via the relative URI {@code - * mntent.json}. This works precisely because a URI namespace has been set: all - * URIs are resolved against this namespace.

    - * - *

    Files validated, and the validation outputs, are the same as for {@link - * Example2}.

    - */ -public final class Example5 -{ - private static final String NAMESPACE - = "resource:/com/github/fge/jsonschema/examples/split/"; - - public static void main(final String... args) - throws IOException, ProcessingException - { - final JsonNode good = Utils.loadResource("/fstab-good.json"); - final JsonNode bad = Utils.loadResource("/fstab-bad.json"); - final JsonNode bad2 = Utils.loadResource("/fstab-bad2.json"); - - final URITranslatorConfiguration translatorCfg - = URITranslatorConfiguration.newBuilder() - .setNamespace(NAMESPACE).freeze(); - final LoadingConfiguration cfg = LoadingConfiguration.newBuilder() - .setURITranslatorConfiguration(translatorCfg).freeze(); - - final JsonSchemaFactory factory = JsonSchemaFactory.newBuilder() - .setLoadingConfiguration(cfg).freeze(); - - final JsonSchema schema = factory.getJsonSchema("fstab.json"); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - - report = schema.validate(bad2); - System.out.println(report); - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example6.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example6.java deleted file mode 100644 index 464b59caf..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example6.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.load.configuration.LoadingConfiguration; -import com.github.fge.jsonschema.core.load.configuration.LoadingConfigurationBuilder; -import com.github.fge.jsonschema.core.load.uri.URITranslatorConfiguration; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaFactory; - -import java.io.IOException; - -/** - * Sixth example: URI redirection - * - *

    link to source code

    - * - *

    In this example, the same schema file is used as in {@link Example1}. This - * time, though, it is assumed that the base URI used for addressing this schema - * is {@code http://my.site/schemas/fstab.json#}. But instead of trying to - * fetch it from the web directly, we want to use the local copy, which is - * located under URI {@code - * resource:/org/eel/kitchen/jsonschema/examples/fstab.json#}.

    - * - *

    The solution is here again to build a custom {@link LoadingConfiguration}, - * which allows to add schema redirections (using {@link - * LoadingConfigurationBuilder#addSchemaRedirect(String, String)}. This method - * can be called for as many schemas as you wish to redirect.

    - * - *

    The effect is that if you required a schema via URI {@code - * http://my.site/schemas/fstab.json#}, it will silently transform this URI into - * {@code resource:/org/eel/kitchen/jsonschema/examples/fstab.json#} - * internally.

    - * - *

    Note that URIs must be absolute JSON references (see {@link JsonRef}).

    - */ -public final class Example6 -{ - private static final String FROM = "http://my.site/schemas/fstab.json#"; - private static final String TO - = "resource:/com/github/fge/jsonschema/examples/fstab.json#"; - - public static void main(final String... args) - throws IOException, ProcessingException - { - final JsonNode good = Utils.loadResource("/fstab-good.json"); - final JsonNode bad = Utils.loadResource("/fstab-bad.json"); - final JsonNode bad2 = Utils.loadResource("/fstab-bad2.json"); - - final URITranslatorConfiguration translatorCfg - = URITranslatorConfiguration.newBuilder() - .addSchemaRedirect(FROM, TO).freeze(); - final LoadingConfiguration cfg = LoadingConfiguration.newBuilder() - .setURITranslatorConfiguration(translatorCfg).freeze(); - - final JsonSchemaFactory factory = JsonSchemaFactory.newBuilder() - .setLoadingConfiguration(cfg).freeze(); - - final JsonSchema schema = factory.getJsonSchema(FROM); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - - report = schema.validate(bad2); - System.out.println(report); - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example7.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example7.java deleted file mode 100644 index f281a870c..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example7.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.load.configuration.LoadingConfiguration; -import com.github.fge.jsonschema.core.load.configuration.LoadingConfigurationBuilder; -import com.github.fge.jsonschema.core.load.download.URIDownloader; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaFactory; - -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; - -/** - * Seventh example: custom URI scheme - * - *

    link to source code

    - * - *

    This demonstrates {@link JsonSchemaFactory}'s ability to register a - * custom URI scheme. In this example, the scheme is {@code foobar}, and it is - * simply an alias to fetch a resource from the current package.

    - * - *

    Two things are needed:

    - * - *
      - *
    • an implementation of {@link URIDownloader} for this scheme,
    • - *
    • registering this scheme using {@link - * LoadingConfigurationBuilder#addScheme(String, URIDownloader)}.
    • - *
    - * - *

    Once this is done, this scheme, when encountered anywhere in JSON - * References, will use this downloader, and you are also able to use it when - * loading schemas using {@link JsonSchemaFactory#getJsonSchema(String)}, which - * is what this example does.

    - * - *

    The schema and files used are the same as for {@link Example2}.

    - */ -public final class Example7 -{ - public static void main(final String... args) - throws IOException, ProcessingException - { - final JsonNode good = Utils.loadResource("/fstab-good.json"); - final JsonNode bad = Utils.loadResource("/fstab-bad.json"); - final JsonNode bad2 = Utils.loadResource("/fstab-bad2.json"); - - final LoadingConfiguration cfg = LoadingConfiguration.newBuilder() - .addScheme("foobar", CustomDownloader.getInstance()).freeze(); - - final JsonSchemaFactory factory = JsonSchemaFactory.newBuilder() - .setLoadingConfiguration(cfg).freeze(); - - final JsonSchema schema - = factory.getJsonSchema("foobar:/fstab.json#"); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - - report = schema.validate(bad2); - System.out.println(report); - } - - private static final class CustomDownloader - implements URIDownloader - { - private static final String PREFIX; - private static final URIDownloader INSTANCE = new CustomDownloader(); - - static { - final String pkgname = CustomDownloader.class.getPackage() - .getName(); - PREFIX = '/' + pkgname.replace(".", "/"); - } - - public static URIDownloader getInstance() - { - return INSTANCE; - } - - @Override - public InputStream fetch(final URI source) - throws IOException - { - final String path = PREFIX + source.getPath(); - final InputStream ret = getClass().getResourceAsStream(path); - - if (ret == null) - throw new IOException("resource " + path + " not found"); - return ret; - } - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example8.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example8.java deleted file mode 100644 index a6d6f0b9f..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example8.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jackson.NodeType; -import com.github.fge.jsonschema.cfg.ValidationConfiguration; -import com.github.fge.jsonschema.cfg.ValidationConfigurationBuilder; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.format.AbstractFormatAttribute; -import com.github.fge.jsonschema.format.FormatAttribute; -import com.github.fge.jsonschema.library.DraftV4Library; -import com.github.fge.jsonschema.library.Library; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaFactory; -import com.github.fge.jsonschema.messages.JsonSchemaValidationBundle; -import com.github.fge.jsonschema.processors.data.FullData; -import com.github.fge.msgsimple.bundle.MessageBundle; -import com.github.fge.msgsimple.load.MessageBundles; -import com.github.fge.msgsimple.source.MapMessageSource; -import com.github.fge.msgsimple.source.MessageSource; - -import java.io.IOException; -import java.util.UUID; - -/** - * Eighth example: augmenting schemas with custom format attributes - * - *

    link to source code

    - * - *

    link to schema

    - * - *

    This example adds a custom format attribute named {@code uuid}, which - * checks whether a string instance is a valid UUID.

    - * - *

    For this, you need to write an implementation of {@link FormatAttribute}, - * registering it in a {@link Library}, and feed that library to a {@link - * ValidationConfiguration} which you submit to the {@link JsonSchemaFactory}. - *

    - * - *

    Here, we choose to augment the draft v4 library, which we get hold of - * using {@link DraftV4Library#get()}; we thaw it, add the new attribute and - * freeze it again. We also choose to make this new library the default by - * using {@link - * ValidationConfigurationBuilder#setDefaultLibrary(String, Library)}.

    - * - *

    Note also that the schema has no {@code $schema} defined; as a result, the - * default library is used (it is not recommended to omit {@code $schema} - * in your schemas, however).

    - * - *

    Two sample files are given: the first (link) is valid, the other (link) isn't (the provided {@code id} - * for the second array element is invalid).

    - */ -public final class Example8 -{ - public static void main(final String... args) - throws IOException, ProcessingException - { - final JsonNode customSchema = Utils.loadResource("/custom-fmt.json"); - final JsonNode good = Utils.loadResource("/custom-fmt-good.json"); - final JsonNode bad = Utils.loadResource("/custom-fmt-bad.json"); - - /* - * Build a new library with our added format attribute - */ - final Library library = DraftV4Library.get().thaw() - .addFormatAttribute("uuid", UUIDFormatAttribute.getInstance()) - .freeze(); - - /* - * Build a new message bundle with our added error message - */ - final String key = "invalidUUID"; - final String value = "input is not a valid UUID"; - final MessageSource source = MapMessageSource.newBuilder() - .put(key, value).build(); - final MessageBundle bundle - = MessageBundles.getBundle(JsonSchemaValidationBundle.class) - .thaw().appendSource(source).freeze(); - - /* - * Build our dedicated validation configuration - */ - final ValidationConfiguration cfg = ValidationConfiguration.newBuilder() - .setDefaultLibrary("http://my.site/myschema#", library) - .setValidationMessages(bundle).freeze(); - - final JsonSchemaFactory factory = JsonSchemaFactory.newBuilder() - .setValidationConfiguration(cfg).freeze(); - - final JsonSchema schema = factory.getJsonSchema(customSchema); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - } - - private static final class UUIDFormatAttribute - extends AbstractFormatAttribute - { - private static final FormatAttribute INSTANCE - = new UUIDFormatAttribute(); - - private UUIDFormatAttribute() - { - super("uuid", NodeType.STRING); - } - - public static FormatAttribute getInstance() - { - return INSTANCE; - } - - @Override - public void validate(final ProcessingReport report, - final MessageBundle bundle, final FullData data) - throws ProcessingException - { - final String value = data.getInstance().getNode().textValue(); - try { - UUID.fromString(value); - } catch (IllegalArgumentException ignored) { - report.error(newMsg(data, bundle, "invalidUUID") - .put("input", value)); - } - } - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example9.java b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example9.java deleted file mode 100644 index ce02e0d65..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/Example9.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -package com.github.fge.jsonschema.examples; - -import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jackson.NodeType; -import com.github.fge.jackson.jsonpointer.JsonPointer; -import com.github.fge.jsonschema.cfg.ValidationConfiguration; -import com.github.fge.jsonschema.core.exceptions.ProcessingException; -import com.github.fge.jsonschema.core.keyword.syntax.checkers.AbstractSyntaxChecker; -import com.github.fge.jsonschema.core.keyword.syntax.checkers.SyntaxChecker; -import com.github.fge.jsonschema.core.processing.Processor; -import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.core.tree.SchemaTree; -import com.github.fge.jsonschema.keyword.digest.AbstractDigester; -import com.github.fge.jsonschema.keyword.digest.Digester; -import com.github.fge.jsonschema.keyword.digest.helpers.IdentityDigester; -import com.github.fge.jsonschema.keyword.digest.helpers.SimpleDigester; -import com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator; -import com.github.fge.jsonschema.keyword.validator.KeywordValidator; -import com.github.fge.jsonschema.library.DraftV4Library; -import com.github.fge.jsonschema.library.Keyword; -import com.github.fge.jsonschema.library.KeywordBuilder; -import com.github.fge.jsonschema.library.Library; -import com.github.fge.jsonschema.library.LibraryBuilder; -import com.github.fge.jsonschema.main.JsonSchema; -import com.github.fge.jsonschema.main.JsonSchemaImpl; -import com.github.fge.jsonschema.main.JsonSchemaFactory; -import com.github.fge.jsonschema.messages.JsonSchemaValidationBundle; -import com.github.fge.jsonschema.processors.data.FullData; -import com.github.fge.msgsimple.bundle.MessageBundle; -import com.github.fge.msgsimple.load.MessageBundles; -import com.github.fge.msgsimple.source.MapMessageSource; -import com.github.fge.msgsimple.source.MessageSource; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; -import com.google.common.collect.Sets; - -import java.io.IOException; -import java.math.BigInteger; -import java.util.Collection; -import java.util.Comparator; -import java.util.List; -import java.util.Set; -import java.util.SortedSet; - -/** - * Ninth example: augmenting schemas with custom keywords - * - *

    link to source code

    - * - *

    link to schema

    - * - *

    This example adds a custom keyword with syntax checking, digesting and - * keyword validation. The chosen keyword is {@code divisors}: it applies to - * integer values and takes an array of (unique) integers as an argument.

    - * - *

    The validation is the same as for {@code multipleOf} except that it is - * restricted to integer values and the instance must be a multiple of all - * divisors. For instance, if the value of this keyword is {@code [2, 3]}, then - * 6 validates successfully but 14 does not (it is divisible by 2 but not 3). - *

    - * - *

    For this, you need to create your own keyword. This is done using {@link - * Keyword#newBuilder(String)}, where the argument is the name of your keyword, - * and then add the following elements:

    - * - *
      - *
    • a {@link SyntaxChecker} (using {@link - * KeywordBuilder#withSyntaxChecker(SyntaxChecker)};
    • - *
    • a {@link Digester} (using {@link - * KeywordBuilder#withDigester(Digester)};
    • - *
    • and finally, a {@link KeywordValidator} (using {@link - * KeywordBuilder#withValidatorClass(Class)}.
    • - *
    - * - *

    Then, as in {@link Example8}, you need to get hold of a {@link Library} - * (we choose again to extend the draft v4 library) and add the (frozen) - * keyword to it using {@link LibraryBuilder#addKeyword(Keyword)}.

    - * - *

    The keyword validator must have a single constructor taking a - * {@link JsonNode} as an argument (which will be the result of the {@link - * Digester}). Note that you may omit to write a digester and choose instead to - * use an {@link IdentityDigester} or a {@link SimpleDigester} (which you inject - * into a keyword using {@link - * KeywordBuilder#withIdentityDigester(NodeType, NodeType...)} and {@link - * KeywordBuilder#withSimpleDigester(NodeType, NodeType...)} respectively).

    - * - *

    Two sample files are given: the first (link) is valid, the other (link) isn't (the first and third - * elements fail to divide by one or more factors).

    - */ -public final class Example9 -{ - public static void main(final String... args) - throws IOException, ProcessingException - { - final JsonNode customSchema = Utils.loadResource("/custom-keyword.json"); - final JsonNode good = Utils.loadResource("/custom-keyword-good.json"); - final JsonNode bad = Utils.loadResource("/custom-keyword-bad.json"); - - /* - * Build the new keyword - */ - final Keyword keyword = Keyword.newBuilder("divisors") - .withSyntaxChecker(DivisorsSyntaxChecker.getInstance()) - .withDigester(DivisorsDigesters.getInstance()) - .withValidatorClass(DivisorsKeywordValidator.class).freeze(); - - /* - * Build a library, based on the v4 library, with this new keyword - */ - final Library library = DraftV4Library.get().thaw() - .addKeyword(keyword).freeze(); - - /* - * Complement the validation message bundle with a dedicated message - * for our keyword validator - */ - final String key = "missingDivisors"; - final String value = "integer value is not a multiple of all divisors"; - final MessageSource source = MapMessageSource.newBuilder() - .put(key, value).build(); - final MessageBundle bundle - = MessageBundles.getBundle(JsonSchemaValidationBundle.class) - .thaw().appendSource(source).freeze(); - - /* - * Build a custom validation configuration: add our custom library and - * message bundle - */ - final ValidationConfiguration cfg = ValidationConfiguration.newBuilder() - .setDefaultLibrary("http://my.site/myschema#", library) - .setValidationMessages(bundle).freeze(); - - final JsonSchemaFactory factory = JsonSchemaFactory.newBuilder() - .setValidationConfiguration(cfg).freeze(); - - final JsonSchema schema = factory.getJsonSchema(customSchema); - - ProcessingReport report; - - report = schema.validate(good); - System.out.println(report); - - report = schema.validate(bad); - System.out.println(report); - } - - /* - * Our custom syntax checker - */ - private static final class DivisorsSyntaxChecker - extends AbstractSyntaxChecker - { - private static final SyntaxChecker INSTANCE - = new DivisorsSyntaxChecker(); - - public static SyntaxChecker getInstance() - { - return INSTANCE; - } - - private DivisorsSyntaxChecker() - { - /* - * When constructing, the name for the keyword must be provided - * along with the allowed type for the value (here, an array). - */ - super("divisors", NodeType.ARRAY); - } - - @Override - protected void checkValue(final Collection pointers, - final MessageBundle bundle, final ProcessingReport report, - final SchemaTree tree) - throws ProcessingException - { - /* - * Using AbstractSyntaxChecker as a base, we know that when we reach - * this method, the value has already been validated as being of - * the allowed primitive types (only array here). - * - * But this is not enough for this particular validator: we must - * also ensure that all elements of this array are integers. Cycle - * through all elements of the array and check each element. If we - * encounter a non integer argument, add a message. - * - * We must also check that there is at lease one element, that the - * array contains no duplicates and that all elements are positive - * integers and strictly greater than 0. - * - * The getNode() method grabs the value of this keyword for us, so - * use that. Note that we also reuse some messages already defined - * in SyntaxMessages. - */ - final JsonNode node = getNode(tree); - - final int size = node.size(); - - if (size == 0) { - report.error(newMsg(tree, bundle, "emptyArray")); - return; - } - - NodeType type; - JsonNode element; - boolean uniqueItems = true; - - final Set set = Sets.newHashSet(); - - for (int index = 0; index < size; index++) { - element = node.get(index); - type = NodeType.getNodeType(element); - if (type != NodeType.INTEGER) - report.error(newMsg(tree, bundle, "incorrectElementType") - .put("expected", NodeType.INTEGER) - .put("found", type)); - else if (element.bigIntegerValue().compareTo(BigInteger.ONE) < 0) - report.error(newMsg(tree, bundle, "integerIsNegative") - .put("value", element)); - uniqueItems = set.add(element); - } - - if (!uniqueItems) - report.error(newMsg(tree, bundle, "elementsNotUnique")); - } - } - - /* - * Our custom digester - * - * We take the opportunity to build a digested form where, for instance, - * [ 3, 5 ] and [ 5, 3 ] give the same digest. - */ - private static final class DivisorsDigesters - extends AbstractDigester - { - private static final Digester INSTANCE = new DivisorsDigesters(); - - public static Digester getInstance() - { - return INSTANCE; - } - - private DivisorsDigesters() - { - super("divisors", NodeType.INTEGER); - } - - @Override - public JsonNode digest(final JsonNode schema) - { - final SortedSet set = Sets.newTreeSet(COMPARATOR); - for (final JsonNode element: schema.get(keyword)) - set.add(element); - - return FACTORY.arrayNode().addAll(set); - } - - /* - * Custom Comparator. We compare BigInteger values, since all integers - * are representable using this class. - */ - private static final Comparator COMPARATOR - = new Comparator() - { - @Override - public int compare(final JsonNode o1, final JsonNode o2) - { - return o1.bigIntegerValue().compareTo(o2.bigIntegerValue()); - } - }; - } - - - /** - * Custom keyword validator for {@link Example9} - * - * It must be {@code public} because it is built by reflection. - */ - public static final class DivisorsKeywordValidator - extends AbstractKeywordValidator - { - /* - * We want to validate arbitrarily large integer values, we therefore - * use BigInteger. - */ - private final List divisors; - - public DivisorsKeywordValidator(final JsonNode digest) - { - super("divisors"); - - final ImmutableList.Builder list - = ImmutableList.builder(); - - for (final JsonNode element: digest) - list.add(element.bigIntegerValue()); - - divisors = list.build(); - } - - @Override - public void validate(final Processor processor, - final ProcessingReport report, final MessageBundle bundle, - final FullData data) - throws ProcessingException - { - final BigInteger value - = data.getInstance().getNode().bigIntegerValue(); - /* - * We use a plain list to store failed divisors: remember that the - * digested form was built with divisors in order, we therefore - * only need insertion order, and a plain ArrayList guarantees that. - */ - final List failed = Lists.newArrayList(); - - for (final BigInteger divisor: divisors) - if (!value.mod(divisor).equals(BigInteger.ZERO)) - failed.add(divisor); - - if (failed.isEmpty()) - return; - - /* - * There are missed divisors: report. - */ - report.error(newMsg(data, bundle, "missingDivisors") - .put("divisors", divisors).put("failed", failed)); - } - - @Override - public String toString() - { - return "divisors: " + divisors; - } - } -} diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt-bad.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt-bad.json deleted file mode 100644 index 5359f2b19..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt-bad.json +++ /dev/null @@ -1,10 +0,0 @@ -[ - { - "id": "5aacaa7e-15f5-4798-9857-7c34a0d8fda0", - "name": "foo" - }, - { - "id": "not-an-uuid", - "name": "bar" - } -] \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt-good.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt-good.json deleted file mode 100644 index ec4be97d5..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt-good.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "id": "5aacaa7e-15f5-4798-9857-7c34a0d8fda0", - "name": "foo" - } -] \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt.json deleted file mode 100644 index f872d1c2c..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-fmt.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "title": "custom format attribute demonstration", - "type": "array", - "items": { - "type": "object", - "required": [ "id", "name" ], - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string" - } - } - } -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword-bad.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword-bad.json deleted file mode 100644 index 07dc92425..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword-bad.json +++ /dev/null @@ -1 +0,0 @@ -[ 3, 12, 17 ] \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword-good.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword-good.json deleted file mode 100644 index f5b341927..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword-good.json +++ /dev/null @@ -1 +0,0 @@ -[ 6, 12, 90 ] \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword.json deleted file mode 100644 index 85c4ff243..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/custom-keyword.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "array", - "items": { - "type": "integer", - "divisors": [ 2, 3 ] - } -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-bad.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-bad.json deleted file mode 100644 index bd4e47097..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-bad.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "/": { - "fstype": "btrfs", - "options": [ "ssd" ] - }, - "/tmp": { - "device": "tmpfs", - "fstype": "tmpfs", - "options": [ "size=64M" ] - }, - "/var/lib/mysql": { - "device": "/dev/data/mysql", - "fstype": "btrfs" - } -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-bad2.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-bad2.json deleted file mode 100644 index 743676d52..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-bad2.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "/": { - "device": "/dev/sda1", - "options": [ "ssd" ] - }, - "swap": { - "device": "/dev/sda2", - "fstype": "swap" - }, - "/tmp": { - "device": "tmpfs", - "fstype": "tmpfs", - "options": "size=64M" - }, - "/var/lib/mysql": { - "device": "/dev/data/mysql", - "fstype": "btrfs" - } -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-draftv3.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-draftv3.json deleted file mode 100644 index 597df1b89..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-draftv3.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-03/schema#", - "title": "/etc/fstab", - "description": "JSON representation of /etc/fstab", - "type": "object", - "properties": { - "/": { - "required": true, - "$ref": "#/definitions/mntent" - }, - "swap": { - "required": true, - "$ref": "#/definitions/mntent" - } - }, - "patternProperties": { - "^/[^/]+(/[^/]+)*$": { - "$ref": "#/definitions/mntent" - } - }, - "additionalProperties": false, - "definitions": { - "mntent": { - "title": "mntent", - "description": "An fstab entry", - "type": "object", - "properties": { - "device": { - "type": "string", - "required": true - }, - "fstype": { - "type": "string", - "required": true - }, - "options": { - "type": "array", - "minItems": 1, - "items": { "type": "string" } - }, - "dump": { - "type": "integer", - "minimum": 0 - }, - "fsck": { - "type": "integer", - "minimum": 0 - } - }, - "additionalItems": false - } - } -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-good.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-good.json deleted file mode 100644 index 6367c4335..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-good.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "/": { - "device": "/dev/sda1", - "fstype": "btrfs", - "options": [ "ssd" ] - }, - "swap": { - "device": "/dev/sda2", - "fstype": "swap" - }, - "/tmp": { - "device": "tmpfs", - "fstype": "tmpfs", - "options": [ "size=64M" ] - }, - "/var/lib/mysql": { - "device": "/dev/data/mysql", - "fstype": "btrfs" - } -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-inline.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-inline.json deleted file mode 100644 index 743b677e3..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-inline.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "/etc/fstab", - "description": "JSON representation of /etc/fstab", - "type": "object", - "required": [ "/", "swap" ], - "properties": { - "swap": { - "$ref": "#mntent" - } - }, - "patternProperties": { - "^/[^/]+(/[^/]+)*$": { - "$ref": "#mntent" - } - }, - "additionalProperties": false, - "definitions": { - "mntent": { - "title": "mntent", - "description": "An fstab entry", - "type": "object", - "properties": { - "device": { - "type": "string" - }, - "fstype": { - "type": "string" - }, - "options": { - "type": "array", - "minItems": 1, - "items": { "type": "string" } - }, - "dump": { - "type": "integer", - "minimum": 0 - }, - "fsck": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ "device", "fstype" ], - "additionalItems": false - } - } -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-sub.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-sub.json deleted file mode 100644 index 3c4cc2568..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab-sub.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "/etc/fstab", - "description": "JSON representation of /etc/fstab", - "fstab": { - "type": "object", - "properties": { - "swap": { - "$ref": "#/mntent" - } - }, - "patternProperties": { - "^/([^/]+(/[^/]+)*)?$": { - "$ref": "#/mntent" - } - }, - "required": [ "/", "swap" ], - "additionalProperties": false - }, - "mntent": { - "title": "mntent", - "description": "An fstab entry", - "type": "object", - "properties": { - "device": { - "type": "string" - }, - "fstype": { - "type": "string" - }, - "options": { - "type": "array", - "minItems": 1, - "items": { "type": "string" } - }, - "dump": { - "type": "integer", - "minimum": 0 - }, - "fsck": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ "device", "fstype" ], - "additionalItems": false - } -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab.json deleted file mode 100644 index ff4f8d702..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/fstab.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "/etc/fstab", - "description": "JSON representation of /etc/fstab", - "type": "object", - "properties": { - "swap": { - "$ref": "#/definitions/mntent" - } - }, - "patternProperties": { - "^/([^/]+(/[^/]+)*)?$": { - "$ref": "#/definitions/mntent" - } - }, - "required": [ "/", "swap" ], - "additionalProperties": false, - "definitions": { - "mntent": { - "title": "mntent", - "description": "An fstab entry", - "type": "object", - "properties": { - "device": { - "type": "string" - }, - "fstype": { - "type": "string" - }, - "options": { - "type": "array", - "minItems": 1, - "items": { "type": "string" } - }, - "dump": { - "type": "integer", - "minimum": 0 - }, - "fsck": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ "device", "fstype" ], - "additionalItems": false - } - } -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/split/fstab.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/split/fstab.json deleted file mode 100644 index c99ec3d3d..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/split/fstab.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "/etc/fstab", - "description": "JSON representation of /etc/fstab", - "type": "object", - "properties": { - "swap": { - "$ref": "mntent.json" - } - }, - "patternProperties": { - "^/([^/]+(/[^/]+)*)?$": { - "$ref": "mntent.json" - } - }, - "required": [ "/", "swap" ], - "additionalProperties": false -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/split/mntent.json b/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/split/mntent.json deleted file mode 100644 index 76066d052..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/doc-files/split/mntent.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "mntent", - "description": "An fstab entry", - "type": "object", - "properties": { - "device": { - "type": "string" - }, - "fstype": { - "type": "string" - }, - "options": { - "type": "array", - "minItems": 1, - "items": { "type": "string" } - }, - "dump": { - "type": "integer", - "minimum": 0 - }, - "fsck": { - "type": "integer", - "minimum": 0 - } - }, - "required": [ "device", "fstype" ], - "additionalItems": false -} \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/examples/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/examples/package-info.java deleted file mode 100644 index adf1fa876..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/examples/package-info.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * API usage examples - * - *

    This package contains examples on how to use all features of this API - * (including augmenting schemas, URI redirections etc).

    - * - *

    All examples have a {@code main()} program, so you may run them and see - * the output. Suggestions welcome.

    - */ -package com.github.fge.jsonschema.examples; diff --git a/src/main/javadoc/com/github/fge/jsonschema/exceptions/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/exceptions/package-info.java deleted file mode 100644 index b824ae488..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/exceptions/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Validation processing exceptions - */ -package com.github.fge.jsonschema.exceptions; diff --git a/src/main/javadoc/com/github/fge/jsonschema/exceptions/unchecked/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/exceptions/unchecked/package-info.java deleted file mode 100644 index 3303e7cec..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/exceptions/unchecked/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Validation processing configuration error exceptions (unchecked) - */ -package com.github.fge.jsonschema.exceptions.unchecked; diff --git a/src/main/javadoc/com/github/fge/jsonschema/format/common/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/format/common/package-info.java deleted file mode 100644 index 3288968a4..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/format/common/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Common format attribute classes for draft v3 and draft v4 - */ - -package com.github.fge.jsonschema.format.common; \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/format/draftv3/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/format/draftv3/package-info.java deleted file mode 100644 index e14192887..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/format/draftv3/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Format attributes specific to draft v3 - */ - -package com.github.fge.jsonschema.format.draftv3; \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/format/draftv4/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/format/draftv4/package-info.java deleted file mode 100644 index 96c32619d..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/format/draftv4/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Format attributes specific to draft v4 - */ - -package com.github.fge.jsonschema.format.draftv4; \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/format/helpers/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/format/helpers/package-info.java deleted file mode 100644 index 486c6894d..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/format/helpers/package-info.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Helper classes for format attributes - * - *

    The one you may want to reuse is {@link - * com.github.fge.jsonschema.format.helpers.AbstractDateFormatAttribute}, which - * can be used to validate any date format using Joda Time's {@link - * org.joda.time.format.DateTimeFormat}.

    - */ -package com.github.fge.jsonschema.format.helpers; diff --git a/src/main/javadoc/com/github/fge/jsonschema/format/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/format/package-info.java deleted file mode 100644 index b2e51fb74..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/format/package-info.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Format attribute base classes - * - *

    The {@code format} keyword plays a particular role in JSON Schema - * validation, since it is the only keyword performing semantic validation. - * Note that supporting it is optional, and that implementations are - * asked to provide a way to deactivate format checking on demand. This - * implementation offers this option.

    - * - *

    Draft v4 defines a narrower subset of format attributes than draft v3. - * The following format attributes are common to both draft v3 and draft v4:

    - * - *
      - *
    • {@code date-time};
    • - *
    • {@code email};
    • - *
    • {@code host-name};
    • - *
    • {@code ipv6};
    • - *
    • {@code regex};
    • - *
    • {@code uri}.
    • - *
    - * - *

    Draft v3 defines the following additional attributes:

    - * - *
      - *
    • {@code date};
    • - *
    • {@code phone};
    • - *
    • {@code time};
    • - *
    • {@code utc-millisec};
    • - *
    • {@code color} (unsupported);
    • - *
    • {@code style} (unsupported).
    • - *
    - * - *

    Additionally, there is an attribute named {@code ip-address} in draft v3, - * and {@code ipv4} in draft v4, which can validate IPv4 addresses.

    - */ - -package com.github.fge.jsonschema.format; \ No newline at end of file diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/common/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/common/package-info.java deleted file mode 100644 index 631249fbb..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/common/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Digesters common to both draft v3 and draft v4 - */ - -package com.github.fge.jsonschema.keyword.digest.common; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/draftv3/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/draftv3/package-info.java deleted file mode 100644 index 886e4efaa..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/draftv3/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Digesters specific to draft v3 - */ - -package com.github.fge.jsonschema.keyword.digest.draftv3; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/draftv4/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/draftv4/package-info.java deleted file mode 100644 index 146fd5ccd..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/draftv4/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Digesters specific to draft v4 - */ - -package com.github.fge.jsonschema.keyword.digest.draftv4; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/helpers/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/helpers/package-info.java deleted file mode 100644 index f4572d207..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/helpers/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Digester helper classes - */ - -package com.github.fge.jsonschema.keyword.digest.helpers; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/package-info.java deleted file mode 100644 index dc7e7de2b..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/digest/package-info.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Keyword digesters - * - *

    Digesters play two important roles:

    - * - *
      - *
    • they detect similar schemas for a given keyword, and produce the same - * output in this case;
    • - *
    • they provide to later elements in the validation chain the list of - * types validated by a keyword.
    • - *
    - * - *

    The first item has two advantages: not only is the library's memory - * footprint reduced, it also allows a great simplification of keyword - * constructors.

    - */ - -package com.github.fge.jsonschema.keyword.digest; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/package-info.java deleted file mode 100644 index 2ed1ac316..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/package-info.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Keyword syntax checkers, digesters and validators - * - *

    One schema keyword consists, apart from its name, of three elements:

    - * - *
      - *
    • a {@link com.github.fge.jsonschema.keyword.syntax.SyntaxChecker} - * which checks whether the keyword has the correct syntax in a JSON schema; - *
    • - *
    • a {@link com.github.fge.jsonschema.keyword.digest.Digester} which - * digests the schema for a specific keyword so as to use a more efficient - * form when building the validator;
    • - *
    • a {@link - * com.github.fge.jsonschema.keyword.validator.KeywordValidator} which - * validates an instance against the schema.
    • - *
    - * - *

    All these elements are run in this order. Note that keyword validators - * are always built by reflection. You can create your own custom keyword by - * providing its name and these three elements wrapped into a {@link - * com.github.fge.jsonschema.library.Keyword} to inject into a {@link - * com.github.fge.jsonschema.library.Library}, which you will then submit to a - * {@link com.github.fge.jsonschema.cfg.ValidationConfiguration}.

    - */ - -package com.github.fge.jsonschema.keyword; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/common/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/common/package-info.java deleted file mode 100644 index d76589ab2..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/common/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Keyword validators common to both draft v3 and draft v4 - */ - -package com.github.fge.jsonschema.keyword.validator.common; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/draftv3/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/draftv3/package-info.java deleted file mode 100644 index 3b60ba53c..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/draftv3/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Keyword validators specific to draft v3 - */ - -package com.github.fge.jsonschema.keyword.validator.draftv3; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/draftv4/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/draftv4/package-info.java deleted file mode 100644 index f99fd6443..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/draftv4/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Keyword validators specific to draft v4 - */ - -package com.github.fge.jsonschema.keyword.validator.draftv4; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/helpers/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/helpers/package-info.java deleted file mode 100644 index de55c0b8a..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/helpers/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Keyword validator helper classes - */ - -package com.github.fge.jsonschema.keyword.validator.helpers; diff --git a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/package-info.java deleted file mode 100644 index 66684e2fd..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/keyword/validator/package-info.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Keyword validators - * - *

    These are the actual validators of user data.

    - * - *

    Keywords are built by reflection, with a digested form of schemas - * (produced by a {@link com.github.fge.jsonschema.keyword.digest.Digester}) as - * the only constructor argument.

    - */ - -package com.github.fge.jsonschema.keyword.validator; diff --git a/src/main/javadoc/com/github/fge/jsonschema/library/digest/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/library/digest/package-info.java deleted file mode 100644 index d55b5d689..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/library/digest/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Dictionaries of builtin {@link - * com.github.fge.jsonschema.keyword.digest.Digester}s - */ -package com.github.fge.jsonschema.library.digest; diff --git a/src/main/javadoc/com/github/fge/jsonschema/library/format/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/library/format/package-info.java deleted file mode 100644 index 9b55bbc4f..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/library/format/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Dictionaries of builtin {@link - * com.github.fge.jsonschema.format.FormatAttribute}s - */ -package com.github.fge.jsonschema.library.format; diff --git a/src/main/javadoc/com/github/fge/jsonschema/library/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/library/package-info.java deleted file mode 100644 index 336b7245f..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/library/package-info.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Schema keyword libraries - * - *

    A {@link com.github.fge.jsonschema.library.Library} contains a set of - * keywords and all elements related to them (syntax validators, digesters and - * validator classes), along with format attributes.

    - * - *

    Libraries are immutable, but you can obtain a thawed copy of them in - * which you can inject new keywords and format attributes (or remove existing - * ones).

    - * - *

    The two predefined libraries are the draft v4 core schema library and the - * draft v3 core schema library.

    - */ -package com.github.fge.jsonschema.library; diff --git a/src/main/javadoc/com/github/fge/jsonschema/library/validator/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/library/validator/package-info.java deleted file mode 100644 index 34a7accb5..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/library/validator/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Dictionaries of builtin {@link - * com.github.fge.jsonschema.keyword.validator.KeywordValidator} constructors - */ -package com.github.fge.jsonschema.library.validator; diff --git a/src/main/javadoc/com/github/fge/jsonschema/main/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/main/package-info.java deleted file mode 100644 index c1c79a979..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/main/package-info.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Main interface to validation - * - *

    This package contains wrapper classes over validation processors.

    - * - *

    The main provider is {@link - * com.github.fge.jsonschema.main.JsonSchemaFactory}: from this class, you can - * obtain a {@link com.github.fge.jsonschema.processors.syntax.SyntaxValidator}, - * a {@link com.github.fge.jsonschema.main.JsonValidator} or a {@link - * com.github.fge.jsonschema.main.JsonSchema}.

    - */ -package com.github.fge.jsonschema.main; diff --git a/src/main/javadoc/com/github/fge/jsonschema/messages/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/messages/package-info.java deleted file mode 100644 index ad723d114..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/messages/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Messages used by exceptions - */ -package com.github.fge.jsonschema.messages; diff --git a/src/main/javadoc/com/github/fge/jsonschema/processors/build/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/processors/build/package-info.java deleted file mode 100644 index b68cf7b61..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/processors/build/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Keyword builder processor - * - * @see com.github.fge.jsonschema.keyword.validator.KeywordValidator - */ -package com.github.fge.jsonschema.processors.build; diff --git a/src/main/javadoc/com/github/fge/jsonschema/processors/data/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/processors/data/package-info.java deleted file mode 100644 index 4c01c9747..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/processors/data/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Inputs and outputs used by validation processors - */ -package com.github.fge.jsonschema.processors.data; diff --git a/src/main/javadoc/com/github/fge/jsonschema/processors/digest/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/processors/digest/package-info.java deleted file mode 100644 index dc3886ca1..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/processors/digest/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Schema digester - * - * @see com.github.fge.jsonschema.keyword.digest.Digester - */ -package com.github.fge.jsonschema.processors.digest; diff --git a/src/main/javadoc/com/github/fge/jsonschema/processors/format/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/processors/format/package-info.java deleted file mode 100644 index 22d2d90d3..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/processors/format/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Format attribute handler - * - * @see com.github.fge.jsonschema.format.FormatAttribute - */ -package com.github.fge.jsonschema.processors.format; diff --git a/src/main/javadoc/com/github/fge/jsonschema/processors/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/processors/package-info.java deleted file mode 100644 index c3ffed2f0..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/processors/package-info.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Core validation processors - * - *

    A full validation makes use of the following individual processors, in - * order:

    - * - *
      - *
    • {@link com.github.fge.jsonschema.processors.ref reference - * resolution};
    • - *
    • {@link com.github.fge.jsonschema.processors.syntax syntax checking}; - *
    • - *
    • {@link com.github.fge.jsonschema.processors.digest schema digesting}; - *
    • - *
    • {@link com.github.fge.jsonschema.processors.build keyword building}. - *
    • - *
    - * - *

    All these individual processors are wrapped into a {@link - * com.github.fge.jsonschema.processors.validation.ValidationProcessor}, which - * handles the validation process as a whole -- including {@code $schema} - * detection.

    - */ -package com.github.fge.jsonschema.processors; diff --git a/src/main/javadoc/com/github/fge/jsonschema/processors/ref/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/processors/ref/package-info.java deleted file mode 100644 index d8f270655..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/processors/ref/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * JSON Reference resolver - */ -package com.github.fge.jsonschema.processors.ref; diff --git a/src/main/javadoc/com/github/fge/jsonschema/processors/validation/package-info.java b/src/main/javadoc/com/github/fge/jsonschema/processors/validation/package-info.java deleted file mode 100644 index cf86e1b4d..000000000 --- a/src/main/javadoc/com/github/fge/jsonschema/processors/validation/package-info.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) - * - * This software is dual-licensed under: - * - * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any - * later version; - * - the Apache Software License (ASL) version 2.0. - * - * The text of both licenses is available under the src/resources/ directory of - * this project (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). - * - * Direct link to the sources: - * - * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt - * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt - */ - -/** - * Main validation processors and utility classes - * - *

    The main processors are:

    - * - *
      - *
    • {@link - * com.github.fge.jsonschema.processors.validation.ValidationProcessor}, - * which is the backbone behind all main classes, and the coordinator of - * all individual validation processors;
    • - *
    • {@link - * com.github.fge.jsonschema.processors.validation.ValidationChain}, which - * performs the schema-to-keyword conversion.
    • - *
    - */ -package com.github.fge.jsonschema.processors.validation; diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html deleted file mode 100644 index 045352fa1..000000000 --- a/src/main/javadoc/overview.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - -A JSON Schema validator implementation in Java which aims for correctness and -performance, in that order - -

    What this is

    - -

    Motivation

    - -

    This implementation is meant to be purely server-side if Java is your -language of choice. You may, or may not, use it in your Java Web -application; this library has no dependencies on anything Web-related.

    - -

    Extensibility

    - -

    This project uses the infrastructure provided by json-schema-core, which -means you can use all the power in this library to include the processors -provided in this package into your own custom chains.

    - -

    What is more, you can define your own schemas, with dedicated keywords and/or -format attributes.

    - -

    Strong points

    - -

    This library has complete draft v3 and draft v4 validation support.

    - -

    It also has three particular features making it stand apart:

    - -
      -
    • regular expressions obey ECMA 262 (ie, those are JavaScript regular - expressions);
    • -
    • it can validate numeric JSON data or abitrary scale/precision. -
    • -
    - -

    Sample usage

    - -

    There are code examples in package {@link -com.github.fge.jsonschema.examples} which you can use to get started.

    - -

    The validation process

    - -

    The validation process is a five step process:

    - -
      -
    • $ref resolution;
    • -
    • schema syntax validation;
    • -
    • schema digesting;
    • -
    • keyword building;
    • -
    • instance validation (ie, validate your data).
    • -
    - -

    $ref resolution

    - -

    This is a critically important part of the validation process. You may -encounter, during validation, what is called a JSON -Reference. A JSON Reference is a JSON Object with one member named -$ref, and the value of this member -is a text value which embodies a URI. Implementations are required to follow -JSON References until an actual final content is reached (and this content may, -or may not, be a valid JSON Schema).

    - -

    Also, consider this schema:

    - -
    -    {
    -        "$ref": "some://where/else",
    -        "minimum": 3
    -    }
    -
    - -

    This is still a JSON Reference. Other schema keywords, such as -minimum in this example, should be -ignored. And this is what this implementation does.

    - -

    Note that any failure in $ref validation is considered a fatal error.

    - -

    The processor in charge of this step is {@link -com.github.fge.jsonschema.core.load.RefResolver}. It is located in package -json-schema-core.

    - -

    Schema syntax checking

    - -

    This is an equally important part of the validation process. One thing to -note about the previous step is that it will only check that JSON Reference -resolution ultimately leads to a JSON document, whatever that document is. Which -means it may not even be a JSON Object, therefore not a JSON Schema. This basic -check is done at that level.

    - -

    After schema syntax checking is done, you are ensured that the schema is well -formed: this simplifies later processing. Note however that syntax checking will -not follow JSON References.

    - -

    The processor in charge of this step is {@link -com.github.fge.jsonschema.core.keyword.syntax.SyntaxProcessor}. It is located in -the json-schema-core package.

    - -

    Digesting

    - -

    This step of the processing chain takes into account both the schema and the -instance to validate. Its role is to check the instance type, pick the relevant -keywords for that instance type into the current schema, and build digested -forms of these keywords for the next step.

    - -

    For instance, consider that you are validating a number instance, and the -current schema reads:

    - -
    -    {
    -        "minItems": 3,
    -        "maximum": 3
    -    }
    -
    - -

    {@code minItems} does not apply to numbers, it will therefore be filtered out -here. But this is not all. Now consider those two schemas:

    - -
    -    {
    -        "additionalItems": true
    -    }
    -
    - -
    -    {
    -        "additionalItems": { "type": "string" }
    -    }
    -
    - -

    They have exactly the same influence on the validation of the array itself -(note: the array, not its elements). The digest for these two schemas -when the instance to validate is an array will therefore be the same. This -allows to prune a lot of duplicates out of keyword caching.

    - -

    The processor in charge of this step is {@link -com.github.fge.jsonschema.processors.digest.SchemaDigester}.

    - -

    Keyword building

    - -

    At this step, the digested form of the current schema is grabbed and all -relevant keywords are built (if they are not found in the cache). The real -validation can now take place.

    - -

    Again, all results are cached for future reuse. And as all keywords are -context-free, a same result can be reused across different schemas.

    - -

    The processor in charge of this step is {@link -com.github.fge.jsonschema.processors.build.ValidatorBuilder}.

    - -

    Instance (aka data) validation

    - -

    This is the part which actually matters to end users: ensure that their data -is valid.

    - -

    This step of the processing consists of two distinct elements:

    - -
      -
    • running the keyword validators built at the previous step;
    • -
    • (recursively) validating children of arrays and/or objects.
    • -
    - -

    As some keywords require that this very same processor be called again, all -keyword validators keep a reference to it: this is what also allows keywords -such as {@code anyOf}, {@code allOf} and others to work correctly. In a similar -manner, this processor also needs a reference to the start of the chain (the -reference resolver processor).

    - -

    The processor in charge of this step is {@link -com.github.fge.jsonschema.processors.validation.ValidationProcessor}.

    - - - From 17cc0ea61b97be32901cc0fd842f990075754ce9 Mon Sep 17 00:00:00 2001 From: capstan Date: Thu, 5 Sep 2019 14:06:43 +0200 Subject: [PATCH 45/71] Restore javadoc overview page. Partial revert of commit ed7901ed5. --- src/main/javadoc/overview.html | 193 +++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 src/main/javadoc/overview.html diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html new file mode 100644 index 000000000..045352fa1 --- /dev/null +++ b/src/main/javadoc/overview.html @@ -0,0 +1,193 @@ + + + + +A JSON Schema validator implementation in Java which aims for correctness and +performance, in that order + +

    What this is

    + +

    Motivation

    + +

    This implementation is meant to be purely server-side if Java is your +language of choice. You may, or may not, use it in your Java Web +application; this library has no dependencies on anything Web-related.

    + +

    Extensibility

    + +

    This project uses the infrastructure provided by json-schema-core, which +means you can use all the power in this library to include the processors +provided in this package into your own custom chains.

    + +

    What is more, you can define your own schemas, with dedicated keywords and/or +format attributes.

    + +

    Strong points

    + +

    This library has complete draft v3 and draft v4 validation support.

    + +

    It also has three particular features making it stand apart:

    + +
      +
    • regular expressions obey ECMA 262 (ie, those are JavaScript regular + expressions);
    • +
    • it can validate numeric JSON data or abitrary scale/precision. +
    • +
    + +

    Sample usage

    + +

    There are code examples in package {@link +com.github.fge.jsonschema.examples} which you can use to get started.

    + +

    The validation process

    + +

    The validation process is a five step process:

    + +
      +
    • $ref resolution;
    • +
    • schema syntax validation;
    • +
    • schema digesting;
    • +
    • keyword building;
    • +
    • instance validation (ie, validate your data).
    • +
    + +

    $ref resolution

    + +

    This is a critically important part of the validation process. You may +encounter, during validation, what is called a JSON +Reference. A JSON Reference is a JSON Object with one member named +$ref, and the value of this member +is a text value which embodies a URI. Implementations are required to follow +JSON References until an actual final content is reached (and this content may, +or may not, be a valid JSON Schema).

    + +

    Also, consider this schema:

    + +
    +    {
    +        "$ref": "some://where/else",
    +        "minimum": 3
    +    }
    +
    + +

    This is still a JSON Reference. Other schema keywords, such as +minimum in this example, should be +ignored. And this is what this implementation does.

    + +

    Note that any failure in $ref validation is considered a fatal error.

    + +

    The processor in charge of this step is {@link +com.github.fge.jsonschema.core.load.RefResolver}. It is located in package +json-schema-core.

    + +

    Schema syntax checking

    + +

    This is an equally important part of the validation process. One thing to +note about the previous step is that it will only check that JSON Reference +resolution ultimately leads to a JSON document, whatever that document is. Which +means it may not even be a JSON Object, therefore not a JSON Schema. This basic +check is done at that level.

    + +

    After schema syntax checking is done, you are ensured that the schema is well +formed: this simplifies later processing. Note however that syntax checking will +not follow JSON References.

    + +

    The processor in charge of this step is {@link +com.github.fge.jsonschema.core.keyword.syntax.SyntaxProcessor}. It is located in +the json-schema-core package.

    + +

    Digesting

    + +

    This step of the processing chain takes into account both the schema and the +instance to validate. Its role is to check the instance type, pick the relevant +keywords for that instance type into the current schema, and build digested +forms of these keywords for the next step.

    + +

    For instance, consider that you are validating a number instance, and the +current schema reads:

    + +
    +    {
    +        "minItems": 3,
    +        "maximum": 3
    +    }
    +
    + +

    {@code minItems} does not apply to numbers, it will therefore be filtered out +here. But this is not all. Now consider those two schemas:

    + +
    +    {
    +        "additionalItems": true
    +    }
    +
    + +
    +    {
    +        "additionalItems": { "type": "string" }
    +    }
    +
    + +

    They have exactly the same influence on the validation of the array itself +(note: the array, not its elements). The digest for these two schemas +when the instance to validate is an array will therefore be the same. This +allows to prune a lot of duplicates out of keyword caching.

    + +

    The processor in charge of this step is {@link +com.github.fge.jsonschema.processors.digest.SchemaDigester}.

    + +

    Keyword building

    + +

    At this step, the digested form of the current schema is grabbed and all +relevant keywords are built (if they are not found in the cache). The real +validation can now take place.

    + +

    Again, all results are cached for future reuse. And as all keywords are +context-free, a same result can be reused across different schemas.

    + +

    The processor in charge of this step is {@link +com.github.fge.jsonschema.processors.build.ValidatorBuilder}.

    + +

    Instance (aka data) validation

    + +

    This is the part which actually matters to end users: ensure that their data +is valid.

    + +

    This step of the processing consists of two distinct elements:

    + +
      +
    • running the keyword validators built at the previous step;
    • +
    • (recursively) validating children of arrays and/or objects.
    • +
    + +

    As some keywords require that this very same processor be called again, all +keyword validators keep a reference to it: this is what also allows keywords +such as {@code anyOf}, {@code allOf} and others to work correctly. In a similar +manner, this processor also needs a reference to the start of the chain (the +reference resolver processor).

    + +

    The processor in charge of this step is {@link +com.github.fge.jsonschema.processors.validation.ValidationProcessor}.

    + + + From 7859b63363cfb706afa663d64e86c037dc74a3f8 Mon Sep 17 00:00:00 2001 From: capstan Date: Thu, 5 Sep 2019 17:06:52 +0200 Subject: [PATCH 46/71] Fix Javadoc generation warnings. --- .../fge/jsonschema/format/AbstractFormatAttribute.java | 1 + .../jsonschema/format/common/RFC3339DateTimeAttribute.java | 5 +++-- .../keyword/validator/helpers/NumericValidator.java | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/fge/jsonschema/format/AbstractFormatAttribute.java b/src/main/java/com/github/fge/jsonschema/format/AbstractFormatAttribute.java index 69b9d5c58..5b44e7bb5 100644 --- a/src/main/java/com/github/fge/jsonschema/format/AbstractFormatAttribute.java +++ b/src/main/java/com/github/fge/jsonschema/format/AbstractFormatAttribute.java @@ -72,6 +72,7 @@ public final EnumSet supportedTypes() * Return a new message for this format attribute * * @param data the validation context + * @param bundle the format bundle * @param key key in the format bundle message * @return a new message */ diff --git a/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java index b8a0fbe4c..80a42ae75 100644 --- a/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java +++ b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java @@ -18,8 +18,7 @@ import com.google.common.collect.ImmutableList; /** - * A {@link DateTimeFormatter} for date and time format defined in RFC3339. - * @see RFC 3339 - Section 5.6 + * A {@link DateTimeFormatter} for date and time format defined in RFC3339. * * This is backwards incompat with the original DateTimeAttribute. It will become the default in the future * to use it currently you need to: @@ -27,6 +26,8 @@ * .addFormatAttribute("date-time", RFC3339DateTimeAttribute.getInstance()) * .freeze(); * Then follow the rest of the steps in example 8 to hook it into your flow. + * + * @see RFC 3339 - Section 5.6 */ public class RFC3339DateTimeAttribute extends AbstractFormatAttribute { diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/helpers/NumericValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/helpers/NumericValidator.java index e6a9ac001..3a8669040 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/helpers/NumericValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/helpers/NumericValidator.java @@ -77,7 +77,8 @@ public final void validate(final Processor processor, * @param report the validation report * @param bundle the message bundle to use * @param data the validation data - */ + * @throws ProcessingException a processing error occurred during validation + */ protected abstract void validateLong(final ProcessingReport report, final MessageBundle bundle, final FullData data) throws ProcessingException; @@ -89,6 +90,7 @@ protected abstract void validateLong(final ProcessingReport report, * @param report the validation report * @param bundle the message bundle to use * @param data the validation data + * @throws ProcessingException a processing error occurred during validation */ protected abstract void validateDecimal(final ProcessingReport report, final MessageBundle bundle, final FullData data) From 4e2df07fb172f81ff34b9d77f10c1c98e23bbb07 Mon Sep 17 00:00:00 2001 From: capstan Date: Thu, 5 Sep 2019 22:47:38 +0200 Subject: [PATCH 47/71] Update Gradle to 5.6.2 --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e8d638399..b3a475cb4 100644 --- a/build.gradle +++ b/build.gradle @@ -142,7 +142,7 @@ artifacts { } wrapper { - gradleVersion = "5.6.1"; + gradleVersion = "5.6.2"; distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"; } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7f76b8798..c63446067 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-5.6.1-all.zip +distributionUrl=http\://services.gradle.org/distributions/gradle-5.6.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 5a44e4333eadeae6b714e1ad5146745c89ce7748 Mon Sep 17 00:00:00 2001 From: capstan Date: Fri, 25 Oct 2019 09:08:25 +0200 Subject: [PATCH 48/71] Add ErrorProne checks and lint. --- build.gradle | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/build.gradle b/build.gradle index b3a475cb4..75ebcd806 100644 --- a/build.gradle +++ b/build.gradle @@ -17,12 +17,17 @@ * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt */ +plugins { + id("net.ltgt.errorprone") version "0.8.1" apply false +} + apply(plugin: "java"); apply(plugin: "maven"); apply(plugin: "signing"); apply(plugin: "osgi"); apply(plugin: "idea"); apply(plugin: "eclipse"); +apply(plugin: "net.ltgt.errorprone"); group = "com.github.java-json-tools"; version = "2.2.12-SNAPSHOT"; @@ -36,6 +41,14 @@ repositories { mavenCentral(); } +/* + * Add errorprone checking. + */ +dependencies { + errorprone("com.google.errorprone:error_prone_core:2.3.3") + errorproneJavac("com.google.errorprone:javac:9+181-r4173-1") +} + /* * List of dependencies */ @@ -87,6 +100,17 @@ task sourcesJar(type: Jar, dependsOn: classes) { from sourceSets.main.allSource; } +/* + * Lint all the things! + */ +allprojects { + gradle.projectsEvaluated { + tasks.withType(JavaCompile) { + options.compilerArgs << "-Xlint:all" + } + } +} + /* * Javadoc: we need to tell where the overview.html is, it will not pick it up * automatically... From 0d70bd8633ae8eb833d286c17b979b9524f41f35 Mon Sep 17 00:00:00 2001 From: capstan Date: Fri, 25 Oct 2019 09:15:25 +0200 Subject: [PATCH 49/71] Travis Gradle improvements * Compile for both OpenJDK8 and 11 * Inhibit the install phase, so the compile warnings are visible in final travis output. * Override the gradle command to get both assemble and check. * Cache the gradle caches and wrapper so builds are less expensive. --- .travis.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f5c99a7f6..87d176072 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1 +1,17 @@ -language: java \ No newline at end of file +language: java +jdk: + - openjdk8 + - openjdk11 +install: {} +script: + - ./gradlew assemble check + +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ + +cache: + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ + From f5bfbbac87464ae764d11bad20a135edfe517828 Mon Sep 17 00:00:00 2001 From: capstan Date: Tue, 29 Oct 2019 14:30:22 +0100 Subject: [PATCH 50/71] Bump to Java 7. See java-json-tools/jackson-coreutils/issues/12. --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 75ebcd806..c2182e558 100644 --- a/build.gradle +++ b/build.gradle @@ -31,8 +31,8 @@ apply(plugin: "net.ltgt.errorprone"); group = "com.github.java-json-tools"; version = "2.2.12-SNAPSHOT"; -sourceCompatibility = "1.6"; -targetCompatibility = "1.6"; // defaults to sourceCompatibility +sourceCompatibility = JavaVersion.VERSION_1_7; +targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility /* * Repositories to use @@ -68,7 +68,7 @@ dependencies { testCompile(group: "org.easytesting", name: "fest-assert", version: "1.4"); } -javadoc.options.links("http://docs.oracle.com/javase/6/docs/api/"); +javadoc.options.links("http://docs.oracle.com/javase/7/docs/api/"); javadoc.options.links("http://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); javadoc.options.links("http://fasterxml.github.com/jackson-databind/javadoc/2.2.0/"); javadoc.options.links("http://fasterxml.github.com/jackson-core/javadoc/2.2.0/"); From 49ecb1a23c42c63c03e7c8b62c7fb42a98796dcf Mon Sep 17 00:00:00 2001 From: capstan Date: Tue, 29 Oct 2019 15:24:13 +0100 Subject: [PATCH 51/71] Use https, fix Guava reference version, and fix project refs. --- build.gradle | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index c2182e558..d49cdcafd 100644 --- a/build.gradle +++ b/build.gradle @@ -68,17 +68,17 @@ dependencies { testCompile(group: "org.easytesting", name: "fest-assert", version: "1.4"); } +// FIXME: For some reason, making this https causes OpenJDK 11 to fail. javadoc.options.links("http://docs.oracle.com/javase/7/docs/api/"); -javadoc.options.links("http://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); -javadoc.options.links("http://fasterxml.github.com/jackson-databind/javadoc/2.2.0/"); -javadoc.options.links("http://fasterxml.github.com/jackson-core/javadoc/2.2.0/"); -javadoc.options.links("http://www.javadoc.io/doc/com.google.guava/guava/16.0.1/"); -javadoc.options.links("http://fge.github.io/btf/"); -javadoc.options.links("http://fge.github.io/msg-simple/"); -javadoc.options.links("http://fge.github.io/jackson-coreutils/"); -javadoc.options.links("http://fge.github.io/uri-template/"); -javadoc.options.links("http://java-json-tools.github.io/json-schema-core/1.2.x/"); - +javadoc.options.links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); +javadoc.options.links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/"); +javadoc.options.links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/"); +javadoc.options.links("https://www.javadoc.io/doc/com.google.guava/guava/25.1-jre/"); +javadoc.options.links("https://java-json-tools.github.io/btf/"); +javadoc.options.links("https://java-json-tools.github.io/msg-simple/"); +javadoc.options.links("https://java-json-tools.github.io/jackson-coreutils/"); +javadoc.options.links("https://java-json-tools.github.io/uri-template/"); +javadoc.options.links("https://java-json-tools.github.io/json-schema-core/1.2.x/"); /* * Necessary! Otherwise TestNG will not be used... From 9a98166969dee1b8d9651eb98ec940ee43152848 Mon Sep 17 00:00:00 2001 From: capstan Date: Tue, 29 Oct 2019 16:04:20 +0100 Subject: [PATCH 52/71] Fix ErrorProne and deprecated warnings. Couldn't figure out the reference equality issues in CallbackValidatorTest, so I suppressed it. --- .../fge/jsonschema/exceptions/InvalidInstanceException.java | 2 ++ .../fge/jsonschema/format/common/DateTimeAttribute.java | 4 +--- .../jsonschema/format/common/RFC3339DateTimeAttribute.java | 4 +--- .../github/fge/jsonschema/format/common/RegexAttribute.java | 6 +++--- .../keyword/digest/draftv3/DraftV3DependenciesDigester.java | 3 +++ .../validator/common/AdditionalPropertiesValidator.java | 4 ++-- .../keyword/validator/common/PatternValidator.java | 6 +++--- .../github/fge/jsonschema/main/cli/CustomHelpFormatter.java | 4 ++-- .../processors/validation/ObjectSchemaSelector.java | 4 ++-- .../jsonschema/processors/validation/ValidationStack.java | 6 ------ .../keyword/validator/callback/CallbackValidatorTest.java | 3 ++- 11 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/github/fge/jsonschema/exceptions/InvalidInstanceException.java b/src/main/java/com/github/fge/jsonschema/exceptions/InvalidInstanceException.java index f50d10a70..ef609b49b 100644 --- a/src/main/java/com/github/fge/jsonschema/exceptions/InvalidInstanceException.java +++ b/src/main/java/com/github/fge/jsonschema/exceptions/InvalidInstanceException.java @@ -28,6 +28,8 @@ public final class InvalidInstanceException extends ProcessingException { + private static final long serialVersionUID = -3273787152985150466L; + public InvalidInstanceException(final ProcessingMessage message) { super(message); diff --git a/src/main/java/com/github/fge/jsonschema/format/common/DateTimeAttribute.java b/src/main/java/com/github/fge/jsonschema/format/common/DateTimeAttribute.java index 20a4a9821..8aae60ad2 100644 --- a/src/main/java/com/github/fge/jsonschema/format/common/DateTimeAttribute.java +++ b/src/main/java/com/github/fge/jsonschema/format/common/DateTimeAttribute.java @@ -31,8 +31,6 @@ import org.joda.time.format.DateTimeFormatterBuilder; import org.joda.time.format.DateTimeParser; -import java.util.List; - import static org.joda.time.DateTimeFieldType.*; /** @@ -41,7 +39,7 @@ public final class DateTimeAttribute extends AbstractFormatAttribute { - private static final List FORMATS = ImmutableList.of( + private static final ImmutableList FORMATS = ImmutableList.of( "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}Z" ); private static final DateTimeFormatter FORMATTER; diff --git a/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java index 80a42ae75..73c1e12af 100644 --- a/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java +++ b/src/main/java/com/github/fge/jsonschema/format/common/RFC3339DateTimeAttribute.java @@ -1,7 +1,5 @@ package com.github.fge.jsonschema.format.common; -import java.util.List; - import com.github.fge.jsonschema.cfg.ValidationConfiguration; import com.github.fge.jsonschema.library.DraftV4Library; import org.joda.time.format.DateTimeFormatter; @@ -31,7 +29,7 @@ */ public class RFC3339DateTimeAttribute extends AbstractFormatAttribute { - private static final List RFC3339_FORMATS = ImmutableList.of( + private static final ImmutableList RFC3339_FORMATS = ImmutableList.of( "yyyy-MM-dd'T'HH:mm:ss((+|-)HH:mm|Z)", "yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}((+|-)HH:mm|Z)" ); diff --git a/src/main/java/com/github/fge/jsonschema/format/common/RegexAttribute.java b/src/main/java/com/github/fge/jsonschema/format/common/RegexAttribute.java index 9db53adee..f20127c19 100644 --- a/src/main/java/com/github/fge/jsonschema/format/common/RegexAttribute.java +++ b/src/main/java/com/github/fge/jsonschema/format/common/RegexAttribute.java @@ -22,7 +22,7 @@ import com.github.fge.jackson.NodeType; import com.github.fge.jsonschema.core.exceptions.ProcessingException; import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.core.util.RhinoHelper; +import com.github.fge.jsonschema.core.util.RegexECMA262Helper; import com.github.fge.jsonschema.format.AbstractFormatAttribute; import com.github.fge.jsonschema.format.FormatAttribute; import com.github.fge.jsonschema.processors.data.FullData; @@ -34,7 +34,7 @@ *

    Again, here, we do not use {@link java.util.regex} because it does * not fit the bill.

    * - * @see RhinoHelper + * @see RegexECMA262Helper */ public final class RegexAttribute extends AbstractFormatAttribute @@ -58,7 +58,7 @@ public void validate(final ProcessingReport report, { final String value = data.getInstance().getNode().textValue(); - if (!RhinoHelper.regexIsValid(value)) + if (!RegexECMA262Helper.regexIsValid(value)) report.error(newMsg(data, bundle, "err.format.invalidRegex") .putArgument("value", value)); } diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3DependenciesDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3DependenciesDigester.java index 386bb07bb..683dc962d 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3DependenciesDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3DependenciesDigester.java @@ -91,6 +91,9 @@ public JsonNode digest(final JsonNode schema) case STRING: propertyDeps.put(key, FACTORY.arrayNode() .add(value.textValue())); + break; + default: + break; } } diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/common/AdditionalPropertiesValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/common/AdditionalPropertiesValidator.java index b466ba678..1741dad02 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/common/AdditionalPropertiesValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/common/AdditionalPropertiesValidator.java @@ -25,7 +25,7 @@ import com.github.fge.jsonschema.core.exceptions.ProcessingException; import com.github.fge.jsonschema.core.processing.Processor; import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.core.util.RhinoHelper; +import com.github.fge.jsonschema.core.util.RegexECMA262Helper; import com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator; import com.github.fge.jsonschema.processors.data.FullData; import com.github.fge.msgsimple.bundle.MessageBundle; @@ -84,7 +84,7 @@ public void validate(final Processor processor, for (final String field: fields) for (final String regex: patternProperties) - if (RhinoHelper.regMatch(regex, field)) + if (RegexECMA262Helper.regMatch(regex, field)) tmp.add(field); fields.removeAll(tmp); diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/common/PatternValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/common/PatternValidator.java index 653428a27..5bce7ea79 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/common/PatternValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/common/PatternValidator.java @@ -23,7 +23,7 @@ import com.github.fge.jsonschema.core.exceptions.ProcessingException; import com.github.fge.jsonschema.core.processing.Processor; import com.github.fge.jsonschema.core.report.ProcessingReport; -import com.github.fge.jsonschema.core.util.RhinoHelper; +import com.github.fge.jsonschema.core.util.RegexECMA262Helper; import com.github.fge.jsonschema.keyword.validator.AbstractKeywordValidator; import com.github.fge.jsonschema.processors.data.FullData; import com.github.fge.msgsimple.bundle.MessageBundle; @@ -31,7 +31,7 @@ /** * Keyword validator for {@code pattern} * - * @see RhinoHelper + * @see RegexECMA262Helper */ public final class PatternValidator extends AbstractKeywordValidator @@ -50,7 +50,7 @@ public void validate(final Processor processor, final String regex = data.getSchema().getNode().get(keyword) .textValue(); final String value = data.getInstance().getNode().textValue(); - if (!RhinoHelper.regMatch(regex, value)) + if (!RegexECMA262Helper.regMatch(regex, value)) report.error(newMsg(data, bundle, "err.common.pattern.noMatch") .putArgument("regex", regex).putArgument("string", value)); } diff --git a/src/main/java/com/github/fge/jsonschema/main/cli/CustomHelpFormatter.java b/src/main/java/com/github/fge/jsonschema/main/cli/CustomHelpFormatter.java index 95c6eaa4a..752fd7bb3 100644 --- a/src/main/java/com/github/fge/jsonschema/main/cli/CustomHelpFormatter.java +++ b/src/main/java/com/github/fge/jsonschema/main/cli/CustomHelpFormatter.java @@ -34,7 +34,7 @@ final class CustomHelpFormatter implements HelpFormatter { - private static final List HELP_PREAMBLE = ImmutableList.of( + private static final ImmutableList HELP_PREAMBLE = ImmutableList.of( "Syntax:", " java -jar jsonschema.jar [options] schema file [file...]", " java -jar jsonschema.jar --syntax [options] schema [schema...]", @@ -42,7 +42,7 @@ final class CustomHelpFormatter "Options: " ); - private static final List HELP_POST + private static final ImmutableList HELP_POST = ImmutableList.builder() .add("") .add("Exit codes:") diff --git a/src/main/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaSelector.java b/src/main/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaSelector.java index 91e63a10a..9ddc1f3bb 100644 --- a/src/main/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaSelector.java +++ b/src/main/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaSelector.java @@ -21,7 +21,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jackson.jsonpointer.JsonPointer; -import com.github.fge.jsonschema.core.util.RhinoHelper; +import com.github.fge.jsonschema.core.util.RegexECMA262Helper; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; @@ -73,7 +73,7 @@ public Iterable selectSchemas(final String memberName) list.add(PROPERTIES.append(memberName)); for (final String regex: patternProperties) - if (RhinoHelper.regMatch(regex, memberName)) + if (RegexECMA262Helper.regMatch(regex, memberName)) list.add(PATTERNPROPERTIES.append(regex)); if (!list.isEmpty()) diff --git a/src/main/java/com/github/fge/jsonschema/processors/validation/ValidationStack.java b/src/main/java/com/github/fge/jsonschema/processors/validation/ValidationStack.java index 0759cb87f..ea31f1730 100644 --- a/src/main/java/com/github/fge/jsonschema/processors/validation/ValidationStack.java +++ b/src/main/java/com/github/fge/jsonschema/processors/validation/ValidationStack.java @@ -58,12 +58,6 @@ @ParametersAreNonnullByDefault final class ValidationStack { - /* - * Sentinel which is always the first element of the stack; we use it in - * order to simplify the pop code. - */ - private static final Element NULL_ELEMENT = new Element(null, null); - /* * Queue of visited contexts */ diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/CallbackValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/CallbackValidatorTest.java index d5d936e94..92ada83b5 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/CallbackValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/CallbackValidatorTest.java @@ -21,7 +21,7 @@ import static com.github.fge.jsonschema.TestUtils.anyReport; import static com.github.fge.jsonschema.TestUtils.onlyOnce; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; @@ -247,6 +247,7 @@ private DummyProcessor(final WantedState wanted1, } @Override + @SuppressWarnings("ReferenceEquality") public FullData process(final ProcessingReport report, final FullData input) throws ProcessingException From 0b3c05636cafd98acb61b0cea8c0767a6b0a1ca1 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Wed, 30 Oct 2019 15:46:24 +0100 Subject: [PATCH 53/71] Side-grade Guava to the android variant. See java-json-tools/jackson-coreutils/issues/12. Also added missing compile dependency that was luckily fulfilled by dependencies. --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index d49cdcafd..96ba0416e 100644 --- a/build.gradle +++ b/build.gradle @@ -53,6 +53,7 @@ dependencies { * List of dependencies */ dependencies { + compile(group: "com.google.guava", name: "guava", version: "25.1-android"); compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.10"); compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); @@ -73,7 +74,7 @@ javadoc.options.links("http://docs.oracle.com/javase/7/docs/api/"); javadoc.options.links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); javadoc.options.links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/"); javadoc.options.links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/"); -javadoc.options.links("https://www.javadoc.io/doc/com.google.guava/guava/25.1-jre/"); +javadoc.options.links("https://www.javadoc.io/doc/com.google.guava/guava/25.1-android/"); javadoc.options.links("https://java-json-tools.github.io/btf/"); javadoc.options.links("https://java-json-tools.github.io/msg-simple/"); javadoc.options.links("https://java-json-tools.github.io/jackson-coreutils/"); From 0a6bb3bc7fe6c9ab2e8a7ef8f5588d77573e085c Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Wed, 30 Oct 2019 16:08:21 +0100 Subject: [PATCH 54/71] Use https for JDK javadoc links. Conditionally adds a `--release=7` flag to tell javadoc the source compatibility. This inhibits javadoc in later JDKs erroring out expecting modules when there are none. See java-json-tools/btf/issues/7. --- build.gradle | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 96ba0416e..8fbe002a2 100644 --- a/build.gradle +++ b/build.gradle @@ -69,17 +69,25 @@ dependencies { testCompile(group: "org.easytesting", name: "fest-assert", version: "1.4"); } -// FIXME: For some reason, making this https causes OpenJDK 11 to fail. -javadoc.options.links("http://docs.oracle.com/javase/7/docs/api/"); -javadoc.options.links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); -javadoc.options.links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/"); -javadoc.options.links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/"); -javadoc.options.links("https://www.javadoc.io/doc/com.google.guava/guava/25.1-android/"); -javadoc.options.links("https://java-json-tools.github.io/btf/"); -javadoc.options.links("https://java-json-tools.github.io/msg-simple/"); -javadoc.options.links("https://java-json-tools.github.io/jackson-coreutils/"); -javadoc.options.links("https://java-json-tools.github.io/uri-template/"); -javadoc.options.links("https://java-json-tools.github.io/json-schema-core/1.2.x/"); +javadoc { + options { + def currentJavaVersion = org.gradle.api.JavaVersion.current() + // FIXME: https://github.com/gradle/gradle/issues/11182 + if (currentJavaVersion.compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) { + addStringOption("-release", "7"); + } + links("https://docs.oracle.com/javase/7/docs/api/"); + links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); + links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/"); + links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/"); + links("https://www.javadoc.io/doc/com.google.guava/guava/25.1-android/"); + links("https://java-json-tools.github.io/btf/"); + links("https://java-json-tools.github.io/msg-simple/"); + links("https://java-json-tools.github.io/jackson-coreutils/"); + links("https://java-json-tools.github.io/uri-template/"); + links("https://java-json-tools.github.io/json-schema-core/1.2.x/"); + } +} /* * Necessary! Otherwise TestNG will not be used... From c42fad68c2719bec20cae1e1dfb04f4c0436adf6 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Wed, 30 Oct 2019 16:59:48 +0100 Subject: [PATCH 55/71] Update to Gradle 5.6.3. --- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 8fbe002a2..633ac5255 100644 --- a/build.gradle +++ b/build.gradle @@ -175,8 +175,8 @@ artifacts { } wrapper { - gradleVersion = "5.6.2"; - distributionUrl = "http://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"; + gradleVersion = "5.6.3"; + distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"; } task pom { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c63446067..3a54a3332 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 584287140f363e2c494c29eec769a9c29e050d6d Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Thu, 31 Oct 2019 12:51:57 +0100 Subject: [PATCH 56/71] Update dep on json-schema-core to the snapshot release. --- build.gradle | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 633ac5255..db869c577 100644 --- a/build.gradle +++ b/build.gradle @@ -34,11 +34,18 @@ version = "2.2.12-SNAPSHOT"; sourceCompatibility = JavaVersion.VERSION_1_7; targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility +ext.forRelease = !version.endsWith("-SNAPSHOT"); + /* * Repositories to use */ repositories { mavenCentral(); + if (!forRelease) { + maven { + url "https://oss.sonatype.org/content/repositories/snapshots" + } + } } /* @@ -54,7 +61,7 @@ dependencies { */ dependencies { compile(group: "com.google.guava", name: "guava", version: "25.1-android"); - compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.10"); + compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.12-SNAPSHOT"); compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.0.0"); @@ -280,7 +287,6 @@ uploadArchives { } } -ext.forRelease = !version.endsWith("-SNAPSHOT"); signing { required { forRelease && gradle.taskGraph.hasTask("uploadArchives") }; sign configurations.archives; From 5a00fb214725bd98cecbd7730e350dbdae0bc2f8 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Thu, 31 Oct 2019 14:23:50 +0100 Subject: [PATCH 57/71] Bump Guava to 28.1-android. --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index db869c577..bf6de69c6 100644 --- a/build.gradle +++ b/build.gradle @@ -60,7 +60,7 @@ dependencies { * List of dependencies */ dependencies { - compile(group: "com.google.guava", name: "guava", version: "25.1-android"); + compile(group: "com.google.guava", name: "guava", version: "28.1-android"); compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.12-SNAPSHOT"); compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); @@ -87,7 +87,7 @@ javadoc { links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/"); links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/"); - links("https://www.javadoc.io/doc/com.google.guava/guava/25.1-android/"); + links("https://www.javadoc.io/doc/com.google.guava/guava/28.1-android/"); links("https://java-json-tools.github.io/btf/"); links("https://java-json-tools.github.io/msg-simple/"); links("https://java-json-tools.github.io/jackson-coreutils/"); From 8f1c5f41409e5c81e54ebe9b04f7de5e141f4ea4 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Thu, 31 Oct 2019 14:41:36 +0100 Subject: [PATCH 58/71] Replace deprecated JsonNode.put with .set. --- .../common/AdditionalPropertiesDigester.java | 4 ++-- .../draftv3/DraftV3DependenciesDigester.java | 8 ++++---- .../digest/draftv3/DraftV3PropertiesDigester.java | 2 +- .../draftv4/DraftV4DependenciesDigester.java | 6 +++--- .../digest/draftv4/DraftV4TypeDigester.java | 2 +- .../keyword/digest/draftv4/RequiredDigester.java | 2 +- .../digest/helpers/DraftV3TypeKeywordDigester.java | 4 ++-- .../keyword/digest/helpers/NumericDigester.java | 4 ++-- .../keyword/digest/helpers/SimpleDigester.java | 2 +- .../draftv3/DisallowKeywordValidator.java | 2 +- .../validator/draftv3/DraftV3TypeValidator.java | 2 +- .../keyword/validator/draftv4/AllOfValidator.java | 2 +- .../keyword/validator/draftv4/AnyOfValidator.java | 2 +- .../keyword/validator/draftv4/OneOfValidator.java | 2 +- .../validation/ObjectSchemaDigester.java | 4 ++-- .../keyword/special/ExtendsKeywordTest.java | 2 +- .../jsonschema/keyword/special/NotKeywordTest.java | 2 +- .../callback/draftv3/DisallowValidatorTest.java | 14 +++++++------- .../callback/draftv3/DraftV3TypeValidatorTest.java | 10 +++++----- .../callback/draftv3/ExtendsValidatorTest.java | 2 +- .../callback/draftv4/AllOfValidatorTest.java | 10 +++++----- .../callback/draftv4/AnyOfValidatorTest.java | 6 +++--- .../draftv4/DependenciesValidatorTest.java | 10 +++++----- .../callback/draftv4/OneOfValidatorTest.java | 10 +++++----- .../validation/ValidationProcessorTest.java | 2 +- 25 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/common/AdditionalPropertiesDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/common/AdditionalPropertiesDigester.java index 5f9a949fb..3a485700e 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/common/AdditionalPropertiesDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/common/AdditionalPropertiesDigester.java @@ -64,8 +64,8 @@ public JsonNode digest(final JsonNode schema) * not be the case if and only if it has boolean value false. */ ret.put(keyword, true); - ret.put("properties", properties); - ret.put("patternProperties", patternProperties); + ret.set("properties", properties); + ret.set("patternProperties", patternProperties); if (schema.get(keyword).asBoolean(true)) return ret; diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3DependenciesDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3DependenciesDigester.java index 683dc962d..d081b6f41 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3DependenciesDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3DependenciesDigester.java @@ -61,10 +61,10 @@ public JsonNode digest(final JsonNode schema) final ObjectNode ret = FACTORY.objectNode(); final ObjectNode propertyDeps = FACTORY.objectNode(); - ret.put("propertyDeps", propertyDeps); + ret.set("propertyDeps", propertyDeps); final ArrayNode schemaDeps = FACTORY.arrayNode(); - ret.put("schemaDeps", schemaDeps); + ret.set("schemaDeps", schemaDeps); final List list = Lists.newArrayList(); @@ -86,10 +86,10 @@ public JsonNode digest(final JsonNode schema) case ARRAY: final JsonNode node = sortedSet(value); if (node.size() != 0) - propertyDeps.put(key, node); + propertyDeps.set(key, node); break; case STRING: - propertyDeps.put(key, FACTORY.arrayNode() + propertyDeps.set(key, FACTORY.arrayNode() .add(value.textValue())); break; default: diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3PropertiesDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3PropertiesDigester.java index 2565374de..5d6c0aa59 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3PropertiesDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv3/DraftV3PropertiesDigester.java @@ -56,7 +56,7 @@ public JsonNode digest(final JsonNode schema) // TODO: return an array directly (same for "required" in v4) final ObjectNode ret = FACTORY.objectNode(); final ArrayNode required = FACTORY.arrayNode(); - ret.put("required", required); + ret.set("required", required); final JsonNode node = schema.get(keyword); final List list = Lists.newArrayList(node.fieldNames()); diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/DraftV4DependenciesDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/DraftV4DependenciesDigester.java index d82fe1200..9dc20c527 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/DraftV4DependenciesDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/DraftV4DependenciesDigester.java @@ -60,10 +60,10 @@ public JsonNode digest(final JsonNode schema) final ObjectNode ret = FACTORY.objectNode(); final ObjectNode propertyDeps = FACTORY.objectNode(); - ret.put("propertyDeps", propertyDeps); + ret.set("propertyDeps", propertyDeps); final ArrayNode schemaDeps = FACTORY.arrayNode(); - ret.put("schemaDeps", schemaDeps); + ret.set("schemaDeps", schemaDeps); final List list = Lists.newArrayList(); @@ -79,7 +79,7 @@ public JsonNode digest(final JsonNode schema) if (value.isObject()) // schema dep list.add(key); else // property dep - propertyDeps.put(key, sortedSet(value)); + propertyDeps.set(key, sortedSet(value)); } for (final String s: Ordering.natural().sortedCopy(list)) diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/DraftV4TypeDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/DraftV4TypeDigester.java index dc67e0206..1bb64e4c0 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/DraftV4TypeDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/DraftV4TypeDigester.java @@ -59,7 +59,7 @@ public JsonNode digest(final JsonNode schema) { final ObjectNode ret = FACTORY.objectNode(); final ArrayNode allowedTypes = FACTORY.arrayNode(); - ret.put(keyword, allowedTypes); + ret.set(keyword, allowedTypes); final JsonNode node = schema.get(keyword); diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/RequiredDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/RequiredDigester.java index db3a11f37..75527ee8c 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/RequiredDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/draftv4/RequiredDigester.java @@ -57,7 +57,7 @@ public JsonNode digest(final JsonNode schema) { final ObjectNode ret = FACTORY.objectNode(); final ArrayNode required = FACTORY.arrayNode(); - ret.put(keyword, required); + ret.set(keyword, required); final List list = Lists.newArrayList(schema.get(keyword)); diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/DraftV3TypeKeywordDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/DraftV3TypeKeywordDigester.java index 00b0f55ea..127962ef5 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/DraftV3TypeKeywordDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/DraftV3TypeKeywordDigester.java @@ -49,9 +49,9 @@ public JsonNode digest(final JsonNode schema) { final ObjectNode ret = FACTORY.objectNode(); final ArrayNode simpleTypes = FACTORY.arrayNode(); - ret.put(keyword, simpleTypes); + ret.set(keyword, simpleTypes); final ArrayNode schemas = FACTORY.arrayNode(); - ret.put("schemas", schemas); + ret.set("schemas", schemas); final JsonNode node = schema.get(keyword); diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/NumericDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/NumericDigester.java index 5e08958fb..69501ca1a 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/NumericDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/NumericDigester.java @@ -67,14 +67,14 @@ protected final ObjectNode digestedNumberNode(final JsonNode schema) ret.put("valueIsLong", isLong); if (isLong) { - ret.put(keyword, node.canConvertToInt() + ret.set(keyword, node.canConvertToInt() ? FACTORY.numberNode(node.intValue()) : FACTORY.numberNode(node.longValue())); return ret; } final BigDecimal decimal = node.decimalValue(); - ret.put(keyword, decimal.scale() == 0 + ret.set(keyword, decimal.scale() == 0 ? FACTORY.numberNode(decimal.toBigIntegerExact()) : node); diff --git a/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/SimpleDigester.java b/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/SimpleDigester.java index c83141d11..87849e345 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/SimpleDigester.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/digest/helpers/SimpleDigester.java @@ -43,7 +43,7 @@ public SimpleDigester(final String keyword, final NodeType first, public JsonNode digest(final JsonNode schema) { final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, schema.get(keyword)); + ret.set(keyword, schema.get(keyword)); return ret; } } diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv3/DisallowKeywordValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv3/DisallowKeywordValidator.java index eb128947d..22d472525 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv3/DisallowKeywordValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv3/DisallowKeywordValidator.java @@ -75,7 +75,7 @@ public void validate(final Processor processor, ptr = schemaPointer.append(JsonPointer.of(keyword, index)); newData = data.withSchema(tree.setPointer(ptr)); processor.process(subReport, newData); - fullReport.put(ptr.toString(), subReport.asJson()); + fullReport.set(ptr.toString(), subReport.asJson()); if (subReport.isSuccess()) nrSuccess++; } diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv3/DraftV3TypeValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv3/DraftV3TypeValidator.java index 8894f4597..ac269fa30 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv3/DraftV3TypeValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv3/DraftV3TypeValidator.java @@ -79,7 +79,7 @@ public void validate(final Processor processor, ptr = schemaPointer.append(JsonPointer.of(keyword, index)); newData = data.withSchema(tree.setPointer(ptr)); processor.process(subReport, newData); - fullReport.put(ptr.toString(), subReport.asJson()); + fullReport.set(ptr.toString(), subReport.asJson()); if (subReport.isSuccess()) nrSuccess++; } diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/AllOfValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/AllOfValidator.java index f7fb5f94b..77ab62332 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/AllOfValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/AllOfValidator.java @@ -66,7 +66,7 @@ public void validate(final Processor processor, ptr = schemaPointer.append(JsonPointer.of(keyword, index)); newData = data.withSchema(tree.setPointer(ptr)); processor.process(subReport, newData); - fullReport.put(ptr.toString(), subReport.asJson()); + fullReport.set(ptr.toString(), subReport.asJson()); if (subReport.isSuccess()) nrSuccess++; } diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/AnyOfValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/AnyOfValidator.java index 27756d459..c2760eb16 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/AnyOfValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/AnyOfValidator.java @@ -66,7 +66,7 @@ public void validate(final Processor processor, ptr = schemaPointer.append(JsonPointer.of(keyword, index)); newData = data.withSchema(tree.setPointer(ptr)); processor.process(subReport, newData); - fullReport.put(ptr.toString(), subReport.asJson()); + fullReport.set(ptr.toString(), subReport.asJson()); if (subReport.isSuccess()) nrSuccess++; } diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/OneOfValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/OneOfValidator.java index d1eb70e8d..f40cd7dec 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/OneOfValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/draftv4/OneOfValidator.java @@ -66,7 +66,7 @@ public void validate(final Processor processor, ptr = schemaPointer.append(JsonPointer.of(keyword, index)); newData = data.withSchema(tree.setPointer(ptr)); processor.process(subReport, newData); - fullReport.put(ptr.toString(), subReport.asJson()); + fullReport.set(ptr.toString(), subReport.asJson()); if (subReport.isSuccess()) nrSuccess++; } diff --git a/src/main/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaDigester.java b/src/main/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaDigester.java index 722ea8ac7..67814ca95 100644 --- a/src/main/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaDigester.java +++ b/src/main/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaDigester.java @@ -59,14 +59,14 @@ public JsonNode digest(final JsonNode schema) ArrayNode node; node = FACTORY.arrayNode(); - ret.put("properties", node); + ret.set("properties", node); set = Sets.newHashSet(schema.path("properties").fieldNames()); for (final String field: Ordering.natural().sortedCopy(set)) node.add(field); node = FACTORY.arrayNode(); - ret.put("patternProperties", node); + ret.set("patternProperties", node); set = Sets.newHashSet(schema.path("patternProperties").fieldNames()); for (final String field: Ordering.natural().sortedCopy(set)) diff --git a/src/test/java/com/github/fge/jsonschema/keyword/special/ExtendsKeywordTest.java b/src/test/java/com/github/fge/jsonschema/keyword/special/ExtendsKeywordTest.java index 32fab2b55..1edcdb1fb 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/special/ExtendsKeywordTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/special/ExtendsKeywordTest.java @@ -83,7 +83,7 @@ public void initEnvironment() return; final ObjectNode schema = FACTORY.objectNode(); - schema.put("extends", FACTORY.objectNode()); + schema.set("extends", FACTORY.objectNode()); final SchemaTree tree = new CanonicalSchemaTree(SchemaKey.anonymousKey(), schema); diff --git a/src/test/java/com/github/fge/jsonschema/keyword/special/NotKeywordTest.java b/src/test/java/com/github/fge/jsonschema/keyword/special/NotKeywordTest.java index 243f1ddf8..f13d9b6ae 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/special/NotKeywordTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/special/NotKeywordTest.java @@ -84,7 +84,7 @@ public void initEnvironment() return; final ObjectNode schema = FACTORY.objectNode(); - schema.put("not", FACTORY.objectNode()); + schema.set("not", FACTORY.objectNode()); final SchemaTree tree = new CanonicalSchemaTree(SchemaKey.anonymousKey(), schema); diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/DisallowValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/DisallowValidatorTest.java index 5f502dad3..dea7f6274 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/DisallowValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/DisallowValidatorTest.java @@ -54,8 +54,8 @@ protected void checkOkOk(final ProcessingReport report) final ObjectNode reports = FACTORY.objectNode(); final ArrayNode oneReport = FACTORY.arrayNode(); - reports.put(ptr1.toString(), oneReport); - reports.put(ptr2.toString(), oneReport); + reports.set(ptr1.toString(), oneReport); + reports.set(ptr2.toString(), oneReport); assertMessage(message) .isValidationError(keyword, @@ -78,8 +78,8 @@ protected void checkOkKo(final ProcessingReport report) final ArrayNode oneReport = FACTORY.arrayNode(); oneReport.add(MSG.asJson()); - reports.put(ptr1.toString(), FACTORY.arrayNode()); - reports.put(ptr2.toString(), oneReport); + reports.set(ptr1.toString(), FACTORY.arrayNode()); + reports.set(ptr2.toString(), oneReport); assertMessage(message) .isValidationError(keyword, @@ -102,7 +102,7 @@ protected JsonNode generateSchema() schemas.add(sub1); schemas.add(sub2); final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, schemas); + ret.set(keyword, schemas); return ret; } @@ -116,11 +116,11 @@ protected JsonNode generateInstance() protected JsonNode generateDigest() { final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, FACTORY.arrayNode()); + ret.set(keyword, FACTORY.arrayNode()); final ArrayNode schemas = FACTORY.arrayNode(); schemas.add(0); schemas.add(1); - ret.put("schemas", schemas); + ret.set("schemas", schemas); return ret; } } diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/DraftV3TypeValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/DraftV3TypeValidatorTest.java index 9e4fb34c1..4968f4f32 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/DraftV3TypeValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/DraftV3TypeValidatorTest.java @@ -68,8 +68,8 @@ protected void checkKoKo(final ProcessingReport report) final ArrayNode oneReport = FACTORY.arrayNode(); oneReport.add(MSG.asJson()); - reports.put(ptr1.toString(), oneReport); - reports.put(ptr2.toString(), oneReport); + reports.set(ptr1.toString(), oneReport); + reports.set(ptr2.toString(), oneReport); assertMessage(message) .isValidationError(keyword, @@ -84,7 +84,7 @@ protected JsonNode generateSchema() schemas.add(sub1); schemas.add(sub2); final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, schemas); + ret.set(keyword, schemas); return ret; } @@ -98,11 +98,11 @@ protected JsonNode generateInstance() protected JsonNode generateDigest() { final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, FACTORY.arrayNode()); + ret.set(keyword, FACTORY.arrayNode()); final ArrayNode schemas = FACTORY.arrayNode(); schemas.add(0); schemas.add(1); - ret.put("schemas", schemas); + ret.set("schemas", schemas); return ret; } } diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/ExtendsValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/ExtendsValidatorTest.java index f48099215..355c79be1 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/ExtendsValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv3/ExtendsValidatorTest.java @@ -66,7 +66,7 @@ protected JsonNode generateSchema() schemas.add(sub1); schemas.add(sub2); final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, schemas); + ret.set(keyword, schemas); return ret; } diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/AllOfValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/AllOfValidatorTest.java index 24e0b256f..6dae95d84 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/AllOfValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/AllOfValidatorTest.java @@ -61,8 +61,8 @@ protected void checkOkKo(final ProcessingReport report) final ArrayNode oneReport = FACTORY.arrayNode(); oneReport.add(MSG.asJson()); - reports.put(ptr1.toString(), FACTORY.arrayNode()); - reports.put(ptr2.toString(), oneReport); + reports.set(ptr1.toString(), FACTORY.arrayNode()); + reports.set(ptr2.toString(), oneReport); assertMessage(message) .isValidationError(keyword, @@ -85,8 +85,8 @@ protected void checkKoKo(final ProcessingReport report) final ArrayNode oneReport = FACTORY.arrayNode(); oneReport.add(MSG.asJson()); - reports.put(ptr1.toString(), oneReport); - reports.put(ptr2.toString(), oneReport); + reports.set(ptr1.toString(), oneReport); + reports.set(ptr2.toString(), oneReport); assertMessage(message) .isValidationError(keyword, @@ -102,7 +102,7 @@ protected JsonNode generateSchema() schemas.add(sub1); schemas.add(sub2); final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, schemas); + ret.set(keyword, schemas); return ret; } diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/AnyOfValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/AnyOfValidatorTest.java index 48a6f82ba..14c920c3c 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/AnyOfValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/AnyOfValidatorTest.java @@ -68,8 +68,8 @@ protected void checkKoKo(final ProcessingReport report) final ArrayNode oneReport = FACTORY.arrayNode(); oneReport.add(MSG.asJson()); - reports.put(ptr1.toString(), oneReport); - reports.put(ptr2.toString(), oneReport); + reports.set(ptr1.toString(), oneReport); + reports.set(ptr2.toString(), oneReport); assertMessage(message) .isValidationError(keyword, @@ -84,7 +84,7 @@ protected JsonNode generateSchema() schemas.add(sub1); schemas.add(sub2); final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, schemas); + ret.set(keyword, schemas); return ret; } diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/DependenciesValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/DependenciesValidatorTest.java index ea8b61d93..ac600cab5 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/DependenciesValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/DependenciesValidatorTest.java @@ -63,11 +63,11 @@ protected void checkKoKo(final ProcessingReport report) protected JsonNode generateSchema() { final ObjectNode value = FACTORY.objectNode(); - value.put("a", sub1); - value.put("b", sub2); + value.set("a", sub1); + value.set("b", sub2); final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, value); + ret.set(keyword, value); return ret; } @@ -88,8 +88,8 @@ protected JsonNode generateDigest() schemaDeps.add("b"); final ObjectNode ret = FACTORY.objectNode(); - ret.put("propertyDeps", FACTORY.objectNode()); - ret.put("schemaDeps", schemaDeps); + ret.set("propertyDeps", FACTORY.objectNode()); + ret.set("schemaDeps", schemaDeps); return ret; } } diff --git a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/OneOfValidatorTest.java b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/OneOfValidatorTest.java index 296f1cfc0..3532b29fe 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/OneOfValidatorTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/validator/callback/draftv4/OneOfValidatorTest.java @@ -53,8 +53,8 @@ protected void checkOkOk(final ProcessingReport report) final ObjectNode reports = FACTORY.objectNode(); final ArrayNode oneReport = FACTORY.arrayNode(); - reports.put(ptr1.toString(), oneReport); - reports.put(ptr2.toString(), oneReport); + reports.set(ptr1.toString(), oneReport); + reports.set(ptr2.toString(), oneReport); assertMessage(message) .isValidationError(keyword, @@ -84,8 +84,8 @@ protected void checkKoKo(final ProcessingReport report) final ArrayNode oneReport = FACTORY.arrayNode(); oneReport.add(MSG.asJson()); - reports.put(ptr1.toString(), oneReport); - reports.put(ptr2.toString(), oneReport); + reports.set(ptr1.toString(), oneReport); + reports.set(ptr2.toString(), oneReport); assertMessage(message) .isValidationError(keyword, @@ -101,7 +101,7 @@ protected JsonNode generateSchema() schemas.add(sub1); schemas.add(sub2); final ObjectNode ret = FACTORY.objectNode(); - ret.put(keyword, schemas); + ret.set(keyword, schemas); return ret; } diff --git a/src/test/java/com/github/fge/jsonschema/processors/validation/ValidationProcessorTest.java b/src/test/java/com/github/fge/jsonschema/processors/validation/ValidationProcessorTest.java index bcf238fe0..8b42fa609 100644 --- a/src/test/java/com/github/fge/jsonschema/processors/validation/ValidationProcessorTest.java +++ b/src/test/java/com/github/fge/jsonschema/processors/validation/ValidationProcessorTest.java @@ -75,7 +75,7 @@ public final class ValidationProcessorTest RAWSCHEMA = factory.objectNode(); RAWSCHEMA.put("minItems", 2) - .put("items", factory.objectNode().put(K1, 0)); + .set("items", factory.objectNode().put(K1, 0)); RAWINSTANCE = factory.arrayNode(); RAWINSTANCE.add(1); From 3c67cf92611de5f912129525cb468ad518fe28b0 Mon Sep 17 00:00:00 2001 From: capstan Date: Tue, 5 Nov 2019 09:44:04 +0100 Subject: [PATCH 59/71] Bump libphonenumber to v8.10.22. --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index bf6de69c6..42a8a3e1d 100644 --- a/build.gradle +++ b/build.gradle @@ -64,7 +64,7 @@ dependencies { compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.12-SNAPSHOT"); compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); - compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.0.0"); + compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.10.22"); compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2"); compile(group: "net.sf.jopt-simple", name: "jopt-simple", version: "5.0.3"); testCompile(group: "org.testng", name: "testng", version: "6.10") { From 7788ffe6886e2af916b22d610fb11752e909fb06 Mon Sep 17 00:00:00 2001 From: capstan Date: Tue, 5 Nov 2019 10:42:18 +0100 Subject: [PATCH 60/71] Upgrade Fest Assert to AssertJ. Also re-ordered one `overridingErrorMessage` to be applied before the assert evaluation. Same fixes as for java-json-tools/json-schema-core/issues/66. --- build.gradle | 3 ++- .../matchers/ProcessingMessageAssert.java | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 42a8a3e1d..3ae1a7658 100644 --- a/build.gradle +++ b/build.gradle @@ -73,7 +73,8 @@ dependencies { exclude(group: "org.yaml", module: "snakeyaml"); }; testCompile(group: "org.mockito", name: "mockito-core", version: "2.4.2"); - testCompile(group: "org.easytesting", name: "fest-assert", version: "1.4"); + // FIXME: update to 3.x once we're off of Java 7. + testCompile(group: "org.assertj", name: "assertj-core", version: "2.9.1"); } javadoc { diff --git a/src/test/java/com/github/fge/jsonschema/matchers/ProcessingMessageAssert.java b/src/test/java/com/github/fge/jsonschema/matchers/ProcessingMessageAssert.java index 5a53411bb..6248c7a73 100644 --- a/src/test/java/com/github/fge/jsonschema/matchers/ProcessingMessageAssert.java +++ b/src/test/java/com/github/fge/jsonschema/matchers/ProcessingMessageAssert.java @@ -19,6 +19,7 @@ package com.github.fge.jsonschema.matchers; +import org.assertj.core.api.AbstractAssert; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; @@ -27,16 +28,15 @@ import com.github.fge.jsonschema.core.report.ProcessingMessage; import com.github.fge.jsonschema.core.tree.SchemaTree; import com.github.fge.jsonschema.core.util.AsJson; -import org.fest.assertions.GenericAssert; import java.util.Collection; import java.util.Map; -import static org.fest.assertions.Assertions.*; +import static org.assertj.core.api.Assertions.*; import static org.testng.Assert.*; public final class ProcessingMessageAssert - extends GenericAssert + extends AbstractAssert { private final JsonNode msg; @@ -48,7 +48,7 @@ public static ProcessingMessageAssert assertMessage( private ProcessingMessageAssert(final ProcessingMessage actual) { - super(ProcessingMessageAssert.class, actual); + super(actual, ProcessingMessageAssert.class); msg = actual.asJson(); } @@ -88,9 +88,10 @@ public ProcessingMessageAssert hasField(final String name, assertThat(msg.has(name)).isTrue(); final String input = msg.get(name).textValue(); final String expected = value.toString(); - assertThat(input).isEqualTo(expected) + assertThat(input) .overridingErrorMessage("Strings differ: wanted " + expected - + " but got " + input); + + " but got " + input) + .isEqualTo(expected); return this; } From 4558a007b2b6238e1835a5ae4497aa4672480ac0 Mon Sep 17 00:00:00 2001 From: capstan Date: Tue, 26 Nov 2019 09:33:09 +0100 Subject: [PATCH 61/71] Replace OSGi plugin with biz.aQute.bnd. See java-json-tools/jackson-coreutils#13. --- build.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3ae1a7658..900a050c1 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,15 @@ * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt */ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:4.2.0' + } +} + plugins { id("net.ltgt.errorprone") version "0.8.1" apply false } @@ -24,7 +33,7 @@ plugins { apply(plugin: "java"); apply(plugin: "maven"); apply(plugin: "signing"); -apply(plugin: "osgi"); +apply(plugin: "biz.aQute.bnd.builder"); apply(plugin: "idea"); apply(plugin: "eclipse"); apply(plugin: "net.ltgt.errorprone"); From 4a438c540ada99f2fab484a2786d220c306f94d8 Mon Sep 17 00:00:00 2001 From: capstan Date: Tue, 26 Nov 2019 12:40:12 +0100 Subject: [PATCH 62/71] Warnings as errors --- build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 900a050c1..7ecd2e86e 100644 --- a/build.gradle +++ b/build.gradle @@ -132,7 +132,10 @@ task sourcesJar(type: Jar, dependsOn: classes) { allprojects { gradle.projectsEvaluated { tasks.withType(JavaCompile) { - options.compilerArgs << "-Xlint:all" + options.compilerArgs << "-Xlint:all" << "-Werror" + } + tasks.withType(Javadoc) { + options.addStringOption('Xwerror', '-quiet') } } } From aa411fca24dd22414600e19a53af7cece9df75b0 Mon Sep 17 00:00:00 2001 From: capstan Date: Mon, 6 Jan 2020 13:45:46 +0100 Subject: [PATCH 63/71] Allow references to staging jars. Also fix the release script to refresh dependencies. --- build.gradle | 10 ++++++++++ dorelease.sh | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7ecd2e86e..ab3f15f21 100644 --- a/build.gradle +++ b/build.gradle @@ -55,6 +55,16 @@ repositories { url "https://oss.sonatype.org/content/repositories/snapshots" } } + /* Allow staging references for last pre-release testing. */ + if (project.properties.containsKey("sonatypeUsername")) { + maven { + url "https://oss.sonatype.org/service/local/staging/deploy/maven2" + credentials { + username = project.properties["sonatypeUsername"] + password = project.properties["sonatypePassword"] + } + } + } } /* diff --git a/dorelease.sh b/dorelease.sh index f5cfc3289..62a9a4c34 100755 --- a/dorelease.sh +++ b/dorelease.sh @@ -17,5 +17,5 @@ # 5. Login as sonatypeUsername # 6. Follow the instructions here: http://central.sonatype.org/pages/releasing-the-deployment.html -./gradlew clean test uploadArchives +./gradlew --refresh-dependencies clean test uploadArchives From e3fb6fb9a575d356426040a6a071c0e8ecce006b Mon Sep 17 00:00:00 2001 From: capstan Date: Mon, 6 Jan 2020 14:36:53 +0100 Subject: [PATCH 64/71] 2.2.12 --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index ab3f15f21..3212b9c94 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ apply(plugin: "eclipse"); apply(plugin: "net.ltgt.errorprone"); group = "com.github.java-json-tools"; -version = "2.2.12-SNAPSHOT"; +version = "2.2.12"; sourceCompatibility = JavaVersion.VERSION_1_7; targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility @@ -80,7 +80,7 @@ dependencies { */ dependencies { compile(group: "com.google.guava", name: "guava", version: "28.1-android"); - compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.12-SNAPSHOT"); + compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.12"); compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); compile(group: "joda-time", name: "joda-time", version: "2.9.7"); compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.10.22"); From 65d89524087b51f08f3fe06fec501f210cb3ca9f Mon Sep 17 00:00:00 2001 From: capstan Date: Mon, 6 Jan 2020 15:04:08 +0100 Subject: [PATCH 65/71] Announce 2.2.12 --- README.md | 6 +++--- build.gradle | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 306d8a298..2a0d02e16 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ run by yourself. ## Versions -* current stable version: **2.2.11** +* current stable version: **2.2.12** ([ChangeLog](https://github.com/java-json-tools/json-schema-validator/wiki/ChangeLog_22x), [Javadoc](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html), [code samples](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). @@ -57,7 +57,7 @@ Gradle: ```groovy dependencies { - compile(group: "com.github.java-json-tools", name: "json-schema-validator", version: "2.2.11"); + compile(group: "com.github.java-json-tools", name: "json-schema-validator", version: "2.2.12"); } ``` @@ -67,7 +67,7 @@ Maven: com.github.java-json-tools json-schema-validator - 2.2.11 + 2.2.12 ``` diff --git a/build.gradle b/build.gradle index 3212b9c94..0df3567c1 100644 --- a/build.gradle +++ b/build.gradle @@ -39,7 +39,7 @@ apply(plugin: "eclipse"); apply(plugin: "net.ltgt.errorprone"); group = "com.github.java-json-tools"; -version = "2.2.12"; +version = "2.2.13-SNAPSHOT"; sourceCompatibility = JavaVersion.VERSION_1_7; targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility From e672a856916f8582c74f7acdea35fe6923162203 Mon Sep 17 00:00:00 2001 From: capstan Date: Tue, 7 Jan 2020 11:13:29 +0100 Subject: [PATCH 66/71] Split monolithic build.gradle into project and settings files. --- build.gradle | 52 ++++---------------------------------- project.gradle | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ settings.gradle | 20 +++++++++++++++ 3 files changed, 92 insertions(+), 47 deletions(-) create mode 100644 project.gradle create mode 100644 settings.gradle diff --git a/build.gradle b/build.gradle index 0df3567c1..a938befb8 100644 --- a/build.gradle +++ b/build.gradle @@ -38,10 +38,9 @@ apply(plugin: "idea"); apply(plugin: "eclipse"); apply(plugin: "net.ltgt.errorprone"); +apply(from: "project.gradle"); + group = "com.github.java-json-tools"; -version = "2.2.13-SNAPSHOT"; -sourceCompatibility = JavaVersion.VERSION_1_7; -targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility ext.forRelease = !version.endsWith("-SNAPSHOT"); @@ -75,47 +74,6 @@ dependencies { errorproneJavac("com.google.errorprone:javac:9+181-r4173-1") } -/* - * List of dependencies - */ -dependencies { - compile(group: "com.google.guava", name: "guava", version: "28.1-android"); - compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.12"); - compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); - compile(group: "joda-time", name: "joda-time", version: "2.9.7"); - compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.10.22"); - compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2"); - compile(group: "net.sf.jopt-simple", name: "jopt-simple", version: "5.0.3"); - testCompile(group: "org.testng", name: "testng", version: "6.10") { - exclude(group: "junit", module: "junit"); - exclude(group: "org.beanshell", module: "bsh"); - exclude(group: "org.yaml", module: "snakeyaml"); - }; - testCompile(group: "org.mockito", name: "mockito-core", version: "2.4.2"); - // FIXME: update to 3.x once we're off of Java 7. - testCompile(group: "org.assertj", name: "assertj-core", version: "2.9.1"); -} - -javadoc { - options { - def currentJavaVersion = org.gradle.api.JavaVersion.current() - // FIXME: https://github.com/gradle/gradle/issues/11182 - if (currentJavaVersion.compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) { - addStringOption("-release", "7"); - } - links("https://docs.oracle.com/javase/7/docs/api/"); - links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); - links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/"); - links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/"); - links("https://www.javadoc.io/doc/com.google.guava/guava/28.1-android/"); - links("https://java-json-tools.github.io/btf/"); - links("https://java-json-tools.github.io/msg-simple/"); - links("https://java-json-tools.github.io/jackson-coreutils/"); - links("https://java-json-tools.github.io/uri-template/"); - links("https://java-json-tools.github.io/json-schema-core/1.2.x/"); - } -} - /* * Necessary! Otherwise TestNG will not be used... * @@ -221,8 +179,8 @@ task pom { project.ext { description = "A Java implementation of the JSON Schema specification"; - scmUrl = sprintf("git@github.com:box-metadata/%s", name); - projectURL = sprintf("https://github.com/box-metadata/%s", name); + scmUrl = sprintf("git@github.com:java-json-tools/%s.git", name); + projectURL = sprintf("https://github.com/java-json-tools/%s", name); sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"; sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots/"; }; @@ -283,7 +241,7 @@ uploadArchives { scm { url "${scmUrl}"; - connection "scm:git:${scmUrl}"; + connection "${scmUrl}"; developerConnection "scm:git:${scmUrl}"; } diff --git a/project.gradle b/project.gradle new file mode 100644 index 000000000..ee2647143 --- /dev/null +++ b/project.gradle @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) + * + * This software is dual-licensed under: + * + * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any + * later version; + * - the Apache Software License (ASL) version 2.0. + * + * The text of this file and of both licenses is available at the root of this + * project or, if you have the jar distribution, in directory META-INF/, under + * the names LGPL-3.0.txt and ASL-2.0.txt respectively. + * + * Direct link to the sources: + * + * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt + * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt + */ + +/* + * Project-specific settings. Unfortunately we cannot put the name in there! + */ +group = "com.github.java-json-tools"; +version = "2.2.13-SNAPSHOT"; +sourceCompatibility = JavaVersion.VERSION_1_7; +targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility + +/* + * List of dependencies + */ +dependencies { + compile(group: "com.google.guava", name: "guava", version: "28.1-android"); + compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.12"); + compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); + compile(group: "joda-time", name: "joda-time", version: "2.9.7"); + compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.10.22"); + compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2"); + compile(group: "net.sf.jopt-simple", name: "jopt-simple", version: "5.0.3"); + testCompile(group: "org.testng", name: "testng", version: "6.10") { + exclude(group: "junit", module: "junit"); + exclude(group: "org.beanshell", module: "bsh"); + exclude(group: "org.yaml", module: "snakeyaml"); + }; + testCompile(group: "org.mockito", name: "mockito-core", version: "2.4.2"); + // FIXME: update to 3.x once we're off of Java 7. + testCompile(group: "org.assertj", name: "assertj-core", version: "2.9.1"); +} + +javadoc { + options { + def currentJavaVersion = org.gradle.api.JavaVersion.current() + // FIXME: https://github.com/gradle/gradle/issues/11182 + if (currentJavaVersion.compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) { + addStringOption("-release", "7"); + } + links("https://docs.oracle.com/javase/7/docs/api/"); + links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); + links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/"); + links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/"); + links("https://www.javadoc.io/doc/com.google.guava/guava/28.1-android/"); + links("https://java-json-tools.github.io/btf/"); + links("https://java-json-tools.github.io/msg-simple/"); + links("https://java-json-tools.github.io/jackson-coreutils/"); + links("https://java-json-tools.github.io/uri-template/"); + links("https://java-json-tools.github.io/json-schema-core/1.2.x/"); + } +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..4c0aacfa0 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2014, Francis Galiegue (fgaliegue@gmail.com) + * + * This software is dual-licensed under: + * + * - the Lesser General Public License (LGPL) version 3.0 or, at your option, any + * later version; + * - the Apache Software License (ASL) version 2.0. + * + * The text of this file and of both licenses is available at the root of this + * project or, if you have the jar distribution, in directory META-INF/, under + * the names LGPL-3.0.txt and ASL-2.0.txt respectively. + * + * Direct link to the sources: + * + * - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt + * - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt + */ + +rootProject.name = "json-schema-validator"; From 0c76d529b78d56736e03b1702410268f0fa2d630 Mon Sep 17 00:00:00 2001 From: capstan Date: Wed, 8 Jan 2020 18:07:16 +0100 Subject: [PATCH 67/71] 2.2.13 * Guava to 28.2-android * json-schema-core to 1.2.13 * mailapi to 1.6.2 * joda-time to 2.10.5 * libphonenumber to 8.11.1 * jopt-simple to 5.0.4 * testng to 7.1.0 * mockito-core to 2.28.2 Also moved description into project.gradle --- build.gradle | 1 - project.gradle | 31 ++++++++++++++++++------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index a938befb8..0345fa456 100644 --- a/build.gradle +++ b/build.gradle @@ -178,7 +178,6 @@ task pom { */ project.ext { - description = "A Java implementation of the JSON Schema specification"; scmUrl = sprintf("git@github.com:java-json-tools/%s.git", name); projectURL = sprintf("https://github.com/java-json-tools/%s", name); sonatypeStaging = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"; diff --git a/project.gradle b/project.gradle index ee2647143..982a0a7b3 100644 --- a/project.gradle +++ b/project.gradle @@ -21,27 +21,32 @@ * Project-specific settings. Unfortunately we cannot put the name in there! */ group = "com.github.java-json-tools"; -version = "2.2.13-SNAPSHOT"; +version = "2.2.13"; sourceCompatibility = JavaVersion.VERSION_1_7; targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility +project.ext { + description = "A Java implementation of the JSON Schema specification"; +} + /* * List of dependencies */ dependencies { - compile(group: "com.google.guava", name: "guava", version: "28.1-android"); - compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.12"); - compile(group: "com.sun.mail", name: "mailapi", version: "1.6.1"); - compile(group: "joda-time", name: "joda-time", version: "2.9.7"); - compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.10.22"); + compile(group: "com.google.guava", name: "guava", version: "28.2-android"); + compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.13"); + // FIXME: 1.6.4 exists, but has different license (EDL 1.0, EPL 2.0). Can update? + compile(group: "com.sun.mail", name: "mailapi", version: "1.6.2"); + compile(group: "joda-time", name: "joda-time", version: "2.10.5"); + compile(group: "com.googlecode.libphonenumber", name: "libphonenumber", version: "8.11.1"); compile(group: "com.google.code.findbugs", name: "jsr305", version: "3.0.2"); - compile(group: "net.sf.jopt-simple", name: "jopt-simple", version: "5.0.3"); - testCompile(group: "org.testng", name: "testng", version: "6.10") { + compile(group: "net.sf.jopt-simple", name: "jopt-simple", version: "5.0.4"); + testCompile(group: "org.testng", name: "testng", version: "7.1.0") { exclude(group: "junit", module: "junit"); exclude(group: "org.beanshell", module: "bsh"); exclude(group: "org.yaml", module: "snakeyaml"); }; - testCompile(group: "org.mockito", name: "mockito-core", version: "2.4.2"); + testCompile(group: "org.mockito", name: "mockito-core", version: "2.28.2"); // FIXME: update to 3.x once we're off of Java 7. testCompile(group: "org.assertj", name: "assertj-core", version: "2.9.1"); } @@ -54,10 +59,10 @@ javadoc { addStringOption("-release", "7"); } links("https://docs.oracle.com/javase/7/docs/api/"); - links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.1/"); - links("https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/"); - links("https://fasterxml.github.io/jackson-core/javadoc/2.2.0/"); - links("https://www.javadoc.io/doc/com.google.guava/guava/28.1-android/"); + links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.2/"); + links("https://fasterxml.github.io/jackson-databind/javadoc/2.10/"); + links("https://fasterxml.github.io/jackson-core/javadoc/2.10/"); + links("https://www.javadoc.io/doc/com.google.guava/guava/28.2-android/"); links("https://java-json-tools.github.io/btf/"); links("https://java-json-tools.github.io/msg-simple/"); links("https://java-json-tools.github.io/jackson-coreutils/"); From 2b38d8be087e1a7a074f3b22ec178f4a9fb5e865 Mon Sep 17 00:00:00 2001 From: capstan Date: Wed, 27 May 2020 15:11:39 +0200 Subject: [PATCH 68/71] Prepare for 2.2.14. * Add missing project dependency on jackson-coreutils, moving it to be jackson-coreutils-equivalence, and converting references to JsonNumEquivalence. * Updated to json-schema-core 1.2.14-SNAPSHOT. * Updated jackson-databind javadoc link versions. --- project.gradle | 9 +++++---- .../keyword/validator/common/EnumValidator.java | 6 +++--- .../keyword/validator/common/UniqueItemsValidator.java | 6 +++--- .../jsonschema/keyword/digest/AbstractDigesterTest.java | 4 ++-- .../processors/validation/ArraySchemaDigesterTest.java | 4 ++-- .../processors/validation/ObjectSchemaDigesterTest.java | 4 ++-- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/project.gradle b/project.gradle index 982a0a7b3..6830ebbb1 100644 --- a/project.gradle +++ b/project.gradle @@ -21,7 +21,7 @@ * Project-specific settings. Unfortunately we cannot put the name in there! */ group = "com.github.java-json-tools"; -version = "2.2.13"; +version = "2.2.14-SNAPSHOT"; sourceCompatibility = JavaVersion.VERSION_1_7; targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility @@ -34,7 +34,8 @@ project.ext { */ dependencies { compile(group: "com.google.guava", name: "guava", version: "28.2-android"); - compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.13"); + compile(group: "com.github.java-json-tools", name: "jackson-coreutils-equivalence", version: "1.0-SNAPSHOT"); + compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.14-SNAPSHOT"); // FIXME: 1.6.4 exists, but has different license (EDL 1.0, EPL 2.0). Can update? compile(group: "com.sun.mail", name: "mailapi", version: "1.6.2"); compile(group: "joda-time", name: "joda-time", version: "2.10.5"); @@ -60,8 +61,8 @@ javadoc { } links("https://docs.oracle.com/javase/7/docs/api/"); links("https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/3.0.2/"); - links("https://fasterxml.github.io/jackson-databind/javadoc/2.10/"); - links("https://fasterxml.github.io/jackson-core/javadoc/2.10/"); + links("https://fasterxml.github.io/jackson-databind/javadoc/2.11/"); + links("https://fasterxml.github.io/jackson-core/javadoc/2.11/"); links("https://www.javadoc.io/doc/com.google.guava/guava/28.2-android/"); links("https://java-json-tools.github.io/btf/"); links("https://java-json-tools.github.io/msg-simple/"); diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/common/EnumValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/common/EnumValidator.java index e0caaa50e..1df7aa1ea 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/common/EnumValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/common/EnumValidator.java @@ -20,7 +20,7 @@ package com.github.fge.jsonschema.keyword.validator.common; import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jackson.JsonNumEquals; +import com.github.fge.jackson.JsonNumEquivalence; import com.github.fge.jsonschema.core.exceptions.ProcessingException; import com.github.fge.jsonschema.core.processing.Processor; import com.github.fge.jsonschema.core.report.ProcessingReport; @@ -32,13 +32,13 @@ /** * Keyword validator for {@code enum} * - * @see JsonNumEquals + * @see JsonNumEquivalence */ public final class EnumValidator extends AbstractKeywordValidator { private static final Equivalence EQUIVALENCE - = JsonNumEquals.getInstance(); + = JsonNumEquivalence.getInstance(); private final JsonNode values; diff --git a/src/main/java/com/github/fge/jsonschema/keyword/validator/common/UniqueItemsValidator.java b/src/main/java/com/github/fge/jsonschema/keyword/validator/common/UniqueItemsValidator.java index a04bab2f4..7cb8b2140 100644 --- a/src/main/java/com/github/fge/jsonschema/keyword/validator/common/UniqueItemsValidator.java +++ b/src/main/java/com/github/fge/jsonschema/keyword/validator/common/UniqueItemsValidator.java @@ -20,7 +20,7 @@ package com.github.fge.jsonschema.keyword.validator.common; import com.fasterxml.jackson.databind.JsonNode; -import com.github.fge.jackson.JsonNumEquals; +import com.github.fge.jackson.JsonNumEquivalence; import com.github.fge.jsonschema.core.exceptions.ProcessingException; import com.github.fge.jsonschema.core.processing.Processor; import com.github.fge.jsonschema.core.report.ProcessingReport; @@ -35,13 +35,13 @@ /** * Keyword validator for {@code uniqueItems} * - * @see JsonNumEquals + * @see JsonNumEquivalence */ public final class UniqueItemsValidator extends AbstractKeywordValidator { private static final Equivalence EQUIVALENCE - = JsonNumEquals.getInstance(); + = JsonNumEquivalence.getInstance(); private final boolean uniqueItems; diff --git a/src/test/java/com/github/fge/jsonschema/keyword/digest/AbstractDigesterTest.java b/src/test/java/com/github/fge/jsonschema/keyword/digest/AbstractDigesterTest.java index f9b3f47b2..7c601401c 100644 --- a/src/test/java/com/github/fge/jsonschema/keyword/digest/AbstractDigesterTest.java +++ b/src/test/java/com/github/fge/jsonschema/keyword/digest/AbstractDigesterTest.java @@ -21,7 +21,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jackson.JsonLoader; -import com.github.fge.jackson.JsonNumEquals; +import com.github.fge.jackson.JsonNumEquivalence; import com.github.fge.jackson.NodeType; import com.github.fge.jsonschema.core.util.Dictionary; import com.google.common.base.Equivalence; @@ -40,7 +40,7 @@ public abstract class AbstractDigesterTest { private static final Equivalence EQUIVALENCE - = JsonNumEquals.getInstance(); + = JsonNumEquivalence.getInstance(); private final String keyword; private final Digester digester; diff --git a/src/test/java/com/github/fge/jsonschema/processors/validation/ArraySchemaDigesterTest.java b/src/test/java/com/github/fge/jsonschema/processors/validation/ArraySchemaDigesterTest.java index 5b1094b92..71fa599a6 100644 --- a/src/test/java/com/github/fge/jsonschema/processors/validation/ArraySchemaDigesterTest.java +++ b/src/test/java/com/github/fge/jsonschema/processors/validation/ArraySchemaDigesterTest.java @@ -21,7 +21,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jackson.JsonLoader; -import com.github.fge.jackson.JsonNumEquals; +import com.github.fge.jackson.JsonNumEquivalence; import com.github.fge.jsonschema.keyword.digest.Digester; import com.google.common.base.Equivalence; import com.google.common.collect.Lists; @@ -37,7 +37,7 @@ public final class ArraySchemaDigesterTest { private static final Equivalence EQUIVALENCE - = JsonNumEquals.getInstance(); + = JsonNumEquivalence.getInstance(); private final Digester digester = ArraySchemaDigester.getInstance(); private final JsonNode testNode; diff --git a/src/test/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaDigesterTest.java b/src/test/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaDigesterTest.java index 2f611288c..9fe6622b1 100644 --- a/src/test/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaDigesterTest.java +++ b/src/test/java/com/github/fge/jsonschema/processors/validation/ObjectSchemaDigesterTest.java @@ -21,7 +21,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.github.fge.jackson.JsonLoader; -import com.github.fge.jackson.JsonNumEquals; +import com.github.fge.jackson.JsonNumEquivalence; import com.github.fge.jsonschema.keyword.digest.Digester; import com.google.common.base.Equivalence; import com.google.common.collect.Lists; @@ -37,7 +37,7 @@ public final class ObjectSchemaDigesterTest { private static final Equivalence EQUIVALENCE - = JsonNumEquals.getInstance(); + = JsonNumEquivalence.getInstance(); private final Digester digester = ObjectSchemaDigester.getInstance(); private final JsonNode testNode; From 3a56aa9529aff89df5f78b0bc6faa2770cedf7c9 Mon Sep 17 00:00:00 2001 From: capstan Date: Wed, 27 May 2020 18:08:49 +0200 Subject: [PATCH 69/71] 2.2.14 --- README.md | 10 +++++----- project.gradle | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2a0d02e16..b02eaffc7 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ run by yourself. ## Versions -* current stable version: **2.2.12** +* current stable version: **2.2.14** ([ChangeLog](https://github.com/java-json-tools/json-schema-validator/wiki/ChangeLog_22x), [Javadoc](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html), [code samples](http://java-json-tools.github.io/json-schema-validator/2.2.x/index.html?com/github/fge/jsonschema/examples/package-summary.html)). @@ -57,7 +57,7 @@ Gradle: ```groovy dependencies { - compile(group: "com.github.java-json-tools", name: "json-schema-validator", version: "2.2.12"); + compile(group: "com.github.java-json-tools", name: "json-schema-validator", version: "2.2.14"); } ``` @@ -67,7 +67,7 @@ Maven: com.github.java-json-tools json-schema-validator - 2.2.12 + 2.2.14 ``` @@ -109,5 +109,5 @@ details. [LGPLv3]: http://www.gnu.org/licenses/lgpl-3.0.html [ASL 2.0 badge]: https://img.shields.io/:license-Apache%202.0-blue.svg [ASL 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html -[Travis Badge]: https://api.travis-ci.org/java-json-tools/json-schema-validator.svg?branch=master -[Travis]: https://travis-ci.org/java-json-tools/json-schema-validator +[Travis Badge]: https://travis-ci.com/java-json-tools/json-schema-validator.svg?branch=master +[Travis]: https://travis-ci.com/java-json-tools/json-schema-validator diff --git a/project.gradle b/project.gradle index 6830ebbb1..3d2665129 100644 --- a/project.gradle +++ b/project.gradle @@ -21,7 +21,7 @@ * Project-specific settings. Unfortunately we cannot put the name in there! */ group = "com.github.java-json-tools"; -version = "2.2.14-SNAPSHOT"; +version = "2.2.14"; sourceCompatibility = JavaVersion.VERSION_1_7; targetCompatibility = JavaVersion.VERSION_1_7; // defaults to sourceCompatibility @@ -34,8 +34,8 @@ project.ext { */ dependencies { compile(group: "com.google.guava", name: "guava", version: "28.2-android"); - compile(group: "com.github.java-json-tools", name: "jackson-coreutils-equivalence", version: "1.0-SNAPSHOT"); - compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.14-SNAPSHOT"); + compile(group: "com.github.java-json-tools", name: "jackson-coreutils-equivalence", version: "1.0"); + compile(group: "com.github.java-json-tools", name: "json-schema-core", version: "1.2.14"); // FIXME: 1.6.4 exists, but has different license (EDL 1.0, EPL 2.0). Can update? compile(group: "com.sun.mail", name: "mailapi", version: "1.6.2"); compile(group: "joda-time", name: "joda-time", version: "2.10.5"); From 09cf878a50ca184a7a5d7b4ceeea807c0ddb1299 Mon Sep 17 00:00:00 2001 From: "Sean C. Sullivan" Date: Sat, 20 Jun 2020 12:32:57 -0700 Subject: [PATCH 70/71] add Dependabot https://github.blog/2020-06-01-keep-all-your-packages-up-to-date-with-dependabot/ --- .github/dependabot.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..4ace52b34 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "daily" + time: "02:00" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + time: "02:00" From d265c6b15ca47a820de4a9d2f3de3b884c0a4b68 Mon Sep 17 00:00:00 2001 From: Andrew Jorgensen Date: Mon, 28 Sep 2020 17:42:43 -0700 Subject: [PATCH 71/71] Clarify "dual-licensed" (#351) I pulled the additional text directly from #136 where @fge answered the question, "Do I need to abide by both licenses? Or can I pick which one to abide by?" Adding it here in the LICENSE file to help avoid a need for anyone else to dive into closed issues to find the answer. --- LICENSE | 1 + 1 file changed, 1 insertion(+) diff --git a/LICENSE b/LICENSE index 16cda1283..37e25e033 100644 --- a/LICENSE +++ b/LICENSE @@ -6,6 +6,7 @@ This software is dual-licensed under: The text of both licenses is included (under the names LGPL-3.0.txt and ASL-2.0.txt respectively). +Should you choose to redistribute, you can pick either, or continue to dual license. Direct link to the sources:

    link to source code