Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #822 from zalando/ARUHA-1275
Browse files Browse the repository at this point in the history
ARUHA-1275 Upgrade json-schema, take 2
  • Loading branch information
lmontrieux authored Jan 24, 2018
2 parents c7dddbf + d788205 commit ae1eca5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [2.5.5] - 2018-01-23

### Changed
- Updated json-schema validation library

## [2.5.4] - 2018-01-18

### Added
Expand Down
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ if (project.hasProperty('dockerFile')) {

repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}

sourceSets {
Expand Down Expand Up @@ -158,15 +159,15 @@ dependencies {
compile 'org.apache.curator:curator-recipes:2.12.0'

// json
compile 'org.everit.json:org.everit.json.schema:1.5.1'
compile 'com.github.everit-org.json-schema:org.everit.json.schema:86c29435e43e3e56924cf6ddf3013b5a381930b6'
compile ('com.fasterxml.jackson.datatype:jackson-datatype-json-org:2.8.8') {
exclude module: "json"
}
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.8.8'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.8'
compile 'org.zalando:twintip-spring-web:1.1.0'
compile 'com.grack:nanojson:1.2'
compile 'org.json:json:20160810'
compile 'org.json:json:20171018'

// tests
testCompile 'org.hamcrest:hamcrest-all:1.3'
Expand Down
29 changes: 19 additions & 10 deletions src/main/resources/schema.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"id": "http://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Core schema meta-schema",
"definitions": {
"schemaArray": {
Expand All @@ -11,10 +13,7 @@
"minimum": 0
},
"positiveIntegerDefault0": {
"allOf": [
{ "$ref": "#/definitions/positiveInteger" },
{ "default": 0 }
]
"allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
},
"simpleTypes": {
"enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
Expand All @@ -36,8 +35,8 @@
"format": "uri"
},
"$ref": {
"type": "string",
"format": "uri"
"type": "string",
"format": "uri"
},
"title": {
"type": "string"
Expand Down Expand Up @@ -84,10 +83,16 @@
"type": "boolean",
"default": false
},
"contains": { "$ref": "#" },
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
"additionalProperties": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
],
"default": {}
},
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
Expand All @@ -98,6 +103,11 @@
"additionalProperties": { "$ref": "#" },
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"dependencies": {
"type": "object",
"additionalProperties": {
Expand All @@ -107,7 +117,6 @@
]
}
},
"const": {},
"enum": {
"type": "array",
"minItems": 1,
Expand All @@ -129,10 +138,10 @@
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" }
},
"additionalProperties": false,
"dependencies": {
"exclusiveMaximum": [ "maximum" ],
"exclusiveMinimum": [ "minimum" ]
},
"default": {}
"default": {},
"additionalProperties": false
}

0 comments on commit ae1eca5

Please sign in to comment.