Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.12.34] - 2021-06-17

### Fixed
- Suppressed failure during reference resolution.

## [0.12.33] - 2021-05-27

### Fixed
- Disable validation for default and const values.

## [0.12.32] - 2021-05-12

### Fixed
- Suppressed failure during validation in referenced schema.

## [0.12.31] - 2020-09-21

### Fixed
Expand Down Expand Up @@ -68,6 +83,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Export `null` value instead of skipping it for properties having `null` type.

[0.12.34]: https://github.com/swaggest/php-json-schema/compare/v0.12.33...v0.12.34
[0.12.33]: https://github.com/swaggest/php-json-schema/compare/v0.12.32...v0.12.33
[0.12.32]: https://github.com/swaggest/php-json-schema/compare/v0.12.31...v0.12.32
[0.12.31]: https://github.com/swaggest/php-json-schema/compare/v0.12.30...v0.12.31
[0.12.30]: https://github.com/swaggest/php-json-schema/compare/v0.12.29...v0.12.30
[0.12.29]: https://github.com/swaggest/php-json-schema/compare/v0.12.28...v0.12.29
Expand Down
199 changes: 46 additions & 153 deletions spec/json-schema-draft6.json
Original file line number Diff line number Diff line change
@@ -1,154 +1,47 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "http://json-schema.org/draft-06/schema#",
"title": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#" }
},
"nonNegativeInteger": {
"type": "integer",
"minimum": 0
},
"nonNegativeIntegerDefault0": {
"allOf": [
{ "$ref": "#/definitions/nonNegativeInteger" },
{ "default": 0 }
]
},
"simpleTypes": {
"enum": [
"array",
"boolean",
"integer",
"null",
"number",
"object",
"string"
]
},
"stringArray": {
"type": "array",
"items": { "type": "string" },
"uniqueItems": true,
"default": []
}
},
"type": ["object", "boolean"],
"properties": {
"$id": {
"type": "string",
"format": "uri-reference"
},
"$schema": {
"type": "string",
"format": "uri"
},
"$ref": {
"type": "string",
"format": "uri-reference"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"default": {},
"examples": {
"type": "array",
"items": {}
},
"multipleOf": {
"type": "number",
"exclusiveMinimum": 0
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "number"
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "number"
},
"maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
"minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"pattern": {
"type": "string",
"format": "regex"
},
"additionalItems": { "$ref": "#" },
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
],
"default": {}
},
"maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
"minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"uniqueItems": {
"type": "boolean",
"default": false
},
"contains": { "$ref": "#" },
"maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
"minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
"required": { "$ref": "#/definitions/stringArray" },
"additionalProperties": { "$ref": "#" },
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"default": {}
},
"dependencies": {
"type": "object",
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/stringArray" }
]
}
},
"propertyNames": { "$ref": "#" },
"const": {},
"enum": {
"type": "array",
"minItems": 1,
"uniqueItems": true
},
"type": {
"anyOf": [
{ "$ref": "#/definitions/simpleTypes" },
{
"type": "array",
"items": { "$ref": "#/definitions/simpleTypes" },
"minItems": 1,
"uniqueItems": true
}
]
},
"format": { "type": "string" },
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" }
},
"default": {}
}
"$schema":"http://json-schema.org/draft-06/schema#",
"$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema",
"definitions":{
"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},
"nonNegativeInteger":{"type":"integer","minimum":0},
"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},
"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},
"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}
},
"type":["object","boolean"],
"properties":{
"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},
"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},
"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},
"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},
"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},
"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},
"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},
"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},
"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},
"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},
"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},
"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},
"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},
"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},
"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},
"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},
"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},
"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},
"dependencies":{
"type":"object",
"additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}
},
"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},
"type":{
"anyOf":[
{"$ref":"#/definitions/simpleTypes"},
{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}
]
},
"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},
"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},
"not":{"$ref":"#"}
},
"default":{}
}
Loading