diff --git a/Nut.toml b/Nut.toml index a5a1f71a..e74e08ef 100644 --- a/Nut.toml +++ b/Nut.toml @@ -23,3 +23,4 @@ authors = [ "github.com/ThomsonReutersEikon/go-ntlm/ntlm" = "52b7efa603f1b809167b528b8bbaa467e36fdc02" "github.com/technoweenie/assert" = "b25ea301d127043ffacf3b2545726e79b6632139" "github.com/technoweenie/go-contentaddressable" = "38171def3cd15e3b76eb156219b3d48704643899" +"github.com/xeipuuv/gojsonschema" = "d5336c75940ef31c9ceeb0ae64cf92944bccb4ee" diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/.gitignore b/vendor/_nuts/github.com/xeipuuv/gojsonschema/.gitignore new file mode 100644 index 00000000..c1e0636f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/.gitignore @@ -0,0 +1 @@ +*.sw[nop] diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/.travis.yml b/vendor/_nuts/github.com/xeipuuv/gojsonschema/.travis.yml new file mode 100644 index 00000000..9cc01e8a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/.travis.yml @@ -0,0 +1,7 @@ +language: go +go: + - 1.3 +before_install: + - go get github.com/sigu-399/gojsonreference + - go get github.com/sigu-399/gojsonpointer + - go get github.com/stretchr/testify/assert diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/LICENSE-APACHE-2.0.txt b/vendor/_nuts/github.com/xeipuuv/gojsonschema/LICENSE-APACHE-2.0.txt new file mode 100644 index 00000000..55ede8a4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/LICENSE-APACHE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 xeipuuv + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/README.md b/vendor/_nuts/github.com/xeipuuv/gojsonschema/README.md new file mode 100644 index 00000000..187da61e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/README.md @@ -0,0 +1,236 @@ +[![Build Status](https://travis-ci.org/xeipuuv/gojsonschema.svg)](https://travis-ci.org/xeipuuv/gojsonschema) + +# gojsonschema + +## Description + +An implementation of JSON Schema, based on IETF's draft v4 - Go language + +References : + +* http://json-schema.org +* http://json-schema.org/latest/json-schema-core.html +* http://json-schema.org/latest/json-schema-validation.html + +## Installation + +``` +go get github.com/xeipuuv/gojsonschema +``` + +Dependencies : +* [github.com/xeipuuv/gojsonpointer](https://github.com/xeipuuv/gojsonpointer) +* [github.com/xeipuuv/gojsonreference](https://github.com/xeipuuv/gojsonreference) +* [github.com/stretchr/testify/assert](https://github.com/stretchr/testify#assert-package) + +## Usage + +### Example + +```go + +package main + +import ( + "fmt" + "github.com/xeipuuv/gojsonschema" +) + +func main() { + + schemaLoader := gojsonschema.NewReferenceLoader("file:///home/me/schema.json") + documentLoader := gojsonschema.NewReferenceLoader("file:///home/me/document.json") + + result, err := gojsonschema.Validate(schemaLoader, documentLoader) + if err != nil { + panic(err.Error()) + } + + if result.Valid() { + fmt.Printf("The document is valid\n") + } else { + fmt.Printf("The document is not valid. see errors :\n") + for _, desc := range result.Errors() { + fmt.Printf("- %s\n", desc) + } + } + +} + + +``` + +#### Loaders + +There are various ways to load your JSON data. +In order to load your schemas and documents, +first declare an appropriate loader : + +* Web / HTTP, using a reference : + +```go +loader := gojsonschema.NewReferenceLoader("http://www.some_host.com/schema.json") +``` + +* Local file, using a reference : + +```go +loader := gojsonschema.NewReferenceLoader("file:///home/me/schema.json") +``` + +References use the URI scheme, the prefix (file://) and a full path to the file are required. + +* JSON strings : + +```go +loader := gojsonschema.NewStringLoader(`{"type": "string"}`) +``` + +* Custom Go types : + +```go +m := map[string]interface{}{"type": "string"} +loader := gojsonschema.NewGoLoader(m) +``` + +And + +```go +type Root struct { + Users []User `json:"users"` +} + +type User struct { + Name string `json:"name"` +} + +... + +data := Root{} +data.Users = append(data.Users, User{"John"}) +data.Users = append(data.Users, User{"Sophia"}) +data.Users = append(data.Users, User{"Bill"}) + +loader := gojsonschema.NewGoLoader(data) +``` + +#### Validation + +Once the loaders are set, validation is easy : + +```go +result, err := gojsonschema.Validate(schemaLoader, documentLoader) +``` + +Alternatively, you might want to load a schema only once and process to multiple validations : + +```go +schema, err := gojsonschema.NewSchema(schemaLoader) +... +result1, err := schema.Validate(documentLoader1) +... +result2, err := schema.Validate(documentLoader2) +... +// etc ... +``` + +To check the result : + +```go + if result.Valid() { + fmt.Printf("The document is valid\n") + } else { + fmt.Printf("The document is not valid. see errors :\n") + for _, err := range result.Errors() { + // Err implements the ResultError interface + fmt.Printf("- %s\n", err) + } + } +``` + +## Working with Errors + +The library handles string error codes which you can customize by creating your own gojsonschema.locale and setting it +```go +gojsonschema.Locale = YourCustomLocale{} +``` + +However, each error contains additional contextual information. + +**err.Type()**: *string* Returns the "type" of error that occurred. Note you can also type check. See below + +Note: An error of RequiredType has an err.Type() return value of "required" + + "required": RequiredError + "invalid_type": InvalidTypeError + "number_any_of": NumberAnyOfError + "number_one_of": NumberOneOfError + "number_all_of": NumberAllOfError + "number_not": NumberNotError + "missing_dependency": MissingDependencyError + "internal": InternalError + "enum": EnumError + "array_no_additional_items": ArrayNoAdditionalItemsError + "array_min_items": ArrayMinItemsError + "array_max_items": ArrayMaxItemsError + "unique": ItemsMustBeUniqueError + "array_min_properties": ArrayMinPropertiesError + "array_max_properties": ArrayMaxPropertiesError + "additional_property_not_allowed": AdditionalPropertyNotAllowedError + "invalid_property_pattern": InvalidPropertyPatternError + "string_gte": StringLengthGTEError + "string_lte": StringLengthLTEError + "pattern": DoesNotMatchPatternError + "multiple_of": MultipleOfError + "number_gte": NumberGTEError + "number_gt": NumberGTError + "number_lte": NumberLTEError + "number_lt": NumberLTError + +**err.Value()**: *interface{}* Returns the value given + +**err.Context()**: *gojsonschema.jsonContext* Returns the context. This has a String() method that will print something like this: (root).firstName + +**err.Field()**: *string* Returns the fieldname in the format firstName, or for embedded properties, person.firstName. This returns the same as the String() method on *err.Context()* but removes the (root). prefix. + +**err.Description()**: *string* The error description. This is based on the locale you are using. See the beginning of this section for overwriting the locale with a custom implementation. + +**err.Details()**: *gojsonschema.ErrorDetails* Returns a map[string]interface{} of additional error details specific to the error. For example, GTE errors will have a "min" value, LTE will have a "max" value. See errors.go for a full description of all the error details. Every error always contains a "field" key that holds the value of *err.Field()* + +Note in most cases, the err.Details() will be used to generate replacement strings in your locales. and not used directly i.e. +``` +%field% must be greater than or equal to %min% +``` + +## Formats +JSON Schema allows for optional "format" property to validate strings against well-known formats. gojsonschema ships with all of the formats defined in the spec that you can use like this: +````json +{"type": "string", "format": "email"} +```` +Available formats: date-time, hostname, email, ipv4, ipv6, uri. + +For repetitive or more complex formats, you can create custom format checkers and add them to gojsonschema like this: + +```go +// Define the format checker +type RoleFormatChecker struct {} + +// Ensure it meets the gojsonschema.FormatChecker interface +func (f RoleFormatChecker) IsFormat(input string) bool { + return strings.HasPrefix("ROLE_", input) +} + +// Add it to the library +gojsonschema.FormatCheckers.Add("role", RoleFormatChecker{}) +```` + +Now to use in your json schema: +````json +{"type": "string", "format": "role"} +```` + +## Uses + +gojsonschema uses the following test suite : + +https://github.com/json-schema/JSON-Schema-Test-Suite diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/errors.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/errors.go new file mode 100644 index 00000000..5146cbba --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/errors.go @@ -0,0 +1,242 @@ +package gojsonschema + +import ( + "fmt" + "strings" +) + +type ( + // RequiredError. ErrorDetails: property string + RequiredError struct { + ResultErrorFields + } + + // InvalidTypeError. ErrorDetails: expected, given + InvalidTypeError struct { + ResultErrorFields + } + + // NumberAnyOfError. ErrorDetails: - + NumberAnyOfError struct { + ResultErrorFields + } + + // NumberOneOfError. ErrorDetails: - + NumberOneOfError struct { + ResultErrorFields + } + + // NumberAllOfError. ErrorDetails: - + NumberAllOfError struct { + ResultErrorFields + } + + // NumberNotError. ErrorDetails: - + NumberNotError struct { + ResultErrorFields + } + + // MissingDependencyError. ErrorDetails: dependency + MissingDependencyError struct { + ResultErrorFields + } + + // InternalError. ErrorDetails: error + InternalError struct { + ResultErrorFields + } + + // EnumError. ErrorDetails: allowed + EnumError struct { + ResultErrorFields + } + + // ArrayNoAdditionalItemsError. ErrorDetails: - + ArrayNoAdditionalItemsError struct { + ResultErrorFields + } + + // ArrayMinItemsError. ErrorDetails: min + ArrayMinItemsError struct { + ResultErrorFields + } + + // ArrayMaxItemsError. ErrorDetails: max + ArrayMaxItemsError struct { + ResultErrorFields + } + + // ItemsMustBeUniqueError. ErrorDetails: type + ItemsMustBeUniqueError struct { + ResultErrorFields + } + + // ArrayMinPropertiesError. ErrorDetails: min + ArrayMinPropertiesError struct { + ResultErrorFields + } + + // ArrayMaxPropertiesError. ErrorDetails: max + ArrayMaxPropertiesError struct { + ResultErrorFields + } + + // AdditionalPropertyNotAllowedError. ErrorDetails: property + AdditionalPropertyNotAllowedError struct { + ResultErrorFields + } + + // InvalidPropertyPatternError. ErrorDetails: property, pattern + InvalidPropertyPatternError struct { + ResultErrorFields + } + + // StringLengthGTEError. ErrorDetails: min + StringLengthGTEError struct { + ResultErrorFields + } + + // StringLengthLTEError. ErrorDetails: max + StringLengthLTEError struct { + ResultErrorFields + } + + // DoesNotMatchPatternError. ErrorDetails: pattern + DoesNotMatchPatternError struct { + ResultErrorFields + } + + // DoesNotMatchFormatError. ErrorDetails: format + DoesNotMatchFormatError struct { + ResultErrorFields + } + + // MultipleOfError. ErrorDetails: multiple + MultipleOfError struct { + ResultErrorFields + } + + // NumberGTEError. ErrorDetails: min + NumberGTEError struct { + ResultErrorFields + } + + // NumberGTError. ErrorDetails: min + NumberGTError struct { + ResultErrorFields + } + + // NumberLTEError. ErrorDetails: max + NumberLTEError struct { + ResultErrorFields + } + + // NumberLTError. ErrorDetails: max + NumberLTError struct { + ResultErrorFields + } +) + +// newError takes a ResultError type and sets the type, context, description, details, value, and field +func newError(err ResultError, context *jsonContext, value interface{}, locale locale, details ErrorDetails) { + var t string + var d string + switch err.(type) { + case *RequiredError: + t = "required" + d = locale.Required() + case *InvalidTypeError: + t = "invalid_type" + d = locale.InvalidType() + case *NumberAnyOfError: + t = "number_any_of" + d = locale.NumberAnyOf() + case *NumberOneOfError: + t = "number_one_of" + d = locale.NumberOneOf() + case *NumberAllOfError: + t = "number_all_of" + d = locale.NumberAllOf() + case *NumberNotError: + t = "number_not" + d = locale.NumberNot() + case *MissingDependencyError: + t = "missing_dependency" + d = locale.MissingDependency() + case *InternalError: + t = "internal" + d = locale.Internal() + case *EnumError: + t = "enum" + d = locale.Enum() + case *ArrayNoAdditionalItemsError: + t = "array_no_additional_items" + d = locale.ArrayNoAdditionalItems() + case *ArrayMinItemsError: + t = "array_min_items" + d = locale.ArrayMinItems() + case *ArrayMaxItemsError: + t = "array_max_items" + d = locale.ArrayMaxItems() + case *ItemsMustBeUniqueError: + t = "unique" + d = locale.Unique() + case *ArrayMinPropertiesError: + t = "array_min_properties" + d = locale.ArrayMinProperties() + case *ArrayMaxPropertiesError: + t = "array_max_properties" + d = locale.ArrayMaxProperties() + case *AdditionalPropertyNotAllowedError: + t = "additional_property_not_allowed" + d = locale.AdditionalPropertyNotAllowed() + case *InvalidPropertyPatternError: + t = "invalid_property_pattern" + d = locale.InvalidPropertyPattern() + case *StringLengthGTEError: + t = "string_gte" + d = locale.StringGTE() + case *StringLengthLTEError: + t = "string_lte" + d = locale.StringLTE() + case *DoesNotMatchPatternError: + t = "pattern" + d = locale.DoesNotMatchPattern() + case *DoesNotMatchFormatError: + t = "format" + d = locale.DoesNotMatchFormat() + case *MultipleOfError: + t = "multiple_of" + d = locale.MultipleOf() + case *NumberGTEError: + t = "number_gte" + d = locale.NumberGTE() + case *NumberGTError: + t = "number_gt" + d = locale.NumberGT() + case *NumberLTEError: + t = "number_lte" + d = locale.NumberLTE() + case *NumberLTError: + t = "number_lt" + d = locale.NumberLT() + } + + err.SetType(t) + err.SetContext(context) + err.SetValue(value) + err.SetDetails(details) + details["field"] = err.Field() + err.SetDescription(formatErrorDescription(d, details)) +} + +// formatErrorDescription takes a string in this format: %field% is required +// and converts it to a string with replacements. The fields come from +// the ErrorDetails struct and vary for each type of error. +func formatErrorDescription(s string, details ErrorDetails) string { + for name, val := range details { + s = strings.Replace(s, "%"+strings.ToLower(name)+"%", fmt.Sprintf("%v", val), -1) + } + + return s +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/format_checkers.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/format_checkers.go new file mode 100644 index 00000000..b91c360a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/format_checkers.go @@ -0,0 +1,178 @@ +package gojsonschema + +import ( + "net" + "net/url" + "reflect" + "regexp" + "strings" + "time" +) + +type ( + // FormatChecker is the interface all formatters added to FormatCheckerChain must implement + FormatChecker interface { + IsFormat(input string) bool + } + + // FormatCheckerChain holds the formatters + FormatCheckerChain struct { + formatters map[string]FormatChecker + } + + // EmailFormatter verifies email address formats + EmailFormatChecker struct{} + + // IPV4FormatChecker verifies IP addresses in the ipv4 format + IPV4FormatChecker struct{} + + // IPV6FormatChecker verifies IP addresses in the ipv6 format + IPV6FormatChecker struct{} + + // DateTimeFormatChecker verifies date/time formats per RFC3339 5.6 + // + // Valid formats: + // Partial Time: HH:MM:SS + // Full Date: YYYY-MM-DD + // Full Time: HH:MM:SSZ-07:00 + // Date Time: YYYY-MM-DDTHH:MM:SSZ-0700 + // + // Where + // YYYY = 4DIGIT year + // MM = 2DIGIT month ; 01-12 + // DD = 2DIGIT day-month ; 01-28, 01-29, 01-30, 01-31 based on month/year + // HH = 2DIGIT hour ; 00-23 + // MM = 2DIGIT ; 00-59 + // SS = 2DIGIT ; 00-58, 00-60 based on leap second rules + // T = Literal + // Z = Literal + // + // Note: Nanoseconds are also suported in all formats + // + // http://tools.ietf.org/html/rfc3339#section-5.6 + DateTimeFormatChecker struct{} + + // URIFormatCheckers validates a URI with a valid Scheme per RFC3986 + URIFormatChecker struct{} + + // HostnameFormatChecker validates a hostname is in the correct format + HostnameFormatChecker struct{} + + // UUIDFormatChecker validates a UUID is in the correct format + UUIDFormatChecker struct{} +) + +var ( + // Formatters holds the valid formatters, and is a public variable + // so library users can add custom formatters + FormatCheckers = FormatCheckerChain{ + formatters: map[string]FormatChecker{ + "date-time": DateTimeFormatChecker{}, + "hostname": HostnameFormatChecker{}, + "email": EmailFormatChecker{}, + "ipv4": IPV4FormatChecker{}, + "ipv6": IPV6FormatChecker{}, + "uri": URIFormatChecker{}, + "uuid": UUIDFormatChecker{}, + }, + } + + // Regex credit: https://github.com/asaskevich/govalidator + rxEmail = regexp.MustCompile("^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|\\d|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.)+(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])|(([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])([a-zA-Z]|\\d|-|\\.|_|~|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])*([a-zA-Z]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])))\\.?$") + + // Regex credit: https://www.socketloop.com/tutorials/golang-validate-hostname + rxHostname = regexp.MustCompile(`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$`) + + rxUUID = regexp.MustCompile("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$") +) + +// Add adds a FormatChecker to the FormatCheckerChain +// The name used will be the value used for the format key in your json schema +func (c *FormatCheckerChain) Add(name string, f FormatChecker) *FormatCheckerChain { + c.formatters[name] = f + + return c +} + +// Remove deletes a FormatChecker from the FormatCheckerChain (if it exists) +func (c *FormatCheckerChain) Remove(name string) *FormatCheckerChain { + delete(c.formatters, name) + + return c +} + +// Has checks to see if the FormatCheckerChain holds a FormatChecker with the given name +func (c *FormatCheckerChain) Has(name string) bool { + _, ok := c.formatters[name] + + return ok +} + +// IsFormat will check an input against a FormatChecker with the given name +// to see if it is the correct format +func (c *FormatCheckerChain) IsFormat(name string, input interface{}) bool { + f, ok := c.formatters[name] + + if !ok { + return false + } + + if !isKind(input, reflect.String) { + return false + } + + inputString := input.(string) + + return f.IsFormat(inputString) +} + +func (f EmailFormatChecker) IsFormat(input string) bool { + return rxEmail.MatchString(input) +} + +// Credit: https://github.com/asaskevich/govalidator +func (f IPV4FormatChecker) IsFormat(input string) bool { + ip := net.ParseIP(input) + return ip != nil && strings.Contains(input, ".") +} + +// Credit: https://github.com/asaskevich/govalidator +func (f IPV6FormatChecker) IsFormat(input string) bool { + ip := net.ParseIP(input) + return ip != nil && strings.Contains(input, ":") +} + +func (f DateTimeFormatChecker) IsFormat(input string) bool { + formats := []string{ + "15:04:05", + "15:04:05Z07:00", + "2006-01-02", + time.RFC3339, + time.RFC3339Nano, + } + + for _, format := range formats { + if _, err := time.Parse(format, input); err == nil { + return true + } + } + + return false +} + +func (f URIFormatChecker) IsFormat(input string) bool { + u, err := url.Parse(input) + if err != nil || u.Scheme == "" { + return false + } + + return true +} + +func (f HostnameFormatChecker) IsFormat(input string) bool { + return rxHostname.MatchString(input) && len(input) < 256 +} + +func (f UUIDFormatChecker) IsFormat(input string) bool { + return rxUUID.MatchString(input) +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/format_checkers_test.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/format_checkers_test.go new file mode 100644 index 00000000..04db0e7c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/format_checkers_test.go @@ -0,0 +1,16 @@ +package gojsonschema + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestUUIDFormatCheckerIsFormat(t *testing.T) { + checker := UUIDFormatChecker{} + + assert.True(t, checker.IsFormat("01234567-89ab-cdef-0123-456789abcdef")) + assert.True(t, checker.IsFormat("f1234567-89ab-cdef-0123-456789abcdef")) + + assert.False(t, checker.IsFormat("not-a-uuid")) + assert.False(t, checker.IsFormat("g1234567-89ab-cdef-0123-456789abcdef")) +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/glide.yaml b/vendor/_nuts/github.com/xeipuuv/gojsonschema/glide.yaml new file mode 100644 index 00000000..7aef8c09 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/glide.yaml @@ -0,0 +1,12 @@ +package: github.com/xeipuuv/gojsonschema +license: Apache 2.0 +import: +- package: github.com/xeipuuv/gojsonschema + +- package: github.com/xeipuuv/gojsonpointer + +- package: github.com/xeipuuv/gojsonreference + +- package: github.com/stretchr/testify/assert + version: ^1.1.3 + diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/internalLog.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/internalLog.go new file mode 100644 index 00000000..4ef7a8d0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/internalLog.go @@ -0,0 +1,37 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Very simple log wrapper. +// Used for debugging/testing purposes. +// +// created 01-01-2015 + +package gojsonschema + +import ( + "log" +) + +const internalLogEnabled = false + +func internalLog(format string, v ...interface{}) { + log.Printf(format, v...) +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/jsonContext.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/jsonContext.go new file mode 100644 index 00000000..fcc8d9d6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/jsonContext.go @@ -0,0 +1,72 @@ +// Copyright 2013 MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author tolsen +// author-github https://github.com/tolsen +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Implements a persistent (immutable w/ shared structure) singly-linked list of strings for the purpose of storing a json context +// +// created 04-09-2013 + +package gojsonschema + +import "bytes" + +// jsonContext implements a persistent linked-list of strings +type jsonContext struct { + head string + tail *jsonContext +} + +func newJsonContext(head string, tail *jsonContext) *jsonContext { + return &jsonContext{head, tail} +} + +// String displays the context in reverse. +// This plays well with the data structure's persistent nature with +// Cons and a json document's tree structure. +func (c *jsonContext) String(del ...string) string { + byteArr := make([]byte, 0, c.stringLen()) + buf := bytes.NewBuffer(byteArr) + c.writeStringToBuffer(buf, del) + + return buf.String() +} + +func (c *jsonContext) stringLen() int { + length := 0 + if c.tail != nil { + length = c.tail.stringLen() + 1 // add 1 for "." + } + + length += len(c.head) + return length +} + +func (c *jsonContext) writeStringToBuffer(buf *bytes.Buffer, del []string) { + if c.tail != nil { + c.tail.writeStringToBuffer(buf, del) + + if len(del) > 0 { + buf.WriteString(del[0]) + } else { + buf.WriteString(".") + } + } + + buf.WriteString(c.head) +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/jsonLoader.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/jsonLoader.go new file mode 100644 index 00000000..0b405747 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/jsonLoader.go @@ -0,0 +1,314 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Different strategies to load JSON files. +// Includes References (file and HTTP), JSON strings and Go types. +// +// created 01-02-2015 + +package gojsonschema + +import ( + "bytes" + "encoding/json" + "errors" + "io" + "io/ioutil" + "net/http" + "os" + "path/filepath" + "runtime" + "strings" + + "github.com/xeipuuv/gojsonreference" +) + +var osFS = osFileSystem(os.Open) + +// JSON loader interface + +type JSONLoader interface { + jsonSource() interface{} + loadJSON() (interface{}, error) + loadSchema() (*Schema, error) +} + +// osFileSystem is a functional wrapper for os.Open that implements http.FileSystem. +type osFileSystem func(string) (*os.File, error) + +func (o osFileSystem) Open(name string) (http.File, error) { + return o(name) +} + +// JSON Reference loader +// references are used to load JSONs from files and HTTP + +type jsonReferenceLoader struct { + fs http.FileSystem + source string +} + +func (l *jsonReferenceLoader) jsonSource() interface{} { + return l.source +} + +// NewReferenceLoader returns a JSON reference loader using the given source and the local OS file system. +func NewReferenceLoader(source string) *jsonReferenceLoader { + return &jsonReferenceLoader{ + fs: osFS, + source: source, + } +} + +// NewReferenceLoaderFileSystem returns a JSON reference loader using the given source and file system. +func NewReferenceLoaderFileSystem(source string, fs http.FileSystem) *jsonReferenceLoader { + return &jsonReferenceLoader{ + fs: fs, + source: source, + } +} + +func (l *jsonReferenceLoader) loadJSON() (interface{}, error) { + + var err error + + reference, err := gojsonreference.NewJsonReference(l.jsonSource().(string)) + if err != nil { + return nil, err + } + + refToUrl := reference + refToUrl.GetUrl().Fragment = "" + + var document interface{} + + if reference.HasFileScheme { + + filename := strings.Replace(refToUrl.String(), "file://", "", -1) + if runtime.GOOS == "windows" { + // on Windows, a file URL may have an extra leading slash, use slashes + // instead of backslashes, and have spaces escaped + if strings.HasPrefix(filename, "/") { + filename = filename[1:] + } + filename = filepath.FromSlash(filename) + filename = strings.Replace(filename, "%20", " ", -1) + } + + document, err = l.loadFromFile(filename) + if err != nil { + return nil, err + } + + } else { + + document, err = l.loadFromHTTP(refToUrl.String()) + if err != nil { + return nil, err + } + + } + + return document, nil + +} + +func (l *jsonReferenceLoader) loadSchema() (*Schema, error) { + + var err error + + d := Schema{} + d.pool = newSchemaPool(l.fs) + d.referencePool = newSchemaReferencePool() + + d.documentReference, err = gojsonreference.NewJsonReference(l.jsonSource().(string)) + if err != nil { + return nil, err + } + + spd, err := d.pool.GetDocument(d.documentReference) + if err != nil { + return nil, err + } + + err = d.parse(spd.Document) + if err != nil { + return nil, err + } + + return &d, nil + +} + +func (l *jsonReferenceLoader) loadFromHTTP(address string) (interface{}, error) { + + resp, err := http.Get(address) + if err != nil { + return nil, err + } + + // must return HTTP Status 200 OK + if resp.StatusCode != http.StatusOK { + return nil, errors.New(formatErrorDescription(Locale.httpBadStatus(), ErrorDetails{"status": resp.Status})) + } + + bodyBuff, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, err + } + + return decodeJsonUsingNumber(bytes.NewReader(bodyBuff)) + +} + +func (l *jsonReferenceLoader) loadFromFile(path string) (interface{}, error) { + f, err := l.fs.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + + bodyBuff, err := ioutil.ReadAll(f) + if err != nil { + return nil, err + } + + return decodeJsonUsingNumber(bytes.NewReader(bodyBuff)) + +} + +// JSON string loader + +type jsonStringLoader struct { + source string +} + +func (l *jsonStringLoader) jsonSource() interface{} { + return l.source +} + +func NewStringLoader(source string) *jsonStringLoader { + return &jsonStringLoader{source: source} +} + +func (l *jsonStringLoader) loadJSON() (interface{}, error) { + + return decodeJsonUsingNumber(strings.NewReader(l.jsonSource().(string))) + +} + +func (l *jsonStringLoader) loadSchema() (*Schema, error) { + + var err error + + document, err := l.loadJSON() + if err != nil { + return nil, err + } + + d := Schema{} + d.pool = newSchemaPool(osFS) + d.referencePool = newSchemaReferencePool() + d.documentReference, err = gojsonreference.NewJsonReference("#") + d.pool.SetStandaloneDocument(document) + if err != nil { + return nil, err + } + + err = d.parse(document) + if err != nil { + return nil, err + } + + return &d, nil + +} + +// JSON Go (types) loader +// used to load JSONs from the code as maps, interface{}, structs ... + +type jsonGoLoader struct { + source interface{} +} + +func (l *jsonGoLoader) jsonSource() interface{} { + return l.source +} + +func NewGoLoader(source interface{}) *jsonGoLoader { + return &jsonGoLoader{source: source} +} + +func (l *jsonGoLoader) loadJSON() (interface{}, error) { + + // convert it to a compliant JSON first to avoid types "mismatches" + + jsonBytes, err := json.Marshal(l.jsonSource()) + if err != nil { + return nil, err + } + + return decodeJsonUsingNumber(bytes.NewReader(jsonBytes)) + +} + +func (l *jsonGoLoader) loadSchema() (*Schema, error) { + + var err error + + document, err := l.loadJSON() + if err != nil { + return nil, err + } + + d := Schema{} + d.pool = newSchemaPool(osFS) + d.referencePool = newSchemaReferencePool() + d.documentReference, err = gojsonreference.NewJsonReference("#") + d.pool.SetStandaloneDocument(document) + if err != nil { + return nil, err + } + + err = d.parse(document) + if err != nil { + return nil, err + } + + return &d, nil + +} + +func decodeJsonUsingNumber(r io.Reader) (interface{}, error) { + + var document interface{} + + decoder := json.NewDecoder(r) + decoder.UseNumber() + + err := decoder.Decode(&document) + if err != nil { + return nil, err + } + + return document, nil + +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/LICENSE b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/LICENSE new file mode 100644 index 00000000..c28adbad --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Julian Berman + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_00.json new file mode 100644 index 00000000..5cb29f91 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_00.json @@ -0,0 +1 @@ +[null,2,3,4] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_01.json new file mode 100644 index 00000000..4eb0d32f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_01.json @@ -0,0 +1 @@ +[null,2,3,"foo"] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_10.json new file mode 100644 index 00000000..e77ca8d9 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_10.json @@ -0,0 +1 @@ +[1,2,3,4,5] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_20.json new file mode 100644 index 00000000..3a26a2e5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_20.json @@ -0,0 +1 @@ +[1,2,3] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_21.json new file mode 100644 index 00000000..fde6c1d7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_21.json @@ -0,0 +1 @@ +[1,2,3,4] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_30.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_30.json new file mode 100644 index 00000000..e77ca8d9 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_30.json @@ -0,0 +1 @@ +[1,2,3,4,5] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_31.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_31.json new file mode 100644 index 00000000..9f5dd4e3 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_31.json @@ -0,0 +1 @@ +{"foo":"bar"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_40.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_40.json new file mode 100644 index 00000000..327fe850 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/data_40.json @@ -0,0 +1 @@ +[1,"foo",false] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_0.json new file mode 100644 index 00000000..75a4b7e0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_0.json @@ -0,0 +1 @@ +{"additionalItems":{"type":"integer"},"items":[{}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_1.json new file mode 100644 index 00000000..d5046a9c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_1.json @@ -0,0 +1 @@ +{"additionalItems":false,"items":{}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_2.json new file mode 100644 index 00000000..6ab20de2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_2.json @@ -0,0 +1 @@ +{"additionalItems":false,"items":[{},{},{}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_3.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_3.json new file mode 100644 index 00000000..f04aaf84 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_3.json @@ -0,0 +1 @@ +{"additionalItems":false} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_4.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_4.json new file mode 100644 index 00000000..fff26f85 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalItems/schema_4.json @@ -0,0 +1 @@ +{"items":[{"type":"integer"}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_00.json new file mode 100644 index 00000000..2518e687 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_00.json @@ -0,0 +1 @@ +{"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_01.json new file mode 100644 index 00000000..513d61fb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_01.json @@ -0,0 +1 @@ +{"bar":2,"foo":1,"quux":"boom"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_02.json new file mode 100644 index 00000000..3a26a2e5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_02.json @@ -0,0 +1 @@ +[1,2,3] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_03.json new file mode 100644 index 00000000..65a158df --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_03.json @@ -0,0 +1 @@ +{"foo":1, "vroom": 2} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_10.json new file mode 100644 index 00000000..2518e687 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_10.json @@ -0,0 +1 @@ +{"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_11.json new file mode 100644 index 00000000..2129e620 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_11.json @@ -0,0 +1 @@ +{"bar":2,"foo":1,"quux":true} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_12.json new file mode 100644 index 00000000..ce7708b1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_12.json @@ -0,0 +1 @@ +{"bar":2,"foo":1,"quux":12} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_20.json new file mode 100644 index 00000000..2129e620 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/data_20.json @@ -0,0 +1 @@ +{"bar":2,"foo":1,"quux":true} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/schema_0.json new file mode 100644 index 00000000..99d0ef4f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/schema_0.json @@ -0,0 +1 @@ +{"additionalProperties":false,"properties":{"bar":{},"foo":{}},"patternProperties": { "^v": {} }} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/schema_1.json new file mode 100644 index 00000000..b55c0924 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/schema_1.json @@ -0,0 +1 @@ +{"additionalProperties":{"type":"boolean"},"properties":{"bar":{},"foo":{}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/schema_2.json new file mode 100644 index 00000000..4d0bc3a9 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/additionalProperties/schema_2.json @@ -0,0 +1 @@ +{"properties":{"bar":{},"foo":{}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_00.json new file mode 100644 index 00000000..7973c0ac --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_00.json @@ -0,0 +1 @@ +{"bar":2,"foo":"baz"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_01.json new file mode 100644 index 00000000..62aa0a13 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_01.json @@ -0,0 +1 @@ +{"foo":"baz"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_02.json new file mode 100644 index 00000000..70eef88e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_02.json @@ -0,0 +1 @@ +{"bar":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_03.json new file mode 100644 index 00000000..54c2b0b0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_03.json @@ -0,0 +1 @@ +{"bar":"quux","foo":"baz"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_10.json new file mode 100644 index 00000000..fa13a378 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_10.json @@ -0,0 +1 @@ +{"bar":2,"baz":null,"foo":"quux"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_11.json new file mode 100644 index 00000000..366679e8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_11.json @@ -0,0 +1 @@ +{"baz":null,"foo":"quux"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_12.json new file mode 100644 index 00000000..e8f534ad --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_12.json @@ -0,0 +1 @@ +{"bar":2,"baz":null} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_13.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_13.json new file mode 100644 index 00000000..6fbe1984 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_13.json @@ -0,0 +1 @@ +{"bar":2,"foo":"quux"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_14.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_14.json new file mode 100644 index 00000000..70eef88e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_14.json @@ -0,0 +1 @@ +{"bar":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_20.json new file mode 100644 index 00000000..410b14d2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_20.json @@ -0,0 +1 @@ +25 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_21.json new file mode 100644 index 00000000..597975b4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/data_21.json @@ -0,0 +1 @@ +35 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/schema_0.json new file mode 100644 index 00000000..13b607a4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/schema_0.json @@ -0,0 +1 @@ +{"allOf":[{"properties":{"bar":{"type":"integer"}},"required":["bar"]},{"properties":{"foo":{"type":"string"}},"required":["foo"]}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/schema_1.json new file mode 100644 index 00000000..f618c0b2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/schema_1.json @@ -0,0 +1 @@ +{"allOf":[{"properties":{"foo":{"type":"string"}},"required":["foo"]},{"properties":{"baz":{"type":"null"}},"required":["baz"]}],"properties":{"bar":{"type":"integer"}},"required":["bar"]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/schema_2.json new file mode 100644 index 00000000..748ee7ef --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/allOf/schema_2.json @@ -0,0 +1 @@ +{"allOf":[{"maximum":30},{"minimum":20}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_00.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_00.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_01.json new file mode 100644 index 00000000..68151b2e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_01.json @@ -0,0 +1 @@ +2.5 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_02.json new file mode 100644 index 00000000..e440e5c8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_02.json @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_03.json new file mode 100644 index 00000000..400122e6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_03.json @@ -0,0 +1 @@ +1.5 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_10.json new file mode 100644 index 00000000..e440e5c8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_10.json @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_11.json new file mode 100644 index 00000000..b2bb988b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_11.json @@ -0,0 +1 @@ +"foobar" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_12.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/data_12.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/schema_0.json new file mode 100644 index 00000000..5540cb8f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/schema_0.json @@ -0,0 +1 @@ +{"anyOf":[{"type":"integer"},{"minimum":2}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/schema_1.json new file mode 100644 index 00000000..cbe387a3 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/anyOf/schema_1.json @@ -0,0 +1 @@ +{"anyOf":[{"maxLength":2},{"minLength":4}],"type":"string"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/data_00.json new file mode 100644 index 00000000..fc7a98bf --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/data_00.json @@ -0,0 +1 @@ +{"definitions":{"foo":{"type":"integer"}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/data_10.json new file mode 100644 index 00000000..5270defb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/data_10.json @@ -0,0 +1 @@ +{"definitions":{"foo":{"type":1}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/schema_0.json new file mode 100644 index 00000000..412c2163 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/schema_0.json @@ -0,0 +1 @@ +{"$ref":"http://json-schema.org/draft-04/schema#"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/schema_1.json new file mode 100644 index 00000000..412c2163 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/definitions/schema_1.json @@ -0,0 +1 @@ +{"$ref":"http://json-schema.org/draft-04/schema#"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_00.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_00.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_01.json new file mode 100644 index 00000000..2518e687 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_01.json @@ -0,0 +1 @@ +{"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_02.json new file mode 100644 index 00000000..b0fcefdb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_02.json @@ -0,0 +1 @@ +{"bar":2,"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_03.json new file mode 100644 index 00000000..70eef88e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_03.json @@ -0,0 +1 @@ +{"bar":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_04.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_04.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_04.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_10.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_10.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_11.json new file mode 100644 index 00000000..b0fcefdb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_11.json @@ -0,0 +1 @@ +{"bar":2,"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_12.json new file mode 100644 index 00000000..2c48cfbe --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_12.json @@ -0,0 +1 @@ +{"bar":2,"foo":1,"quux":3} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_13.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_13.json new file mode 100644 index 00000000..6fe283b3 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_13.json @@ -0,0 +1 @@ +{"foo":1,"quux":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_14.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_14.json new file mode 100644 index 00000000..7bed583b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_14.json @@ -0,0 +1 @@ +{"bar":1,"quux":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_15.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_15.json new file mode 100644 index 00000000..10d82bf9 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_15.json @@ -0,0 +1 @@ +{"quux":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_20.json new file mode 100644 index 00000000..b0fcefdb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_20.json @@ -0,0 +1 @@ +{"bar":2,"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_21.json new file mode 100644 index 00000000..707f7cec --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_21.json @@ -0,0 +1 @@ +{"foo":"quux"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_22.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_22.json new file mode 100644 index 00000000..6fbe1984 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_22.json @@ -0,0 +1 @@ +{"bar":2,"foo":"quux"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_23.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_23.json new file mode 100644 index 00000000..a1637389 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_23.json @@ -0,0 +1 @@ +{"bar":"quux","foo":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_24.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_24.json new file mode 100644 index 00000000..2fee1e31 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/data_24.json @@ -0,0 +1 @@ +{"bar":"quux","foo":"quux"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/schema_0.json new file mode 100644 index 00000000..445985c6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/schema_0.json @@ -0,0 +1 @@ +{"dependencies":{"bar":["foo"]}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/schema_1.json new file mode 100644 index 00000000..1bb5a676 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/schema_1.json @@ -0,0 +1 @@ +{"dependencies":{"quux":["foo","bar"]}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/schema_2.json new file mode 100644 index 00000000..27f97a43 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/dependencies/schema_2.json @@ -0,0 +1 @@ +{"dependencies":{"bar":{"properties":{"bar":{"type":"integer"},"foo":{"type":"integer"}}}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_00.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_00.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_01.json new file mode 100644 index 00000000..bf0d87ab --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_01.json @@ -0,0 +1 @@ +4 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_10.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_10.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_11.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_11.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_12.json new file mode 100644 index 00000000..1bfa80c1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/data_12.json @@ -0,0 +1 @@ +{"foo":false} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/schema_0.json new file mode 100644 index 00000000..240e702e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/schema_0.json @@ -0,0 +1 @@ +{"enum":[1,2,3]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/schema_1.json new file mode 100644 index 00000000..d6b8c5f6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/enum/schema_1.json @@ -0,0 +1 @@ +{"enum":[6,"foo",[],true,{"foo":12}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_00.json new file mode 100644 index 00000000..60bc259b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_00.json @@ -0,0 +1 @@ +"test" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_01.json new file mode 100644 index 00000000..6d9ec401 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_01.json @@ -0,0 +1 @@ +"test@" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_02.json new file mode 100644 index 00000000..6b8674d0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_02.json @@ -0,0 +1 @@ +"test@test.com" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_03.json new file mode 100644 index 00000000..970043c7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_03.json @@ -0,0 +1 @@ +"AB-10105" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_04.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_04.json new file mode 100644 index 00000000..140843fb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_04.json @@ -0,0 +1 @@ +"ABC10105" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_05.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_05.json new file mode 100644 index 00000000..e87a8acd --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_05.json @@ -0,0 +1 @@ +"05:15:37" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_06.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_06.json new file mode 100644 index 00000000..17f91eb8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_06.json @@ -0,0 +1 @@ +"2015-05-13" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_07.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_07.json new file mode 100644 index 00000000..f0218e9a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_07.json @@ -0,0 +1 @@ +"2015-6-31" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_08.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_08.json new file mode 100644 index 00000000..bf9e258b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_08.json @@ -0,0 +1 @@ +"2015-01-30 19:08:06" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_09.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_09.json new file mode 100644 index 00000000..1a57beb5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_09.json @@ -0,0 +1 @@ +"18:31:24-05:00" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_10.json new file mode 100644 index 00000000..00ed4ee1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_10.json @@ -0,0 +1 @@ +"2002-10-02T10:00:00-05:00" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_11.json new file mode 100644 index 00000000..a8f92d50 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_11.json @@ -0,0 +1 @@ +"2002-10-02T15:00:00Z" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_12.json new file mode 100644 index 00000000..0975607f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_12.json @@ -0,0 +1 @@ +"2002-10-02T15:00:00.05Z" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_13.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_13.json new file mode 100644 index 00000000..9f9dacee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_13.json @@ -0,0 +1 @@ +"example.com" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_14.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_14.json new file mode 100644 index 00000000..15a9a873 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_14.json @@ -0,0 +1 @@ +"sub.example.com" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_15.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_15.json new file mode 100644 index 00000000..5c8e9b7b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_15.json @@ -0,0 +1 @@ +"hello.co.uk" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_16.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_16.json new file mode 100644 index 00000000..f5a11ec2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_16.json @@ -0,0 +1 @@ +"http://example.com" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_17.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_17.json new file mode 100644 index 00000000..062bf8cb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_17.json @@ -0,0 +1 @@ +"example_com" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_18.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_18.json new file mode 100644 index 00000000..fd444101 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_18.json @@ -0,0 +1 @@ +"4.2.2.4" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_19.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_19.json new file mode 100644 index 00000000..1e490c63 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_19.json @@ -0,0 +1 @@ +"4.1.1111.45" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_20.json new file mode 100644 index 00000000..28918103 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_20.json @@ -0,0 +1 @@ +"FE80:0000:0000:0000:0202:B3FF:FE1E:8329" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_21.json new file mode 100644 index 00000000..ad20ef3c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_21.json @@ -0,0 +1 @@ +"FE80::0202:B3FF:FE1E:8329" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_22.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_22.json new file mode 100644 index 00000000..97dae8fe --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_22.json @@ -0,0 +1 @@ +"1200::AB00:1234::2552:7777:1313" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_23.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_23.json new file mode 100644 index 00000000..ef38c10e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_23.json @@ -0,0 +1 @@ +"1200:0000:AB00:1234:O000:2552:7777:1313" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_24.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_24.json new file mode 100644 index 00000000..4187b90a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_24.json @@ -0,0 +1 @@ +"ftp://ftp.is.co.za/rfc/rfc1808.txt" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_25.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_25.json new file mode 100644 index 00000000..78168386 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_25.json @@ -0,0 +1 @@ +"mailto:john.doe@example.com" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_26.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_26.json new file mode 100644 index 00000000..df1cfae9 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_26.json @@ -0,0 +1 @@ +"tel:+1-816-555-1212" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_27.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_27.json new file mode 100644 index 00000000..28995ddd --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_27.json @@ -0,0 +1 @@ +"http://www.ietf.org/rfc/rfc2396.txt" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_28.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_28.json new file mode 100644 index 00000000..6b620edf --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/data_28.json @@ -0,0 +1 @@ +"example.com/path/to/file" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_0.json new file mode 100644 index 00000000..b54a202e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_0.json @@ -0,0 +1 @@ +{"type": "string", "format": "email"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_1.json new file mode 100644 index 00000000..7df67118 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_1.json @@ -0,0 +1 @@ +{"type": "string", "format": "invoice"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_2.json new file mode 100644 index 00000000..0dc4b8ff --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_2.json @@ -0,0 +1 @@ +{"type": "string", "format": "date-time"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_3.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_3.json new file mode 100644 index 00000000..d1cf1a05 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_3.json @@ -0,0 +1 @@ +{"type": "string", "format": "hostname"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_4.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_4.json new file mode 100644 index 00000000..8468509f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_4.json @@ -0,0 +1 @@ +{"type": "string", "format": "ipv4"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_5.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_5.json new file mode 100644 index 00000000..ddee8475 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_5.json @@ -0,0 +1 @@ +{"type": "string", "format": "ipv6"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_6.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_6.json new file mode 100644 index 00000000..493546d0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/format/schema_6.json @@ -0,0 +1 @@ +{"type": "string", "format": "uri"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_00.json new file mode 100644 index 00000000..3a26a2e5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_00.json @@ -0,0 +1 @@ +[1,2,3] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_01.json new file mode 100644 index 00000000..084da97d --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_01.json @@ -0,0 +1 @@ +[1,"x"] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_02.json new file mode 100644 index 00000000..9f5dd4e3 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_02.json @@ -0,0 +1 @@ +{"foo":"bar"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_10.json new file mode 100644 index 00000000..f4e52901 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_10.json @@ -0,0 +1 @@ +[1,"foo"] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_11.json new file mode 100644 index 00000000..d68c5004 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/data_11.json @@ -0,0 +1 @@ +["foo",1] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/schema_0.json new file mode 100644 index 00000000..e628c9f8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/schema_0.json @@ -0,0 +1 @@ +{"items":{"type":"integer"}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/schema_1.json new file mode 100644 index 00000000..8b92516d --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/items/schema_1.json @@ -0,0 +1 @@ +{"items":[{"type":"integer"},{"type":"string"}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_00.json new file mode 100644 index 00000000..bace2a0b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_00.json @@ -0,0 +1 @@ +[1] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_01.json new file mode 100644 index 00000000..3169929f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_01.json @@ -0,0 +1 @@ +[1,2] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_02.json new file mode 100644 index 00000000..3a26a2e5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_02.json @@ -0,0 +1 @@ +[1,2,3] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_03.json new file mode 100644 index 00000000..b2bb988b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/data_03.json @@ -0,0 +1 @@ +"foobar" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/schema_0.json new file mode 100644 index 00000000..81cfbcca --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxItems/schema_0.json @@ -0,0 +1 @@ +{"maxItems":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_00.json new file mode 100644 index 00000000..91d1e395 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_00.json @@ -0,0 +1 @@ +"f" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_01.json new file mode 100644 index 00000000..67af23e2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_01.json @@ -0,0 +1 @@ +"fo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_02.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_02.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_03.json new file mode 100644 index 00000000..9a037142 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_03.json @@ -0,0 +1 @@ +10 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_04.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_04.json new file mode 100644 index 00000000..7d62b4d2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/data_04.json @@ -0,0 +1 @@ +"世界" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/schema_0.json new file mode 100644 index 00000000..30a07477 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxLength/schema_0.json @@ -0,0 +1 @@ +{"maxLength":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_00.json new file mode 100644 index 00000000..2518e687 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_00.json @@ -0,0 +1 @@ +{"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_01.json new file mode 100644 index 00000000..b0fcefdb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_01.json @@ -0,0 +1 @@ +{"bar":2,"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_02.json new file mode 100644 index 00000000..bce2e6b6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_02.json @@ -0,0 +1 @@ +{"bar":2,"baz":3,"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_03.json new file mode 100644 index 00000000..b2bb988b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/data_03.json @@ -0,0 +1 @@ +"foobar" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/schema_0.json new file mode 100644 index 00000000..a9d977b6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maxProperties/schema_0.json @@ -0,0 +1 @@ +{"maxProperties":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_00.json new file mode 100644 index 00000000..c20c8ac5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_00.json @@ -0,0 +1 @@ +2.6 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_01.json new file mode 100644 index 00000000..56e972a2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_01.json @@ -0,0 +1 @@ +3.5 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_02.json new file mode 100644 index 00000000..3403a0c7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_02.json @@ -0,0 +1 @@ +"x" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_10.json new file mode 100644 index 00000000..61618788 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_10.json @@ -0,0 +1 @@ +2.2 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_11.json new file mode 100644 index 00000000..e440e5c8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/data_11.json @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/schema_0.json new file mode 100644 index 00000000..e88aefdf --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/schema_0.json @@ -0,0 +1 @@ +{"maximum":3} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/schema_1.json new file mode 100644 index 00000000..b96954dc --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/maximum/schema_1.json @@ -0,0 +1 @@ +{"exclusiveMaximum":true,"maximum":3} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_00.json new file mode 100644 index 00000000..3169929f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_00.json @@ -0,0 +1 @@ +[1,2] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_01.json new file mode 100644 index 00000000..bace2a0b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_01.json @@ -0,0 +1 @@ +[1] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_02.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_02.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_03.json new file mode 100644 index 00000000..3cc762b5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/data_03.json @@ -0,0 +1 @@ +"" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/schema_0.json new file mode 100644 index 00000000..dcfe1c90 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minItems/schema_0.json @@ -0,0 +1 @@ +{"minItems":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_00.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_00.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_01.json new file mode 100644 index 00000000..67af23e2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_01.json @@ -0,0 +1 @@ +"fo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_02.json new file mode 100644 index 00000000..91d1e395 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_02.json @@ -0,0 +1 @@ +"f" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_03.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_03.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_04.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_04.json new file mode 100644 index 00000000..62db65a1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/data_04.json @@ -0,0 +1 @@ +"世" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/schema_0.json new file mode 100644 index 00000000..efc23046 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minLength/schema_0.json @@ -0,0 +1 @@ +{"minLength":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_00.json new file mode 100644 index 00000000..b0fcefdb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_00.json @@ -0,0 +1 @@ +{"bar":2,"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_01.json new file mode 100644 index 00000000..2518e687 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_01.json @@ -0,0 +1 @@ +{"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_02.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_02.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_03.json new file mode 100644 index 00000000..3cc762b5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/data_03.json @@ -0,0 +1 @@ +"" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/schema_0.json new file mode 100644 index 00000000..87b25c2b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minProperties/schema_0.json @@ -0,0 +1 @@ +{"minProperties":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_00.json new file mode 100644 index 00000000..c20c8ac5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_00.json @@ -0,0 +1 @@ +2.6 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_01.json new file mode 100644 index 00000000..490f510f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_01.json @@ -0,0 +1 @@ +0.6 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_02.json new file mode 100644 index 00000000..3403a0c7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_02.json @@ -0,0 +1 @@ +"x" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_10.json new file mode 100644 index 00000000..ea710abb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_10.json @@ -0,0 +1 @@ +1.2 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_11.json new file mode 100644 index 00000000..b123147e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/data_11.json @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/schema_0.json new file mode 100644 index 00000000..0acddfc1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/schema_0.json @@ -0,0 +1 @@ +{"minimum":1.1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/schema_1.json new file mode 100644 index 00000000..e0945a43 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/minimum/schema_1.json @@ -0,0 +1 @@ +{"exclusiveMinimum":true,"minimum":1.1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_00.json new file mode 100644 index 00000000..9a037142 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_00.json @@ -0,0 +1 @@ +10 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_01.json new file mode 100644 index 00000000..c7930257 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_01.json @@ -0,0 +1 @@ +7 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_02.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_02.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_10.json new file mode 100644 index 00000000..c2270834 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_10.json @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_11.json new file mode 100644 index 00000000..958d30d8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_11.json @@ -0,0 +1 @@ +4.5 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_12.json new file mode 100644 index 00000000..597975b4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_12.json @@ -0,0 +1 @@ +35 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_20.json new file mode 100644 index 00000000..136664fd --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_20.json @@ -0,0 +1 @@ +0.0075 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_21.json new file mode 100644 index 00000000..77dfb807 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/data_21.json @@ -0,0 +1 @@ +0.00751 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/schema_0.json new file mode 100644 index 00000000..b51609f2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/schema_0.json @@ -0,0 +1 @@ +{"multipleOf":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/schema_1.json new file mode 100644 index 00000000..2ee79665 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/schema_1.json @@ -0,0 +1 @@ +{"multipleOf":1.5} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/schema_2.json new file mode 100644 index 00000000..de303ef6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/multipleOf/schema_2.json @@ -0,0 +1 @@ +{"multipleOf":0.0001} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_00.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_00.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_01.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_01.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_10.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_10.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_11.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_11.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_12.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_12.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_20.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_20.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_21.json new file mode 100644 index 00000000..2518e687 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_21.json @@ -0,0 +1 @@ +{"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_22.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_22.json new file mode 100644 index 00000000..9f5dd4e3 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/data_22.json @@ -0,0 +1 @@ +{"foo":"bar"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/schema_0.json new file mode 100644 index 00000000..fc125d79 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/schema_0.json @@ -0,0 +1 @@ +{"not":{"type":"integer"}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/schema_1.json new file mode 100644 index 00000000..7f219476 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/schema_1.json @@ -0,0 +1 @@ +{"not":{"type":["integer","boolean"]}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/schema_2.json new file mode 100644 index 00000000..a3f16808 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/not/schema_2.json @@ -0,0 +1 @@ +{"not":{"properties":{"foo":{"type":"string"}},"type":"object"}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_00.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_00.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_01.json new file mode 100644 index 00000000..68151b2e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_01.json @@ -0,0 +1 @@ +2.5 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_02.json new file mode 100644 index 00000000..e440e5c8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_02.json @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_03.json new file mode 100644 index 00000000..400122e6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_03.json @@ -0,0 +1 @@ +1.5 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_10.json new file mode 100644 index 00000000..e440e5c8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_10.json @@ -0,0 +1 @@ +3 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_11.json new file mode 100644 index 00000000..b2bb988b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_11.json @@ -0,0 +1 @@ +"foobar" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_12.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/data_12.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/schema_0.json new file mode 100644 index 00000000..217c51e6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/schema_0.json @@ -0,0 +1 @@ +{"oneOf":[{"type":"integer"},{"minimum":2}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/schema_1.json new file mode 100644 index 00000000..4dae78a5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/oneOf/schema_1.json @@ -0,0 +1 @@ +{"oneOf":[{"minLength":2},{"maxLength":4}],"type":"string"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/data_00.json new file mode 100644 index 00000000..a9cf1d43 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/data_00.json @@ -0,0 +1 @@ +"aaa" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/data_01.json new file mode 100644 index 00000000..4f44a210 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/data_01.json @@ -0,0 +1 @@ +"abc" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/data_02.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/data_02.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/schema_0.json new file mode 100644 index 00000000..47a0a0e2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/pattern/schema_0.json @@ -0,0 +1 @@ +{"pattern":"^a*$"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_00.json new file mode 100644 index 00000000..2518e687 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_00.json @@ -0,0 +1 @@ +{"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_01.json new file mode 100644 index 00000000..40129f47 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_01.json @@ -0,0 +1 @@ +{"foo":1,"foooooo":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_02.json new file mode 100644 index 00000000..7a2b52f4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_02.json @@ -0,0 +1 @@ +{"foo":"bar","fooooo":2} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_03.json new file mode 100644 index 00000000..e7e5b7c9 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_03.json @@ -0,0 +1 @@ +{"foo":"bar","foooooo":"baz"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_04.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_04.json new file mode 100644 index 00000000..3cacc0b9 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_04.json @@ -0,0 +1 @@ +12 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_10.json new file mode 100644 index 00000000..c7b8e693 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_10.json @@ -0,0 +1 @@ +{"a":21} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_11.json new file mode 100644 index 00000000..644136dd --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_11.json @@ -0,0 +1 @@ +{"aaaa":18} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_12.json new file mode 100644 index 00000000..4af39994 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_12.json @@ -0,0 +1 @@ +{"a":21,"aaaa":18} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_13.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_13.json new file mode 100644 index 00000000..5286d3b9 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_13.json @@ -0,0 +1 @@ +{"a":"bar"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_14.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_14.json new file mode 100644 index 00000000..b778e0fa --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_14.json @@ -0,0 +1 @@ +{"aaaa":31} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_15.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_15.json new file mode 100644 index 00000000..786f9cb1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_15.json @@ -0,0 +1 @@ +{"aaa":"foo","aaaa":31} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_20.json new file mode 100644 index 00000000..b2ef65b7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_20.json @@ -0,0 +1 @@ +{"answer 1":"42"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_21.json new file mode 100644 index 00000000..f8f6268d --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_21.json @@ -0,0 +1 @@ +{"a31b":null} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_22.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_22.json new file mode 100644 index 00000000..bfc72fb3 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_22.json @@ -0,0 +1 @@ +{"a_x_3":3} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_23.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_23.json new file mode 100644 index 00000000..cd32d32f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_23.json @@ -0,0 +1 @@ +{"a_X_3":3} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_24.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_24.json new file mode 100644 index 00000000..c578f690 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_24.json @@ -0,0 +1,4 @@ +{ + "a": "hello", + "aaaaaaaaaaaaaaaaaaa": null +} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_25.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_25.json new file mode 100644 index 00000000..dd415e02 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_25.json @@ -0,0 +1,3 @@ +{ + "aaaaaaaaaaaaaaaaaaa": null +} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_26.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_26.json new file mode 100644 index 00000000..1b44a9f6 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/data_26.json @@ -0,0 +1,6 @@ +{ + "dictionary": { + "aaaaaaaaaaaaaaaaaaaa": null, + "b": "hello" + } +} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_0.json new file mode 100644 index 00000000..6f5a8199 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_0.json @@ -0,0 +1 @@ +{"patternProperties":{"f.*o":{"type":"integer"}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_1.json new file mode 100644 index 00000000..8776f201 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_1.json @@ -0,0 +1 @@ +{"patternProperties":{"a*":{"type":"integer"},"aaa*":{"maximum":20}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_2.json new file mode 100644 index 00000000..04a4cbc8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_2.json @@ -0,0 +1 @@ +{"patternProperties":{"X_":{"type":"string"},"[0-9]{2,}":{"type":"boolean"}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_3.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_3.json new file mode 100644 index 00000000..03a67b99 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_3.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9]{1,10}$": { "type": "string" } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_4.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_4.json new file mode 100644 index 00000000..4c35adb5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/patternProperties/schema_4.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "dictionary": { + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9]{1,10}$": { "type": "string" } + }, + "additionalProperties": false + } + }, + "additionalProperties": false +} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_00.json new file mode 100644 index 00000000..022ce236 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_00.json @@ -0,0 +1 @@ +{"bar":"baz","foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_01.json new file mode 100644 index 00000000..9ed62200 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_01.json @@ -0,0 +1 @@ +{"bar":{},"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_02.json new file mode 100644 index 00000000..00062ccb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_02.json @@ -0,0 +1 @@ +{"bar":{},"foo":[]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_03.json new file mode 100644 index 00000000..81ebc367 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_03.json @@ -0,0 +1 @@ +{"quux":[]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_04.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_04.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_04.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_10.json new file mode 100644 index 00000000..a82c1531 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_10.json @@ -0,0 +1 @@ +{"foo":[1,2]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_11.json new file mode 100644 index 00000000..f08510eb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_11.json @@ -0,0 +1 @@ +{"foo":[1,2,3,4]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_12.json new file mode 100644 index 00000000..2ad6a35a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_12.json @@ -0,0 +1 @@ +{"foo":[]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_13.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_13.json new file mode 100644 index 00000000..13370fe0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_13.json @@ -0,0 +1 @@ +{"fxo":[1,2]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_14.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_14.json new file mode 100644 index 00000000..f82be5d3 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_14.json @@ -0,0 +1 @@ +{"fxo":[]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_15.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_15.json new file mode 100644 index 00000000..2ed66803 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_15.json @@ -0,0 +1 @@ +{"bar":[]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_16.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_16.json new file mode 100644 index 00000000..935e5254 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_16.json @@ -0,0 +1 @@ +{"quux":3} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_17.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_17.json new file mode 100644 index 00000000..531bbc94 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/data_17.json @@ -0,0 +1 @@ +{"quux":"foo"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/schema_0.json new file mode 100644 index 00000000..2c73cd58 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/schema_0.json @@ -0,0 +1 @@ +{"properties":{"bar":{"type":"string"},"foo":{"type":"integer"}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/schema_1.json new file mode 100644 index 00000000..144f96e3 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/properties/schema_1.json @@ -0,0 +1 @@ +{"additionalProperties":{"type":"integer"},"patternProperties":{"f.o":{"minItems":2}},"properties":{"bar":{"type":"array"},"foo":{"maxItems":3,"type":"array"}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_00.json new file mode 100644 index 00000000..1bfa80c1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_00.json @@ -0,0 +1 @@ +{"foo":false} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_01.json new file mode 100644 index 00000000..27768a40 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_01.json @@ -0,0 +1 @@ +{"foo":{"foo":false}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_02.json new file mode 100644 index 00000000..a2742720 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_02.json @@ -0,0 +1 @@ +{"bar":false} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_03.json new file mode 100644 index 00000000..1de66762 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_03.json @@ -0,0 +1 @@ +{"foo":{"bar":false}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_10.json new file mode 100644 index 00000000..cc6193bd --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_10.json @@ -0,0 +1 @@ +{"bar":3} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_11.json new file mode 100644 index 00000000..7716a931 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_11.json @@ -0,0 +1 @@ +{"bar":true} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_20.json new file mode 100644 index 00000000..3169929f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_20.json @@ -0,0 +1 @@ +[1,2] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_21.json new file mode 100644 index 00000000..f4e52901 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_21.json @@ -0,0 +1 @@ +[1,"foo"] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_30.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_30.json new file mode 100644 index 00000000..1606db7f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_30.json @@ -0,0 +1 @@ +{"slash":"aoeu"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_31.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_31.json new file mode 100644 index 00000000..51cdcbc4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_31.json @@ -0,0 +1 @@ +{"tilda":"aoeu"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_32.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_32.json new file mode 100644 index 00000000..1aa03c6a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_32.json @@ -0,0 +1 @@ +{"percent":"aoeu"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_40.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_40.json new file mode 100644 index 00000000..7813681f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_40.json @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_41.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_41.json new file mode 100644 index 00000000..075c842d --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_41.json @@ -0,0 +1 @@ +"a" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_50.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_50.json new file mode 100644 index 00000000..9d936d56 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_50.json @@ -0,0 +1 @@ +{"minLength":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_51.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_51.json new file mode 100644 index 00000000..64ba18b3 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/data_51.json @@ -0,0 +1 @@ +{"minLength":-1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_0.json new file mode 100644 index 00000000..a243138b --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_0.json @@ -0,0 +1 @@ +{"additionalProperties":false,"properties":{"foo":{"$ref":"#"}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_1.json new file mode 100644 index 00000000..5475b8ef --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_1.json @@ -0,0 +1 @@ +{"properties":{"bar":{"$ref":"#/properties/foo"},"foo":{"type":"integer"}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_2.json new file mode 100644 index 00000000..80f5a14a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_2.json @@ -0,0 +1 @@ +{"items":[{"type":"integer"},{"$ref":"#/items/0"}]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_3.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_3.json new file mode 100644 index 00000000..5f5c1e25 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_3.json @@ -0,0 +1 @@ +{"percent%field":{"type":"integer"},"properties":{"percent":{"$ref":"#/percent%25field"},"slash":{"$ref":"#/slash~1field"},"tilda":{"$ref":"#/tilda~0field"}},"slash/field":{"type":"integer"},"tilda~field":{"type":"integer"}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_4.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_4.json new file mode 100644 index 00000000..ac40ec7a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_4.json @@ -0,0 +1 @@ +{"$ref":"#/definitions/c","definitions":{"a":{"type":"integer"},"b":{"$ref":"#/definitions/a"},"c":{"$ref":"#/definitions/b"}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_5.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_5.json new file mode 100644 index 00000000..412c2163 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/ref/schema_5.json @@ -0,0 +1 @@ +{"$ref":"http://json-schema.org/draft-04/schema#"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_00.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_00.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_01.json new file mode 100644 index 00000000..075c842d --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_01.json @@ -0,0 +1 @@ +"a" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_10.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_10.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_11.json new file mode 100644 index 00000000..075c842d --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_11.json @@ -0,0 +1 @@ +"a" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_20.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_20.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_21.json new file mode 100644 index 00000000..075c842d --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_21.json @@ -0,0 +1 @@ +"a" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_30.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_30.json new file mode 100644 index 00000000..89d00ba2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_30.json @@ -0,0 +1 @@ +[[1]] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_31.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_31.json new file mode 100644 index 00000000..294b06e0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/data_31.json @@ -0,0 +1 @@ +[["a"]] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/remoteFiles/folder/folderInteger.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/remoteFiles/folder/folderInteger.json new file mode 100644 index 00000000..dbe5c758 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/remoteFiles/folder/folderInteger.json @@ -0,0 +1,3 @@ +{ + "type": "integer" +} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/remoteFiles/integer.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/remoteFiles/integer.json new file mode 100644 index 00000000..dbe5c758 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/remoteFiles/integer.json @@ -0,0 +1,3 @@ +{ + "type": "integer" +} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/remoteFiles/subSchemas.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/remoteFiles/subSchemas.json new file mode 100644 index 00000000..8b6d8f84 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/remoteFiles/subSchemas.json @@ -0,0 +1,8 @@ +{ + "integer": { + "type": "integer" + }, + "refToInteger": { + "$ref": "#/integer" + } +} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_0.json new file mode 100644 index 00000000..c9d47df2 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_0.json @@ -0,0 +1 @@ +{"$ref":"http://localhost:1234/integer.json"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_1.json new file mode 100644 index 00000000..de9da7fe --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_1.json @@ -0,0 +1 @@ +{"$ref":"http://localhost:1234/subSchemas.json#/integer"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_2.json new file mode 100644 index 00000000..40b5213d --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_2.json @@ -0,0 +1 @@ +{"$ref":"http://localhost:1234/subSchemas.json#/refToInteger"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_3.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_3.json new file mode 100644 index 00000000..51bd33d7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/refRemote/schema_3.json @@ -0,0 +1 @@ +{"id":"http://localhost:1234","items":{"id":"folder/","items":{"$ref":"folderInteger.json"}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/data_00.json new file mode 100644 index 00000000..2518e687 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/data_00.json @@ -0,0 +1 @@ +{"foo":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/data_01.json new file mode 100644 index 00000000..ba06f3f8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/data_01.json @@ -0,0 +1 @@ +{"bar":1} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/data_10.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/data_10.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/schema_0.json new file mode 100644 index 00000000..237ecc42 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/schema_0.json @@ -0,0 +1 @@ +{"properties":{"bar":{},"foo":{}},"required":["foo"]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/schema_1.json new file mode 100644 index 00000000..5891a518 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/required/schema_1.json @@ -0,0 +1 @@ +{"properties":{"foo":{}}} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_00.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_00.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_01.json new file mode 100644 index 00000000..b123147e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_01.json @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_02.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_02.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_03.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_03.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_04.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_04.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_04.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_05.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_05.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_05.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_06.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_06.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_06.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_10.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_10.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_10.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_11.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_11.json new file mode 100644 index 00000000..b123147e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_11.json @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_12.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_12.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_12.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_13.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_13.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_13.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_14.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_14.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_14.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_15.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_15.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_15.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_16.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_16.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_16.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_20.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_20.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_20.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_21.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_21.json new file mode 100644 index 00000000..b123147e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_21.json @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_22.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_22.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_22.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_23.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_23.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_23.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_24.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_24.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_24.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_25.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_25.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_25.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_26.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_26.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_26.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_30.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_30.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_30.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_31.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_31.json new file mode 100644 index 00000000..b123147e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_31.json @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_32.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_32.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_32.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_33.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_33.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_33.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_34.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_34.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_34.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_35.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_35.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_35.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_36.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_36.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_36.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_40.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_40.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_40.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_41.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_41.json new file mode 100644 index 00000000..b123147e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_41.json @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_42.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_42.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_42.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_43.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_43.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_43.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_44.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_44.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_44.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_45.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_45.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_45.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_46.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_46.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_46.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_50.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_50.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_50.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_51.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_51.json new file mode 100644 index 00000000..b123147e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_51.json @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_52.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_52.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_52.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_53.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_53.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_53.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_54.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_54.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_54.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_55.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_55.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_55.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_56.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_56.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_56.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_60.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_60.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_60.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_61.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_61.json new file mode 100644 index 00000000..b123147e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_61.json @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_62.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_62.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_62.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_63.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_63.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_63.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_64.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_64.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_64.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_65.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_65.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_65.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_66.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_66.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_66.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_70.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_70.json new file mode 100644 index 00000000..56a6051c --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_70.json @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_71.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_71.json new file mode 100644 index 00000000..7e9668e7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_71.json @@ -0,0 +1 @@ +"foo" \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_72.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_72.json new file mode 100644 index 00000000..b123147e --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_72.json @@ -0,0 +1 @@ +1.1 \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_73.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_73.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_73.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_74.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_74.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_74.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_75.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_75.json new file mode 100644 index 00000000..f32a5804 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_75.json @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_76.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_76.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/data_76.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_0.json new file mode 100644 index 00000000..2be72ba1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_0.json @@ -0,0 +1 @@ +{"type":"integer"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_1.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_1.json new file mode 100644 index 00000000..da4eeec7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_1.json @@ -0,0 +1 @@ +{"type":"number"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_2.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_2.json new file mode 100644 index 00000000..4db187eb --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_2.json @@ -0,0 +1 @@ +{"type":"string"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_3.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_3.json new file mode 100644 index 00000000..ffa5c9f8 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_3.json @@ -0,0 +1 @@ +{"type":"object"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_4.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_4.json new file mode 100644 index 00000000..bc88ff4a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_4.json @@ -0,0 +1 @@ +{"type":"array"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_5.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_5.json new file mode 100644 index 00000000..7763bc51 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_5.json @@ -0,0 +1 @@ +{"type":"boolean"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_6.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_6.json new file mode 100644 index 00000000..fedaf464 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_6.json @@ -0,0 +1 @@ +{"type":"null"} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_7.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_7.json new file mode 100644 index 00000000..c243f0b7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/type/schema_7.json @@ -0,0 +1 @@ +{"type":["integer","string"]} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_00.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_00.json new file mode 100644 index 00000000..3169929f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_00.json @@ -0,0 +1 @@ +[1,2] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_01.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_01.json new file mode 100644 index 00000000..a7c0e4b1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_01.json @@ -0,0 +1 @@ +[1,1] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_010.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_010.json new file mode 100644 index 00000000..7e6261e1 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_010.json @@ -0,0 +1 @@ +[0,false] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_011.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_011.json new file mode 100644 index 00000000..48006ce5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_011.json @@ -0,0 +1 @@ +[{},[1],true,null,1] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_012.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_012.json new file mode 100644 index 00000000..067faf53 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_012.json @@ -0,0 +1 @@ +[{},[1],true,null,{},1] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_02.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_02.json new file mode 100644 index 00000000..22881161 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_02.json @@ -0,0 +1 @@ +[1,1,1] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_03.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_03.json new file mode 100644 index 00000000..b7734bb0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_03.json @@ -0,0 +1 @@ +[{"foo":"bar"},{"foo":"baz"}] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_04.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_04.json new file mode 100644 index 00000000..67d501bc --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_04.json @@ -0,0 +1 @@ +[{"foo":"bar"},{"foo":"bar"}] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_05.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_05.json new file mode 100644 index 00000000..4e042c2f --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_05.json @@ -0,0 +1 @@ +[{"foo":{"bar":{"baz":true}}},{"foo":{"bar":{"baz":false}}}] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_06.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_06.json new file mode 100644 index 00000000..0f63748a --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_06.json @@ -0,0 +1 @@ +[{"foo":{"bar":{"baz":true}}},{"foo":{"bar":{"baz":true}}}] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_07.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_07.json new file mode 100644 index 00000000..8318b7d7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_07.json @@ -0,0 +1 @@ +[["foo"],["bar"]] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_08.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_08.json new file mode 100644 index 00000000..15caa6c0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_08.json @@ -0,0 +1 @@ +[["foo"],["foo"]] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_09.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_09.json new file mode 100644 index 00000000..1083d092 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/data_09.json @@ -0,0 +1 @@ +[1,true] \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/schema_0.json b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/schema_0.json new file mode 100644 index 00000000..d598d705 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/json_schema_test_suite/uniqueItems/schema_0.json @@ -0,0 +1 @@ +{"uniqueItems":true} \ No newline at end of file diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/locales.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/locales.go new file mode 100644 index 00000000..de05d60d --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/locales.go @@ -0,0 +1,275 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Contains const string and messages. +// +// created 01-01-2015 + +package gojsonschema + +type ( + // locale is an interface for definining custom error strings + locale interface { + Required() string + InvalidType() string + NumberAnyOf() string + NumberOneOf() string + NumberAllOf() string + NumberNot() string + MissingDependency() string + Internal() string + Enum() string + ArrayNoAdditionalItems() string + ArrayMinItems() string + ArrayMaxItems() string + Unique() string + ArrayMinProperties() string + ArrayMaxProperties() string + AdditionalPropertyNotAllowed() string + InvalidPropertyPattern() string + StringGTE() string + StringLTE() string + DoesNotMatchPattern() string + DoesNotMatchFormat() string + MultipleOf() string + NumberGTE() string + NumberGT() string + NumberLTE() string + NumberLT() string + + // Schema validations + RegexPattern() string + GreaterThanZero() string + MustBeOfA() string + MustBeOfAn() string + CannotBeUsedWithout() string + CannotBeGT() string + MustBeOfType() string + MustBeValidRegex() string + MustBeValidFormat() string + MustBeGTEZero() string + KeyCannotBeGreaterThan() string + KeyItemsMustBeOfType() string + KeyItemsMustBeUnique() string + ReferenceMustBeCanonical() string + NotAValidType() string + Duplicated() string + httpBadStatus() string + + // ErrorFormat + ErrorFormat() string + } + + // DefaultLocale is the default locale for this package + DefaultLocale struct{} +) + +func (l DefaultLocale) Required() string { + return `%property% is required` +} + +func (l DefaultLocale) InvalidType() string { + return `Invalid type. Expected: %expected%, given: %given%` +} + +func (l DefaultLocale) NumberAnyOf() string { + return `Must validate at least one schema (anyOf)` +} + +func (l DefaultLocale) NumberOneOf() string { + return `Must validate one and only one schema (oneOf)` +} + +func (l DefaultLocale) NumberAllOf() string { + return `Must validate all the schemas (allOf)` +} + +func (l DefaultLocale) NumberNot() string { + return `Must not validate the schema (not)` +} + +func (l DefaultLocale) MissingDependency() string { + return `Has a dependency on %dependency%` +} + +func (l DefaultLocale) Internal() string { + return `Internal Error %error%` +} + +func (l DefaultLocale) Enum() string { + return `%field% must be one of the following: %allowed%` +} + +func (l DefaultLocale) ArrayNoAdditionalItems() string { + return `No additional items allowed on array` +} + +func (l DefaultLocale) ArrayMinItems() string { + return `Array must have at least %min% items` +} + +func (l DefaultLocale) ArrayMaxItems() string { + return `Array must have at most %max% items` +} + +func (l DefaultLocale) Unique() string { + return `%type% items must be unique` +} + +func (l DefaultLocale) ArrayMinProperties() string { + return `Must have at least %min% properties` +} + +func (l DefaultLocale) ArrayMaxProperties() string { + return `Must have at most %max% properties` +} + +func (l DefaultLocale) AdditionalPropertyNotAllowed() string { + return `Additional property %property% is not allowed` +} + +func (l DefaultLocale) InvalidPropertyPattern() string { + return `Property "%property%" does not match pattern %pattern%` +} + +func (l DefaultLocale) StringGTE() string { + return `String length must be greater than or equal to %min%` +} + +func (l DefaultLocale) StringLTE() string { + return `String length must be less than or equal to %max%` +} + +func (l DefaultLocale) DoesNotMatchPattern() string { + return `Does not match pattern '%pattern%'` +} + +func (l DefaultLocale) DoesNotMatchFormat() string { + return `Does not match format '%format%'` +} + +func (l DefaultLocale) MultipleOf() string { + return `Must be a multiple of %multiple%` +} + +func (l DefaultLocale) NumberGTE() string { + return `Must be greater than or equal to %min%` +} + +func (l DefaultLocale) NumberGT() string { + return `Must be greater than %min%` +} + +func (l DefaultLocale) NumberLTE() string { + return `Must be less than or equal to %max%` +} + +func (l DefaultLocale) NumberLT() string { + return `Must be less than %max%` +} + +// Schema validators +func (l DefaultLocale) RegexPattern() string { + return `Invalid regex pattern '%pattern%'` +} + +func (l DefaultLocale) GreaterThanZero() string { + return `%number% must be strictly greater than 0` +} + +func (l DefaultLocale) MustBeOfA() string { + return `%x% must be of a %y%` +} + +func (l DefaultLocale) MustBeOfAn() string { + return `%x% must be of an %y%` +} + +func (l DefaultLocale) CannotBeUsedWithout() string { + return `%x% cannot be used without %y%` +} + +func (l DefaultLocale) CannotBeGT() string { + return `%x% cannot be greater than %y%` +} + +func (l DefaultLocale) MustBeOfType() string { + return `%key% must be of type %type%` +} + +func (l DefaultLocale) MustBeValidRegex() string { + return `%key% must be a valid regex` +} + +func (l DefaultLocale) MustBeValidFormat() string { + return `%key% must be a valid format %given%` +} + +func (l DefaultLocale) MustBeGTEZero() string { + return `%key% must be greater than or equal to 0` +} + +func (l DefaultLocale) KeyCannotBeGreaterThan() string { + return `%key% cannot be greater than %y%` +} + +func (l DefaultLocale) KeyItemsMustBeOfType() string { + return `%key% items must be %type%` +} + +func (l DefaultLocale) KeyItemsMustBeUnique() string { + return `%key% items must be unique` +} + +func (l DefaultLocale) ReferenceMustBeCanonical() string { + return `Reference %reference% must be canonical` +} + +func (l DefaultLocale) NotAValidType() string { + return `%type% is not a valid type -- ` +} + +func (l DefaultLocale) Duplicated() string { + return `%type% type is duplicated` +} + +func (l DefaultLocale) httpBadStatus() string { + return `Could not read schema from HTTP, response status is %status%` +} + +// Replacement options: field, description, context, value +func (l DefaultLocale) ErrorFormat() string { + return `%field%: %description%` +} + +const ( + STRING_NUMBER = "number" + STRING_ARRAY_OF_STRINGS = "array of strings" + STRING_ARRAY_OF_SCHEMAS = "array of schemas" + STRING_SCHEMA = "schema" + STRING_SCHEMA_OR_ARRAY_OF_STRINGS = "schema or array of strings" + STRING_PROPERTIES = "properties" + STRING_DEPENDENCY = "dependency" + STRING_PROPERTY = "property" + STRING_UNDEFINED = "undefined" + STRING_CONTEXT_ROOT = "(root)" + STRING_ROOT_SCHEMA_PROPERTY = "(root)" +) diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/result.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/result.go new file mode 100644 index 00000000..c6d33758 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/result.go @@ -0,0 +1,171 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Result and ResultError implementations. +// +// created 01-01-2015 + +package gojsonschema + +import ( + "fmt" + "strings" +) + +type ( + // ErrorDetails is a map of details specific to each error. + // While the values will vary, every error will contain a "field" value + ErrorDetails map[string]interface{} + + // ResultError is the interface that library errors must implement + ResultError interface { + Field() string + SetType(string) + Type() string + SetContext(*jsonContext) + Context() *jsonContext + SetDescription(string) + Description() string + SetValue(interface{}) + Value() interface{} + SetDetails(ErrorDetails) + Details() ErrorDetails + } + + // ResultErrorFields holds the fields for each ResultError implementation. + // ResultErrorFields implements the ResultError interface, so custom errors + // can be defined by just embedding this type + ResultErrorFields struct { + errorType string // A string with the type of error (i.e. invalid_type) + context *jsonContext // Tree like notation of the part that failed the validation. ex (root).a.b ... + description string // A human readable error message + value interface{} // Value given by the JSON file that is the source of the error + details ErrorDetails + } + + Result struct { + errors []ResultError + // Scores how well the validation matched. Useful in generating + // better error messages for anyOf and oneOf. + score int + } +) + +// Field outputs the field name without the root context +// i.e. firstName or person.firstName instead of (root).firstName or (root).person.firstName +func (v *ResultErrorFields) Field() string { + if p, ok := v.Details()["property"]; ok { + if str, isString := p.(string); isString { + return str + } + } + + return strings.TrimPrefix(v.context.String(), STRING_ROOT_SCHEMA_PROPERTY+".") +} + +func (v *ResultErrorFields) SetType(errorType string) { + v.errorType = errorType +} + +func (v *ResultErrorFields) Type() string { + return v.errorType +} + +func (v *ResultErrorFields) SetContext(context *jsonContext) { + v.context = context +} + +func (v *ResultErrorFields) Context() *jsonContext { + return v.context +} + +func (v *ResultErrorFields) SetDescription(description string) { + v.description = description +} + +func (v *ResultErrorFields) Description() string { + return v.description +} + +func (v *ResultErrorFields) SetValue(value interface{}) { + v.value = value +} + +func (v *ResultErrorFields) Value() interface{} { + return v.value +} + +func (v *ResultErrorFields) SetDetails(details ErrorDetails) { + v.details = details +} + +func (v *ResultErrorFields) Details() ErrorDetails { + return v.details +} + +func (v ResultErrorFields) String() string { + // as a fallback, the value is displayed go style + valueString := fmt.Sprintf("%v", v.value) + + // marshal the go value value to json + if v.value == nil { + valueString = TYPE_NULL + } else { + if vs, err := marshalToJsonString(v.value); err == nil { + if vs == nil { + valueString = TYPE_NULL + } else { + valueString = *vs + } + } + } + + return formatErrorDescription(Locale.ErrorFormat(), ErrorDetails{ + "context": v.context.String(), + "description": v.description, + "value": valueString, + "field": v.Field(), + }) +} + +func (v *Result) Valid() bool { + return len(v.errors) == 0 +} + +func (v *Result) Errors() []ResultError { + return v.errors +} + +func (v *Result) addError(err ResultError, context *jsonContext, value interface{}, details ErrorDetails) { + newError(err, context, value, Locale, details) + v.errors = append(v.errors, err) + v.score -= 2 // results in a net -1 when added to the +1 we get at the end of the validation function +} + +// Used to copy errors from a sub-schema to the main one +func (v *Result) mergeErrors(otherResult *Result) { + v.errors = append(v.errors, otherResult.Errors()...) + v.score += otherResult.score +} + +func (v *Result) incrementScore() { + v.score++ +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/schema.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schema.go new file mode 100644 index 00000000..577c7863 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schema.go @@ -0,0 +1,908 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Defines Schema, the main entry to every subSchema. +// Contains the parsing logic and error checking. +// +// created 26-02-2013 + +package gojsonschema + +import ( + // "encoding/json" + "errors" + "reflect" + "regexp" + + "github.com/xeipuuv/gojsonreference" +) + +var ( + // Locale is the default locale to use + // Library users can overwrite with their own implementation + Locale locale = DefaultLocale{} +) + +func NewSchema(l JSONLoader) (*Schema, error) { + return l.loadSchema() +} + +type Schema struct { + documentReference gojsonreference.JsonReference + rootSchema *subSchema + pool *schemaPool + referencePool *schemaReferencePool +} + +func (d *Schema) parse(document interface{}) error { + d.rootSchema = &subSchema{property: STRING_ROOT_SCHEMA_PROPERTY} + return d.parseSchema(document, d.rootSchema) +} + +func (d *Schema) SetRootSchemaName(name string) { + d.rootSchema.property = name +} + +// Parses a subSchema +// +// Pretty long function ( sorry :) )... but pretty straight forward, repetitive and boring +// Not much magic involved here, most of the job is to validate the key names and their values, +// then the values are copied into subSchema struct +// +func (d *Schema) parseSchema(documentNode interface{}, currentSchema *subSchema) error { + + if !isKind(documentNode, reflect.Map) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_OBJECT, + "given": STRING_SCHEMA, + }, + )) + } + + m := documentNode.(map[string]interface{}) + + if currentSchema == d.rootSchema { + currentSchema.ref = &d.documentReference + } + + // $subSchema + if existsMapKey(m, KEY_SCHEMA) { + if !isKind(m[KEY_SCHEMA], reflect.String) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING, + "given": KEY_SCHEMA, + }, + )) + } + schemaRef := m[KEY_SCHEMA].(string) + schemaReference, err := gojsonreference.NewJsonReference(schemaRef) + currentSchema.subSchema = &schemaReference + if err != nil { + return err + } + } + + // $ref + if existsMapKey(m, KEY_REF) && !isKind(m[KEY_REF], reflect.String) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING, + "given": KEY_REF, + }, + )) + } + if k, ok := m[KEY_REF].(string); ok { + + if sch, ok := d.referencePool.Get(currentSchema.ref.String() + k); ok { + + currentSchema.refSchema = sch + + } else { + + var err error + err = d.parseReference(documentNode, currentSchema, k) + if err != nil { + return err + } + + return nil + } + } + + // definitions + if existsMapKey(m, KEY_DEFINITIONS) { + if isKind(m[KEY_DEFINITIONS], reflect.Map) { + currentSchema.definitions = make(map[string]*subSchema) + for dk, dv := range m[KEY_DEFINITIONS].(map[string]interface{}) { + if isKind(dv, reflect.Map) { + newSchema := &subSchema{property: KEY_DEFINITIONS, parent: currentSchema, ref: currentSchema.ref} + currentSchema.definitions[dk] = newSchema + err := d.parseSchema(dv, newSchema) + if err != nil { + return errors.New(err.Error()) + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_ARRAY_OF_SCHEMAS, + "given": KEY_DEFINITIONS, + }, + )) + } + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_ARRAY_OF_SCHEMAS, + "given": KEY_DEFINITIONS, + }, + )) + } + + } + + // id + if existsMapKey(m, KEY_ID) && !isKind(m[KEY_ID], reflect.String) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING, + "given": KEY_ID, + }, + )) + } + if k, ok := m[KEY_ID].(string); ok { + currentSchema.id = &k + } + + // title + if existsMapKey(m, KEY_TITLE) && !isKind(m[KEY_TITLE], reflect.String) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING, + "given": KEY_TITLE, + }, + )) + } + if k, ok := m[KEY_TITLE].(string); ok { + currentSchema.title = &k + } + + // description + if existsMapKey(m, KEY_DESCRIPTION) && !isKind(m[KEY_DESCRIPTION], reflect.String) { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING, + "given": KEY_DESCRIPTION, + }, + )) + } + if k, ok := m[KEY_DESCRIPTION].(string); ok { + currentSchema.description = &k + } + + // type + if existsMapKey(m, KEY_TYPE) { + if isKind(m[KEY_TYPE], reflect.String) { + if k, ok := m[KEY_TYPE].(string); ok { + err := currentSchema.types.Add(k) + if err != nil { + return err + } + } + } else { + if isKind(m[KEY_TYPE], reflect.Slice) { + arrayOfTypes := m[KEY_TYPE].([]interface{}) + for _, typeInArray := range arrayOfTypes { + if reflect.ValueOf(typeInArray).Kind() != reflect.String { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING + "/" + STRING_ARRAY_OF_STRINGS, + "given": KEY_TYPE, + }, + )) + } else { + currentSchema.types.Add(typeInArray.(string)) + } + } + + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_STRING + "/" + STRING_ARRAY_OF_STRINGS, + "given": KEY_TYPE, + }, + )) + } + } + } + + // properties + if existsMapKey(m, KEY_PROPERTIES) { + err := d.parseProperties(m[KEY_PROPERTIES], currentSchema) + if err != nil { + return err + } + } + + // additionalProperties + if existsMapKey(m, KEY_ADDITIONAL_PROPERTIES) { + if isKind(m[KEY_ADDITIONAL_PROPERTIES], reflect.Bool) { + currentSchema.additionalProperties = m[KEY_ADDITIONAL_PROPERTIES].(bool) + } else if isKind(m[KEY_ADDITIONAL_PROPERTIES], reflect.Map) { + newSchema := &subSchema{property: KEY_ADDITIONAL_PROPERTIES, parent: currentSchema, ref: currentSchema.ref} + currentSchema.additionalProperties = newSchema + err := d.parseSchema(m[KEY_ADDITIONAL_PROPERTIES], newSchema) + if err != nil { + return errors.New(err.Error()) + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_BOOLEAN + "/" + STRING_SCHEMA, + "given": KEY_ADDITIONAL_PROPERTIES, + }, + )) + } + } + + // patternProperties + if existsMapKey(m, KEY_PATTERN_PROPERTIES) { + if isKind(m[KEY_PATTERN_PROPERTIES], reflect.Map) { + patternPropertiesMap := m[KEY_PATTERN_PROPERTIES].(map[string]interface{}) + if len(patternPropertiesMap) > 0 { + currentSchema.patternProperties = make(map[string]*subSchema) + for k, v := range patternPropertiesMap { + _, err := regexp.MatchString(k, "") + if err != nil { + return errors.New(formatErrorDescription( + Locale.RegexPattern(), + ErrorDetails{"pattern": k}, + )) + } + newSchema := &subSchema{property: k, parent: currentSchema, ref: currentSchema.ref} + err = d.parseSchema(v, newSchema) + if err != nil { + return errors.New(err.Error()) + } + currentSchema.patternProperties[k] = newSchema + } + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_SCHEMA, + "given": KEY_PATTERN_PROPERTIES, + }, + )) + } + } + + // dependencies + if existsMapKey(m, KEY_DEPENDENCIES) { + err := d.parseDependencies(m[KEY_DEPENDENCIES], currentSchema) + if err != nil { + return err + } + } + + // items + if existsMapKey(m, KEY_ITEMS) { + if isKind(m[KEY_ITEMS], reflect.Slice) { + for _, itemElement := range m[KEY_ITEMS].([]interface{}) { + if isKind(itemElement, reflect.Map) { + newSchema := &subSchema{parent: currentSchema, property: KEY_ITEMS} + newSchema.ref = currentSchema.ref + currentSchema.AddItemsChild(newSchema) + err := d.parseSchema(itemElement, newSchema) + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_SCHEMA + "/" + STRING_ARRAY_OF_SCHEMAS, + "given": KEY_ITEMS, + }, + )) + } + currentSchema.itemsChildrenIsSingleSchema = false + } + } else if isKind(m[KEY_ITEMS], reflect.Map) { + newSchema := &subSchema{parent: currentSchema, property: KEY_ITEMS} + newSchema.ref = currentSchema.ref + currentSchema.AddItemsChild(newSchema) + err := d.parseSchema(m[KEY_ITEMS], newSchema) + if err != nil { + return err + } + currentSchema.itemsChildrenIsSingleSchema = true + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_SCHEMA + "/" + STRING_ARRAY_OF_SCHEMAS, + "given": KEY_ITEMS, + }, + )) + } + } + + // additionalItems + if existsMapKey(m, KEY_ADDITIONAL_ITEMS) { + if isKind(m[KEY_ADDITIONAL_ITEMS], reflect.Bool) { + currentSchema.additionalItems = m[KEY_ADDITIONAL_ITEMS].(bool) + } else if isKind(m[KEY_ADDITIONAL_ITEMS], reflect.Map) { + newSchema := &subSchema{property: KEY_ADDITIONAL_ITEMS, parent: currentSchema, ref: currentSchema.ref} + currentSchema.additionalItems = newSchema + err := d.parseSchema(m[KEY_ADDITIONAL_ITEMS], newSchema) + if err != nil { + return errors.New(err.Error()) + } + } else { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": TYPE_BOOLEAN + "/" + STRING_SCHEMA, + "given": KEY_ADDITIONAL_ITEMS, + }, + )) + } + } + + // validation : number / integer + + if existsMapKey(m, KEY_MULTIPLE_OF) { + multipleOfValue := mustBeNumber(m[KEY_MULTIPLE_OF]) + if multipleOfValue == nil { + return errors.New(formatErrorDescription( + Locale.InvalidType(), + ErrorDetails{ + "expected": STRING_NUMBER, + "given": KEY_MULTIPLE_OF, + }, + )) + } + if *multipleOfValue <= 0 { + return errors.New(formatErrorDescription( + Locale.GreaterThanZero(), + ErrorDetails{"number": KEY_MULTIPLE_OF}, + )) + } + currentSchema.multipleOf = multipleOfValue + } + + if existsMapKey(m, KEY_MINIMUM) { + minimumValue := mustBeNumber(m[KEY_MINIMUM]) + if minimumValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_MINIMUM, "y": STRING_NUMBER}, + )) + } + currentSchema.minimum = minimumValue + } + + if existsMapKey(m, KEY_EXCLUSIVE_MINIMUM) { + if isKind(m[KEY_EXCLUSIVE_MINIMUM], reflect.Bool) { + if currentSchema.minimum == nil { + return errors.New(formatErrorDescription( + Locale.CannotBeUsedWithout(), + ErrorDetails{"x": KEY_EXCLUSIVE_MINIMUM, "y": KEY_MINIMUM}, + )) + } + exclusiveMinimumValue := m[KEY_EXCLUSIVE_MINIMUM].(bool) + currentSchema.exclusiveMinimum = exclusiveMinimumValue + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_EXCLUSIVE_MINIMUM, "y": TYPE_BOOLEAN}, + )) + } + } + + if existsMapKey(m, KEY_MAXIMUM) { + maximumValue := mustBeNumber(m[KEY_MAXIMUM]) + if maximumValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_MAXIMUM, "y": STRING_NUMBER}, + )) + } + currentSchema.maximum = maximumValue + } + + if existsMapKey(m, KEY_EXCLUSIVE_MAXIMUM) { + if isKind(m[KEY_EXCLUSIVE_MAXIMUM], reflect.Bool) { + if currentSchema.maximum == nil { + return errors.New(formatErrorDescription( + Locale.CannotBeUsedWithout(), + ErrorDetails{"x": KEY_EXCLUSIVE_MAXIMUM, "y": KEY_MAXIMUM}, + )) + } + exclusiveMaximumValue := m[KEY_EXCLUSIVE_MAXIMUM].(bool) + currentSchema.exclusiveMaximum = exclusiveMaximumValue + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_EXCLUSIVE_MAXIMUM, "y": STRING_NUMBER}, + )) + } + } + + if currentSchema.minimum != nil && currentSchema.maximum != nil { + if *currentSchema.minimum > *currentSchema.maximum { + return errors.New(formatErrorDescription( + Locale.CannotBeGT(), + ErrorDetails{"x": KEY_MINIMUM, "y": KEY_MAXIMUM}, + )) + } + } + + // validation : string + + if existsMapKey(m, KEY_MIN_LENGTH) { + minLengthIntegerValue := mustBeInteger(m[KEY_MIN_LENGTH]) + if minLengthIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MIN_LENGTH, "y": TYPE_INTEGER}, + )) + } + if *minLengthIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MIN_LENGTH}, + )) + } + currentSchema.minLength = minLengthIntegerValue + } + + if existsMapKey(m, KEY_MAX_LENGTH) { + maxLengthIntegerValue := mustBeInteger(m[KEY_MAX_LENGTH]) + if maxLengthIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MAX_LENGTH, "y": TYPE_INTEGER}, + )) + } + if *maxLengthIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MAX_LENGTH}, + )) + } + currentSchema.maxLength = maxLengthIntegerValue + } + + if currentSchema.minLength != nil && currentSchema.maxLength != nil { + if *currentSchema.minLength > *currentSchema.maxLength { + return errors.New(formatErrorDescription( + Locale.CannotBeGT(), + ErrorDetails{"x": KEY_MIN_LENGTH, "y": KEY_MAX_LENGTH}, + )) + } + } + + if existsMapKey(m, KEY_PATTERN) { + if isKind(m[KEY_PATTERN], reflect.String) { + regexpObject, err := regexp.Compile(m[KEY_PATTERN].(string)) + if err != nil { + return errors.New(formatErrorDescription( + Locale.MustBeValidRegex(), + ErrorDetails{"key": KEY_PATTERN}, + )) + } + currentSchema.pattern = regexpObject + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_PATTERN, "y": TYPE_STRING}, + )) + } + } + + if existsMapKey(m, KEY_FORMAT) { + formatString, ok := m[KEY_FORMAT].(string) + if ok && FormatCheckers.Has(formatString) { + currentSchema.format = formatString + } else { + return errors.New(formatErrorDescription( + Locale.MustBeValidFormat(), + ErrorDetails{"key": KEY_FORMAT, "given": m[KEY_FORMAT]}, + )) + } + } + + // validation : object + + if existsMapKey(m, KEY_MIN_PROPERTIES) { + minPropertiesIntegerValue := mustBeInteger(m[KEY_MIN_PROPERTIES]) + if minPropertiesIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MIN_PROPERTIES, "y": TYPE_INTEGER}, + )) + } + if *minPropertiesIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MIN_PROPERTIES}, + )) + } + currentSchema.minProperties = minPropertiesIntegerValue + } + + if existsMapKey(m, KEY_MAX_PROPERTIES) { + maxPropertiesIntegerValue := mustBeInteger(m[KEY_MAX_PROPERTIES]) + if maxPropertiesIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MAX_PROPERTIES, "y": TYPE_INTEGER}, + )) + } + if *maxPropertiesIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MAX_PROPERTIES}, + )) + } + currentSchema.maxProperties = maxPropertiesIntegerValue + } + + if currentSchema.minProperties != nil && currentSchema.maxProperties != nil { + if *currentSchema.minProperties > *currentSchema.maxProperties { + return errors.New(formatErrorDescription( + Locale.KeyCannotBeGreaterThan(), + ErrorDetails{"key": KEY_MIN_PROPERTIES, "y": KEY_MAX_PROPERTIES}, + )) + } + } + + if existsMapKey(m, KEY_REQUIRED) { + if isKind(m[KEY_REQUIRED], reflect.Slice) { + requiredValues := m[KEY_REQUIRED].([]interface{}) + for _, requiredValue := range requiredValues { + if isKind(requiredValue, reflect.String) { + err := currentSchema.AddRequired(requiredValue.(string)) + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.KeyItemsMustBeOfType(), + ErrorDetails{"key": KEY_REQUIRED, "type": TYPE_STRING}, + )) + } + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_REQUIRED, "y": TYPE_ARRAY}, + )) + } + } + + // validation : array + + if existsMapKey(m, KEY_MIN_ITEMS) { + minItemsIntegerValue := mustBeInteger(m[KEY_MIN_ITEMS]) + if minItemsIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MIN_ITEMS, "y": TYPE_INTEGER}, + )) + } + if *minItemsIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MIN_ITEMS}, + )) + } + currentSchema.minItems = minItemsIntegerValue + } + + if existsMapKey(m, KEY_MAX_ITEMS) { + maxItemsIntegerValue := mustBeInteger(m[KEY_MAX_ITEMS]) + if maxItemsIntegerValue == nil { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_MAX_ITEMS, "y": TYPE_INTEGER}, + )) + } + if *maxItemsIntegerValue < 0 { + return errors.New(formatErrorDescription( + Locale.MustBeGTEZero(), + ErrorDetails{"key": KEY_MAX_ITEMS}, + )) + } + currentSchema.maxItems = maxItemsIntegerValue + } + + if existsMapKey(m, KEY_UNIQUE_ITEMS) { + if isKind(m[KEY_UNIQUE_ITEMS], reflect.Bool) { + currentSchema.uniqueItems = m[KEY_UNIQUE_ITEMS].(bool) + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfA(), + ErrorDetails{"x": KEY_UNIQUE_ITEMS, "y": TYPE_BOOLEAN}, + )) + } + } + + // validation : all + + if existsMapKey(m, KEY_ENUM) { + if isKind(m[KEY_ENUM], reflect.Slice) { + for _, v := range m[KEY_ENUM].([]interface{}) { + err := currentSchema.AddEnum(v) + if err != nil { + return err + } + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_ENUM, "y": TYPE_ARRAY}, + )) + } + } + + // validation : subSchema + + if existsMapKey(m, KEY_ONE_OF) { + if isKind(m[KEY_ONE_OF], reflect.Slice) { + for _, v := range m[KEY_ONE_OF].([]interface{}) { + newSchema := &subSchema{property: KEY_ONE_OF, parent: currentSchema, ref: currentSchema.ref} + currentSchema.AddOneOf(newSchema) + err := d.parseSchema(v, newSchema) + if err != nil { + return err + } + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_ONE_OF, "y": TYPE_ARRAY}, + )) + } + } + + if existsMapKey(m, KEY_ANY_OF) { + if isKind(m[KEY_ANY_OF], reflect.Slice) { + for _, v := range m[KEY_ANY_OF].([]interface{}) { + newSchema := &subSchema{property: KEY_ANY_OF, parent: currentSchema, ref: currentSchema.ref} + currentSchema.AddAnyOf(newSchema) + err := d.parseSchema(v, newSchema) + if err != nil { + return err + } + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_ANY_OF, "y": TYPE_ARRAY}, + )) + } + } + + if existsMapKey(m, KEY_ALL_OF) { + if isKind(m[KEY_ALL_OF], reflect.Slice) { + for _, v := range m[KEY_ALL_OF].([]interface{}) { + newSchema := &subSchema{property: KEY_ALL_OF, parent: currentSchema, ref: currentSchema.ref} + currentSchema.AddAllOf(newSchema) + err := d.parseSchema(v, newSchema) + if err != nil { + return err + } + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_ANY_OF, "y": TYPE_ARRAY}, + )) + } + } + + if existsMapKey(m, KEY_NOT) { + if isKind(m[KEY_NOT], reflect.Map) { + newSchema := &subSchema{property: KEY_NOT, parent: currentSchema, ref: currentSchema.ref} + currentSchema.SetNot(newSchema) + err := d.parseSchema(m[KEY_NOT], newSchema) + if err != nil { + return err + } + } else { + return errors.New(formatErrorDescription( + Locale.MustBeOfAn(), + ErrorDetails{"x": KEY_NOT, "y": TYPE_OBJECT}, + )) + } + } + + return nil +} + +func (d *Schema) parseReference(documentNode interface{}, currentSchema *subSchema, reference string) (e error) { + + var err error + + jsonReference, err := gojsonreference.NewJsonReference(reference) + if err != nil { + return err + } + + standaloneDocument := d.pool.GetStandaloneDocument() + + if jsonReference.HasFullUrl { + currentSchema.ref = &jsonReference + } else { + inheritedReference, err := currentSchema.ref.Inherits(jsonReference) + if err != nil { + return err + } + currentSchema.ref = inheritedReference + } + + jsonPointer := currentSchema.ref.GetPointer() + + var refdDocumentNode interface{} + + if standaloneDocument != nil { + + var err error + refdDocumentNode, _, err = jsonPointer.Get(standaloneDocument) + if err != nil { + return err + } + + } else { + + var err error + dsp, err := d.pool.GetDocument(*currentSchema.ref) + if err != nil { + return err + } + + refdDocumentNode, _, err = jsonPointer.Get(dsp.Document) + if err != nil { + return err + } + + } + + if !isKind(refdDocumentNode, reflect.Map) { + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{"key": STRING_SCHEMA, "type": TYPE_OBJECT}, + )) + } + + // returns the loaded referenced subSchema for the caller to update its current subSchema + newSchemaDocument := refdDocumentNode.(map[string]interface{}) + + newSchema := &subSchema{property: KEY_REF, parent: currentSchema, ref: currentSchema.ref} + d.referencePool.Add(currentSchema.ref.String()+reference, newSchema) + + err = d.parseSchema(newSchemaDocument, newSchema) + if err != nil { + return err + } + + currentSchema.refSchema = newSchema + + return nil + +} + +func (d *Schema) parseProperties(documentNode interface{}, currentSchema *subSchema) error { + + if !isKind(documentNode, reflect.Map) { + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{"key": STRING_PROPERTIES, "type": TYPE_OBJECT}, + )) + } + + m := documentNode.(map[string]interface{}) + for k := range m { + schemaProperty := k + newSchema := &subSchema{property: schemaProperty, parent: currentSchema, ref: currentSchema.ref} + currentSchema.AddPropertiesChild(newSchema) + err := d.parseSchema(m[k], newSchema) + if err != nil { + return err + } + } + + return nil +} + +func (d *Schema) parseDependencies(documentNode interface{}, currentSchema *subSchema) error { + + if !isKind(documentNode, reflect.Map) { + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{"key": KEY_DEPENDENCIES, "type": TYPE_OBJECT}, + )) + } + + m := documentNode.(map[string]interface{}) + currentSchema.dependencies = make(map[string]interface{}) + + for k := range m { + switch reflect.ValueOf(m[k]).Kind() { + + case reflect.Slice: + values := m[k].([]interface{}) + var valuesToRegister []string + + for _, value := range values { + if !isKind(value, reflect.String) { + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{ + "key": STRING_DEPENDENCY, + "type": STRING_SCHEMA_OR_ARRAY_OF_STRINGS, + }, + )) + } else { + valuesToRegister = append(valuesToRegister, value.(string)) + } + currentSchema.dependencies[k] = valuesToRegister + } + + case reflect.Map: + depSchema := &subSchema{property: k, parent: currentSchema, ref: currentSchema.ref} + err := d.parseSchema(m[k], depSchema) + if err != nil { + return err + } + currentSchema.dependencies[k] = depSchema + + default: + return errors.New(formatErrorDescription( + Locale.MustBeOfType(), + ErrorDetails{ + "key": STRING_DEPENDENCY, + "type": STRING_SCHEMA_OR_ARRAY_OF_STRINGS, + }, + )) + } + + } + + return nil +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/schemaPool.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schemaPool.go new file mode 100644 index 00000000..70ae7318 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schemaPool.go @@ -0,0 +1,110 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Defines resources pooling. +// Eases referencing and avoids downloading the same resource twice. +// +// created 26-02-2013 + +package gojsonschema + +import ( + "errors" + "net/http" + + "github.com/xeipuuv/gojsonreference" +) + +type schemaPoolDocument struct { + Document interface{} +} + +type schemaPool struct { + schemaPoolDocuments map[string]*schemaPoolDocument + standaloneDocument interface{} + fs http.FileSystem +} + +func newSchemaPool(fs http.FileSystem) *schemaPool { + + p := &schemaPool{} + p.schemaPoolDocuments = make(map[string]*schemaPoolDocument) + p.standaloneDocument = nil + p.fs = fs + + return p +} + +func (p *schemaPool) SetStandaloneDocument(document interface{}) { + p.standaloneDocument = document +} + +func (p *schemaPool) GetStandaloneDocument() (document interface{}) { + return p.standaloneDocument +} + +func (p *schemaPool) GetDocument(reference gojsonreference.JsonReference) (*schemaPoolDocument, error) { + + if internalLogEnabled { + internalLog("Get Document ( %s )", reference.String()) + } + + var err error + + // It is not possible to load anything that is not canonical... + if !reference.IsCanonical() { + return nil, errors.New(formatErrorDescription( + Locale.ReferenceMustBeCanonical(), + ErrorDetails{"reference": reference}, + )) + } + + refToUrl := reference + refToUrl.GetUrl().Fragment = "" + + var spd *schemaPoolDocument + + // Try to find the requested document in the pool + for k := range p.schemaPoolDocuments { + if k == refToUrl.String() { + spd = p.schemaPoolDocuments[k] + } + } + + if spd != nil { + if internalLogEnabled { + internalLog(" From pool") + } + return spd, nil + } + + jsonReferenceLoader := NewReferenceLoaderFileSystem(reference.String(), p.fs) + document, err := jsonReferenceLoader.loadJSON() + if err != nil { + return nil, err + } + + spd = &schemaPoolDocument{Document: document} + // add the document to the pool for potential later use + p.schemaPoolDocuments[refToUrl.String()] = spd + + return spd, nil +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/schemaReferencePool.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schemaReferencePool.go new file mode 100644 index 00000000..294e36a7 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schemaReferencePool.go @@ -0,0 +1,67 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Pool of referenced schemas. +// +// created 25-06-2013 + +package gojsonschema + +import ( + "fmt" +) + +type schemaReferencePool struct { + documents map[string]*subSchema +} + +func newSchemaReferencePool() *schemaReferencePool { + + p := &schemaReferencePool{} + p.documents = make(map[string]*subSchema) + + return p +} + +func (p *schemaReferencePool) Get(ref string) (r *subSchema, o bool) { + + if internalLogEnabled { + internalLog(fmt.Sprintf("Schema Reference ( %s )", ref)) + } + + if sch, ok := p.documents[ref]; ok { + if internalLogEnabled { + internalLog(fmt.Sprintf(" From pool")) + } + return sch, true + } + + return nil, false +} + +func (p *schemaReferencePool) Add(ref string, sch *subSchema) { + + if internalLogEnabled { + internalLog(fmt.Sprintf("Add Schema Reference %s to pool", ref)) + } + + p.documents[ref] = sch +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/schemaType.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schemaType.go new file mode 100644 index 00000000..e13a0fb0 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schemaType.go @@ -0,0 +1,83 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Helper structure to handle schema types, and the combination of them. +// +// created 28-02-2013 + +package gojsonschema + +import ( + "errors" + "fmt" + "strings" +) + +type jsonSchemaType struct { + types []string +} + +// Is the schema typed ? that is containing at least one type +// When not typed, the schema does not need any type validation +func (t *jsonSchemaType) IsTyped() bool { + return len(t.types) > 0 +} + +func (t *jsonSchemaType) Add(etype string) error { + + if !isStringInSlice(JSON_TYPES, etype) { + return errors.New(formatErrorDescription(Locale.NotAValidType(), ErrorDetails{"type": etype})) + } + + if t.Contains(etype) { + return errors.New(formatErrorDescription(Locale.Duplicated(), ErrorDetails{"type": etype})) + } + + t.types = append(t.types, etype) + + return nil +} + +func (t *jsonSchemaType) Contains(etype string) bool { + + for _, v := range t.types { + if v == etype { + return true + } + } + + return false +} + +func (t *jsonSchemaType) String() string { + + if len(t.types) == 0 { + return STRING_UNDEFINED // should never happen + } + + // Displayed as a list [type1,type2,...] + if len(t.types) > 1 { + return fmt.Sprintf("[%s]", strings.Join(t.types, ",")) + } + + // Only one type: name only + return t.types[0] +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/schema_test.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schema_test.go new file mode 100644 index 00000000..2a1832c5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/schema_test.go @@ -0,0 +1,416 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description (Unit) Tests for schema validation. +// +// created 16-06-2013 + +package gojsonschema + +import ( + "fmt" + "net/http" + "os" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "testing" +) + +const displayErrorMessages = false + +var rxInvoice = regexp.MustCompile("^[A-Z]{2}-[0-9]{5}") +var rxSplitErrors = regexp.MustCompile(", ?") + +// Used for remote schema in ref/schema_5.json that defines "uri" and "regex" types +type alwaysTrueFormatChecker struct{} +type invoiceFormatChecker struct{} + +func (a alwaysTrueFormatChecker) IsFormat(input string) bool { + return true +} + +func (a invoiceFormatChecker) IsFormat(input string) bool { + return rxInvoice.MatchString(input) +} + +func TestJsonSchemaTestSuite(t *testing.T) { + + JsonSchemaTestSuiteMap := []map[string]string{ + + map[string]string{"phase": "integer type matches integers", "test": "an integer is an integer", "schema": "type/schema_0.json", "data": "type/data_00.json", "valid": "true"}, + map[string]string{"phase": "integer type matches integers", "test": "a float is not an integer", "schema": "type/schema_0.json", "data": "type/data_01.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "integer type matches integers", "test": "a string is not an integer", "schema": "type/schema_0.json", "data": "type/data_02.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "integer type matches integers", "test": "an object is not an integer", "schema": "type/schema_0.json", "data": "type/data_03.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "integer type matches integers", "test": "an array is not an integer", "schema": "type/schema_0.json", "data": "type/data_04.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "integer type matches integers", "test": "a boolean is not an integer", "schema": "type/schema_0.json", "data": "type/data_05.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "integer type matches integers", "test": "null is not an integer", "schema": "type/schema_0.json", "data": "type/data_06.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "number type matches numbers", "test": "an integer is a number", "schema": "type/schema_1.json", "data": "type/data_10.json", "valid": "true"}, + map[string]string{"phase": "number type matches numbers", "test": "a float is a number", "schema": "type/schema_1.json", "data": "type/data_11.json", "valid": "true"}, + map[string]string{"phase": "number type matches numbers", "test": "a string is not a number", "schema": "type/schema_1.json", "data": "type/data_12.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "number type matches numbers", "test": "an object is not a number", "schema": "type/schema_1.json", "data": "type/data_13.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "number type matches numbers", "test": "an array is not a number", "schema": "type/schema_1.json", "data": "type/data_14.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "number type matches numbers", "test": "a boolean is not a number", "schema": "type/schema_1.json", "data": "type/data_15.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "number type matches numbers", "test": "null is not a number", "schema": "type/schema_1.json", "data": "type/data_16.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "string type matches strings", "test": "1 is not a string", "schema": "type/schema_2.json", "data": "type/data_20.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "string type matches strings", "test": "a float is not a string", "schema": "type/schema_2.json", "data": "type/data_21.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "string type matches strings", "test": "a string is a string", "schema": "type/schema_2.json", "data": "type/data_22.json", "valid": "true"}, + map[string]string{"phase": "string type matches strings", "test": "an object is not a string", "schema": "type/schema_2.json", "data": "type/data_23.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "string type matches strings", "test": "an array is not a string", "schema": "type/schema_2.json", "data": "type/data_24.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "string type matches strings", "test": "a boolean is not a string", "schema": "type/schema_2.json", "data": "type/data_25.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "string type matches strings", "test": "null is not a string", "schema": "type/schema_2.json", "data": "type/data_26.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "object type matches objects", "test": "an integer is not an object", "schema": "type/schema_3.json", "data": "type/data_30.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "object type matches objects", "test": "a float is not an object", "schema": "type/schema_3.json", "data": "type/data_31.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "object type matches objects", "test": "a string is not an object", "schema": "type/schema_3.json", "data": "type/data_32.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "object type matches objects", "test": "an object is an object", "schema": "type/schema_3.json", "data": "type/data_33.json", "valid": "true"}, + map[string]string{"phase": "object type matches objects", "test": "an array is not an object", "schema": "type/schema_3.json", "data": "type/data_34.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "object type matches objects", "test": "a boolean is not an object", "schema": "type/schema_3.json", "data": "type/data_35.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "object type matches objects", "test": "null is not an object", "schema": "type/schema_3.json", "data": "type/data_36.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "array type matches arrays", "test": "an integer is not an array", "schema": "type/schema_4.json", "data": "type/data_40.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "array type matches arrays", "test": "a float is not an array", "schema": "type/schema_4.json", "data": "type/data_41.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "array type matches arrays", "test": "a string is not an array", "schema": "type/schema_4.json", "data": "type/data_42.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "array type matches arrays", "test": "an object is not an array", "schema": "type/schema_4.json", "data": "type/data_43.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "array type matches arrays", "test": "an array is not an array", "schema": "type/schema_4.json", "data": "type/data_44.json", "valid": "true"}, + map[string]string{"phase": "array type matches arrays", "test": "a boolean is not an array", "schema": "type/schema_4.json", "data": "type/data_45.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "array type matches arrays", "test": "null is not an array", "schema": "type/schema_4.json", "data": "type/data_46.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "boolean type matches booleans", "test": "an integer is not a boolean", "schema": "type/schema_5.json", "data": "type/data_50.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "boolean type matches booleans", "test": "a float is not a boolean", "schema": "type/schema_5.json", "data": "type/data_51.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "boolean type matches booleans", "test": "a string is not a boolean", "schema": "type/schema_5.json", "data": "type/data_52.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "boolean type matches booleans", "test": "an object is not a boolean", "schema": "type/schema_5.json", "data": "type/data_53.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "boolean type matches booleans", "test": "an array is not a boolean", "schema": "type/schema_5.json", "data": "type/data_54.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "boolean type matches booleans", "test": "a boolean is not a boolean", "schema": "type/schema_5.json", "data": "type/data_55.json", "valid": "true", "errors": "invalid_type"}, + map[string]string{"phase": "boolean type matches booleans", "test": "null is not a boolean", "schema": "type/schema_5.json", "data": "type/data_56.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "null type matches only the null object", "test": "an integer is not null", "schema": "type/schema_6.json", "data": "type/data_60.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "null type matches only the null object", "test": "a float is not null", "schema": "type/schema_6.json", "data": "type/data_61.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "null type matches only the null object", "test": "a string is not null", "schema": "type/schema_6.json", "data": "type/data_62.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "null type matches only the null object", "test": "an object is not null", "schema": "type/schema_6.json", "data": "type/data_63.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "null type matches only the null object", "test": "an array is not null", "schema": "type/schema_6.json", "data": "type/data_64.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "null type matches only the null object", "test": "a boolean is not null", "schema": "type/schema_6.json", "data": "type/data_65.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "null type matches only the null object", "test": "null is null", "schema": "type/schema_6.json", "data": "type/data_66.json", "valid": "true"}, + map[string]string{"phase": "multiple types can be specified in an array", "test": "an integer is valid", "schema": "type/schema_7.json", "data": "type/data_70.json", "valid": "true"}, + map[string]string{"phase": "multiple types can be specified in an array", "test": "a string is valid", "schema": "type/schema_7.json", "data": "type/data_71.json", "valid": "true"}, + map[string]string{"phase": "multiple types can be specified in an array", "test": "a float is invalid", "schema": "type/schema_7.json", "data": "type/data_72.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "multiple types can be specified in an array", "test": "an object is invalid", "schema": "type/schema_7.json", "data": "type/data_73.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "multiple types can be specified in an array", "test": "an array is invalid", "schema": "type/schema_7.json", "data": "type/data_74.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "multiple types can be specified in an array", "test": "a boolean is invalid", "schema": "type/schema_7.json", "data": "type/data_75.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "multiple types can be specified in an array", "test": "null is invalid", "schema": "type/schema_7.json", "data": "type/data_76.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "required validation", "test": "present required property is valid", "schema": "required/schema_0.json", "data": "required/data_00.json", "valid": "true"}, + map[string]string{"phase": "required validation", "test": "non-present required property is invalid", "schema": "required/schema_0.json", "data": "required/data_01.json", "valid": "false", "errors": "required"}, + map[string]string{"phase": "required default validation", "test": "not required by default", "schema": "required/schema_1.json", "data": "required/data_10.json", "valid": "true"}, + map[string]string{"phase": "uniqueItems validation", "test": "unique array of integers is valid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_00.json", "valid": "true"}, + map[string]string{"phase": "uniqueItems validation", "test": "non-unique array of integers is invalid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_01.json", "valid": "false", "errors": "unique"}, + map[string]string{"phase": "uniqueItems validation", "test": "numbers are unique if mathematically unequal", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_02.json", "valid": "false", "errors": "unique, unique"}, + map[string]string{"phase": "uniqueItems validation", "test": "unique array of objects is valid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_03.json", "valid": "true"}, + map[string]string{"phase": "uniqueItems validation", "test": "non-unique array of objects is invalid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_04.json", "valid": "false", "errors": "unique"}, + map[string]string{"phase": "uniqueItems validation", "test": "unique array of nested objects is valid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_05.json", "valid": "true"}, + map[string]string{"phase": "uniqueItems validation", "test": "non-unique array of nested objects is invalid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_06.json", "valid": "false", "errors": "unique"}, + map[string]string{"phase": "uniqueItems validation", "test": "unique array of arrays is valid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_07.json", "valid": "true"}, + map[string]string{"phase": "uniqueItems validation", "test": "non-unique array of arrays is invalid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_08.json", "valid": "false", "errors": "unique"}, + map[string]string{"phase": "uniqueItems validation", "test": "1 and true are unique", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_09.json", "valid": "true"}, + map[string]string{"phase": "uniqueItems validation", "test": "0 and false are unique", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_010.json", "valid": "true"}, + map[string]string{"phase": "uniqueItems validation", "test": "unique heterogeneous types are valid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_011.json", "valid": "true"}, + map[string]string{"phase": "uniqueItems validation", "test": "non-unique heterogeneous types are invalid", "schema": "uniqueItems/schema_0.json", "data": "uniqueItems/data_012.json", "valid": "false", "errors": "unique"}, + map[string]string{"phase": "pattern validation", "test": "a matching pattern is valid", "schema": "pattern/schema_0.json", "data": "pattern/data_00.json", "valid": "true"}, + map[string]string{"phase": "pattern validation", "test": "a non-matching pattern is invalid", "schema": "pattern/schema_0.json", "data": "pattern/data_01.json", "valid": "false", "errors": "pattern"}, + map[string]string{"phase": "pattern validation", "test": "ignores non-strings", "schema": "pattern/schema_0.json", "data": "pattern/data_02.json", "valid": "true"}, + map[string]string{"phase": "simple enum validation", "test": "one of the enum is valid", "schema": "enum/schema_0.json", "data": "enum/data_00.json", "valid": "true"}, + map[string]string{"phase": "simple enum validation", "test": "something else is invalid", "schema": "enum/schema_0.json", "data": "enum/data_01.json", "valid": "false", "errors": "enum"}, + map[string]string{"phase": "heterogeneous enum validation", "test": "one of the enum is valid", "schema": "enum/schema_1.json", "data": "enum/data_10.json", "valid": "true"}, + map[string]string{"phase": "heterogeneous enum validation", "test": "something else is invalid", "schema": "enum/schema_1.json", "data": "enum/data_11.json", "valid": "false", "errors": "enum"}, + map[string]string{"phase": "heterogeneous enum validation", "test": "objects are deep compared", "schema": "enum/schema_1.json", "data": "enum/data_12.json", "valid": "false", "errors": "enum"}, + map[string]string{"phase": "minLength validation", "test": "longer is valid", "schema": "minLength/schema_0.json", "data": "minLength/data_00.json", "valid": "true"}, + map[string]string{"phase": "minLength validation", "test": "exact length is valid", "schema": "minLength/schema_0.json", "data": "minLength/data_01.json", "valid": "true"}, + map[string]string{"phase": "minLength validation", "test": "too short is invalid", "schema": "minLength/schema_0.json", "data": "minLength/data_02.json", "valid": "false", "errors": "string_gte"}, + map[string]string{"phase": "minLength validation", "test": "ignores non-strings", "schema": "minLength/schema_0.json", "data": "minLength/data_03.json", "valid": "true"}, + map[string]string{"phase": "minLength validation", "test": "counts utf8 length correctly", "schema": "minLength/schema_0.json", "data": "minLength/data_04.json", "valid": "false", "errors": "string_gte"}, + map[string]string{"phase": "maxLength validation", "test": "shorter is valid", "schema": "maxLength/schema_0.json", "data": "maxLength/data_00.json", "valid": "true"}, + map[string]string{"phase": "maxLength validation", "test": "exact length is valid", "schema": "maxLength/schema_0.json", "data": "maxLength/data_01.json", "valid": "true"}, + map[string]string{"phase": "maxLength validation", "test": "too long is invalid", "schema": "maxLength/schema_0.json", "data": "maxLength/data_02.json", "valid": "false", "errors": "string_lte"}, + map[string]string{"phase": "maxLength validation", "test": "ignores non-strings", "schema": "maxLength/schema_0.json", "data": "maxLength/data_03.json", "valid": "true"}, + map[string]string{"phase": "maxLength validation", "test": "counts utf8 length correctly", "schema": "maxLength/schema_0.json", "data": "maxLength/data_04.json", "valid": "true"}, + map[string]string{"phase": "minimum validation", "test": "above the minimum is valid", "schema": "minimum/schema_0.json", "data": "minimum/data_00.json", "valid": "true"}, + map[string]string{"phase": "minimum validation", "test": "below the minimum is invalid", "schema": "minimum/schema_0.json", "data": "minimum/data_01.json", "valid": "false", "errors": "number_gte"}, + map[string]string{"phase": "minimum validation", "test": "ignores non-numbers", "schema": "minimum/schema_0.json", "data": "minimum/data_02.json", "valid": "true"}, + map[string]string{"phase": "exclusiveMinimum validation", "test": "above the minimum is still valid", "schema": "minimum/schema_1.json", "data": "minimum/data_10.json", "valid": "true"}, + map[string]string{"phase": "exclusiveMinimum validation", "test": "boundary point is invalid", "schema": "minimum/schema_1.json", "data": "minimum/data_11.json", "valid": "false", "errors": "number_gt"}, + map[string]string{"phase": "maximum validation", "test": "below the maximum is valid", "schema": "maximum/schema_0.json", "data": "maximum/data_00.json", "valid": "true"}, + map[string]string{"phase": "maximum validation", "test": "above the maximum is invalid", "schema": "maximum/schema_0.json", "data": "maximum/data_01.json", "valid": "false", "errors": "number_lte"}, + map[string]string{"phase": "maximum validation", "test": "ignores non-numbers", "schema": "maximum/schema_0.json", "data": "maximum/data_02.json", "valid": "true"}, + map[string]string{"phase": "exclusiveMaximum validation", "test": "below the maximum is still valid", "schema": "maximum/schema_1.json", "data": "maximum/data_10.json", "valid": "true"}, + map[string]string{"phase": "exclusiveMaximum validation", "test": "boundary point is invalid", "schema": "maximum/schema_1.json", "data": "maximum/data_11.json", "valid": "false", "errors": "number_lt"}, + map[string]string{"phase": "allOf", "test": "allOf", "schema": "allOf/schema_0.json", "data": "allOf/data_00.json", "valid": "true"}, + map[string]string{"phase": "allOf", "test": "mismatch second", "schema": "allOf/schema_0.json", "data": "allOf/data_01.json", "valid": "false", "errors": "number_all_of, required"}, + map[string]string{"phase": "allOf", "test": "mismatch first", "schema": "allOf/schema_0.json", "data": "allOf/data_02.json", "valid": "false", "errors": "number_all_of, required"}, + map[string]string{"phase": "allOf", "test": "wrong type", "schema": "allOf/schema_0.json", "data": "allOf/data_03.json", "valid": "false", "errors": "number_all_of, invalid_type"}, + map[string]string{"phase": "allOf with base schema", "test": "valid", "schema": "allOf/schema_1.json", "data": "allOf/data_10.json", "valid": "true"}, + map[string]string{"phase": "allOf with base schema", "test": "mismatch base schema", "schema": "allOf/schema_1.json", "data": "allOf/data_11.json", "valid": "false", "errors": "required"}, + map[string]string{"phase": "allOf with base schema", "test": "mismatch first allOf", "schema": "allOf/schema_1.json", "data": "allOf/data_12.json", "valid": "false", "errors": "number_all_of, required"}, + map[string]string{"phase": "allOf with base schema", "test": "mismatch second allOf", "schema": "allOf/schema_1.json", "data": "allOf/data_13.json", "valid": "false", "errors": "number_all_of, required"}, + map[string]string{"phase": "allOf with base schema", "test": "mismatch both", "schema": "allOf/schema_1.json", "data": "allOf/data_14.json", "valid": "false", "errors": "number_all_of, required, required"}, + map[string]string{"phase": "allOf simple types", "test": "valid", "schema": "allOf/schema_2.json", "data": "allOf/data_20.json", "valid": "true"}, + map[string]string{"phase": "allOf simple types", "test": "mismatch one", "schema": "allOf/schema_2.json", "data": "allOf/data_21.json", "valid": "false", "errors": "number_all_of, number_lte"}, + map[string]string{"phase": "oneOf", "test": "first oneOf valid", "schema": "oneOf/schema_0.json", "data": "oneOf/data_00.json", "valid": "true"}, + map[string]string{"phase": "oneOf", "test": "second oneOf valid", "schema": "oneOf/schema_0.json", "data": "oneOf/data_01.json", "valid": "true"}, + map[string]string{"phase": "oneOf", "test": "both oneOf valid", "schema": "oneOf/schema_0.json", "data": "oneOf/data_02.json", "valid": "false", "errors": "number_one_of"}, + map[string]string{"phase": "oneOf", "test": "neither oneOf valid", "schema": "oneOf/schema_0.json", "data": "oneOf/data_03.json", "valid": "false"}, + map[string]string{"phase": "oneOf with base schema", "test": "mismatch base schema", "schema": "oneOf/schema_1.json", "data": "oneOf/data_10.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "oneOf with base schema", "test": "one oneOf valid", "schema": "oneOf/schema_1.json", "data": "oneOf/data_11.json", "valid": "true"}, + map[string]string{"phase": "oneOf with base schema", "test": "both oneOf valid", "schema": "oneOf/schema_1.json", "data": "oneOf/data_12.json", "valid": "false", "errors": "number_one_of"}, + map[string]string{"phase": "anyOf", "test": "first anyOf valid", "schema": "anyOf/schema_0.json", "data": "anyOf/data_00.json", "valid": "true"}, + map[string]string{"phase": "anyOf", "test": "second anyOf valid", "schema": "anyOf/schema_0.json", "data": "anyOf/data_01.json", "valid": "true"}, + map[string]string{"phase": "anyOf", "test": "both anyOf valid", "schema": "anyOf/schema_0.json", "data": "anyOf/data_02.json", "valid": "true"}, + map[string]string{"phase": "anyOf", "test": "neither anyOf valid", "schema": "anyOf/schema_0.json", "data": "anyOf/data_03.json", "valid": "false", "errors": "number_any_of, number_gte"}, + map[string]string{"phase": "anyOf with base schema", "test": "mismatch base schema", "schema": "anyOf/schema_1.json", "data": "anyOf/data_10.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "anyOf with base schema", "test": "one anyOf valid", "schema": "anyOf/schema_1.json", "data": "anyOf/data_11.json", "valid": "true"}, + map[string]string{"phase": "anyOf with base schema", "test": "both anyOf invalid", "schema": "anyOf/schema_1.json", "data": "anyOf/data_12.json", "valid": "false", "errors": "number_any_of, string_lte"}, + map[string]string{"phase": "not", "test": "allowed", "schema": "not/schema_0.json", "data": "not/data_00.json", "valid": "true"}, + map[string]string{"phase": "not", "test": "disallowed", "schema": "not/schema_0.json", "data": "not/data_01.json", "valid": "false", "errors": "number_not"}, + map[string]string{"phase": "not multiple types", "test": "valid", "schema": "not/schema_1.json", "data": "not/data_10.json", "valid": "true"}, + map[string]string{"phase": "not multiple types", "test": "mismatch", "schema": "not/schema_1.json", "data": "not/data_11.json", "valid": "false", "errors": "number_not"}, + map[string]string{"phase": "not multiple types", "test": "other mismatch", "schema": "not/schema_1.json", "data": "not/data_12.json", "valid": "false", "errors": "number_not"}, + map[string]string{"phase": "not more complex schema", "test": "match", "schema": "not/schema_2.json", "data": "not/data_20.json", "valid": "true"}, + map[string]string{"phase": "not more complex schema", "test": "other match", "schema": "not/schema_2.json", "data": "not/data_21.json", "valid": "true"}, + map[string]string{"phase": "not more complex schema", "test": "mismatch", "schema": "not/schema_2.json", "data": "not/data_22.json", "valid": "false", "errors": "number_not"}, + map[string]string{"phase": "minProperties validation", "test": "longer is valid", "schema": "minProperties/schema_0.json", "data": "minProperties/data_00.json", "valid": "true"}, + map[string]string{"phase": "minProperties validation", "test": "exact length is valid", "schema": "minProperties/schema_0.json", "data": "minProperties/data_01.json", "valid": "true"}, + map[string]string{"phase": "minProperties validation", "test": "too short is invalid", "schema": "minProperties/schema_0.json", "data": "minProperties/data_02.json", "valid": "false", "errors": "array_min_properties"}, + map[string]string{"phase": "minProperties validation", "test": "ignores non-objects", "schema": "minProperties/schema_0.json", "data": "minProperties/data_03.json", "valid": "true"}, + map[string]string{"phase": "maxProperties validation", "test": "shorter is valid", "schema": "maxProperties/schema_0.json", "data": "maxProperties/data_00.json", "valid": "true"}, + map[string]string{"phase": "maxProperties validation", "test": "exact length is valid", "schema": "maxProperties/schema_0.json", "data": "maxProperties/data_01.json", "valid": "true"}, + map[string]string{"phase": "maxProperties validation", "test": "too long is invalid", "schema": "maxProperties/schema_0.json", "data": "maxProperties/data_02.json", "valid": "false", "errors": "array_max_properties"}, + map[string]string{"phase": "maxProperties validation", "test": "ignores non-objects", "schema": "maxProperties/schema_0.json", "data": "maxProperties/data_03.json", "valid": "true"}, + map[string]string{"phase": "by int", "test": "int by int", "schema": "multipleOf/schema_0.json", "data": "multipleOf/data_00.json", "valid": "true"}, + map[string]string{"phase": "by int", "test": "int by int fail", "schema": "multipleOf/schema_0.json", "data": "multipleOf/data_01.json", "valid": "false", "errors": "multiple_of"}, + map[string]string{"phase": "by int", "test": "ignores non-numbers", "schema": "multipleOf/schema_0.json", "data": "multipleOf/data_02.json", "valid": "true"}, + map[string]string{"phase": "by number", "test": "zero is multiple of anything", "schema": "multipleOf/schema_1.json", "data": "multipleOf/data_10.json", "valid": "true"}, + map[string]string{"phase": "by number", "test": "4.5 is multiple of 1.5", "schema": "multipleOf/schema_1.json", "data": "multipleOf/data_11.json", "valid": "true"}, + map[string]string{"phase": "by number", "test": "35 is not multiple of 1.5", "schema": "multipleOf/schema_1.json", "data": "multipleOf/data_12.json", "valid": "false", "errors": "multiple_of"}, + map[string]string{"phase": "by small number", "test": "0.0075 is multiple of 0.0001", "schema": "multipleOf/schema_2.json", "data": "multipleOf/data_20.json", "valid": "true"}, + map[string]string{"phase": "by small number", "test": "0.00751 is not multiple of 0.0001", "schema": "multipleOf/schema_2.json", "data": "multipleOf/data_21.json", "valid": "false", "errors": "multiple_of"}, + map[string]string{"phase": "minItems validation", "test": "longer is valid", "schema": "minItems/schema_0.json", "data": "minItems/data_00.json", "valid": "true"}, + map[string]string{"phase": "minItems validation", "test": "exact length is valid", "schema": "minItems/schema_0.json", "data": "minItems/data_01.json", "valid": "true"}, + map[string]string{"phase": "minItems validation", "test": "too short is invalid", "schema": "minItems/schema_0.json", "data": "minItems/data_02.json", "valid": "false", "errors": "array_min_items"}, + map[string]string{"phase": "minItems validation", "test": "ignores non-arrays", "schema": "minItems/schema_0.json", "data": "minItems/data_03.json", "valid": "true"}, + map[string]string{"phase": "maxItems validation", "test": "shorter is valid", "schema": "maxItems/schema_0.json", "data": "maxItems/data_00.json", "valid": "true"}, + map[string]string{"phase": "maxItems validation", "test": "exact length is valid", "schema": "maxItems/schema_0.json", "data": "maxItems/data_01.json", "valid": "true"}, + map[string]string{"phase": "maxItems validation", "test": "too long is invalid", "schema": "maxItems/schema_0.json", "data": "maxItems/data_02.json", "valid": "false", "errors": "array_max_items"}, + map[string]string{"phase": "maxItems validation", "test": "ignores non-arrays", "schema": "maxItems/schema_0.json", "data": "maxItems/data_03.json", "valid": "true"}, + map[string]string{"phase": "object properties validation", "test": "both properties present and valid is valid", "schema": "properties/schema_0.json", "data": "properties/data_00.json", "valid": "true"}, + map[string]string{"phase": "object properties validation", "test": "one property invalid is invalid", "schema": "properties/schema_0.json", "data": "properties/data_01.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "object properties validation", "test": "both properties invalid is invalid", "schema": "properties/schema_0.json", "data": "properties/data_02.json", "valid": "false", "errors": "invalid_type, invalid_type"}, + map[string]string{"phase": "object properties validation", "test": "doesn't invalidate other properties", "schema": "properties/schema_0.json", "data": "properties/data_03.json", "valid": "true"}, + map[string]string{"phase": "object properties validation", "test": "ignores non-objects", "schema": "properties/schema_0.json", "data": "properties/data_04.json", "valid": "true"}, + map[string]string{"phase": "properties, patternProperties, additionalProperties interaction", "test": "property validates property", "schema": "properties/schema_1.json", "data": "properties/data_10.json", "valid": "true"}, + map[string]string{"phase": "properties, patternProperties, additionalProperties interaction", "test": "property invalidates property", "schema": "properties/schema_1.json", "data": "properties/data_11.json", "valid": "false", "errors": "array_max_items"}, + map[string]string{"phase": "properties, patternProperties, additionalProperties interaction", "test": "patternProperty invalidates property", "schema": "properties/schema_1.json", "data": "properties/data_12.json", "valid": "false", "errors": "array_min_items, invalid_type"}, + map[string]string{"phase": "properties, patternProperties, additionalProperties interaction", "test": "patternProperty validates nonproperty", "schema": "properties/schema_1.json", "data": "properties/data_13.json", "valid": "true"}, + map[string]string{"phase": "properties, patternProperties, additionalProperties interaction", "test": "patternProperty invalidates nonproperty", "schema": "properties/schema_1.json", "data": "properties/data_14.json", "valid": "false", "errors": "array_min_items, invalid_type"}, + map[string]string{"phase": "properties, patternProperties, additionalProperties interaction", "test": "additionalProperty ignores property", "schema": "properties/schema_1.json", "data": "properties/data_15.json", "valid": "true"}, + map[string]string{"phase": "properties, patternProperties, additionalProperties interaction", "test": "additionalProperty validates others", "schema": "properties/schema_1.json", "data": "properties/data_16.json", "valid": "true"}, + map[string]string{"phase": "properties, patternProperties, additionalProperties interaction", "test": "additionalProperty invalidates others", "schema": "properties/schema_1.json", "data": "properties/data_17.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "root pointer ref", "test": "match", "schema": "ref/schema_0.json", "data": "ref/data_00.json", "valid": "true"}, + map[string]string{"phase": "root pointer ref", "test": "recursive match", "schema": "ref/schema_0.json", "data": "ref/data_01.json", "valid": "true"}, + map[string]string{"phase": "root pointer ref", "test": "mismatch", "schema": "ref/schema_0.json", "data": "ref/data_02.json", "valid": "false", "errors": "additional_property_not_allowed"}, + map[string]string{"phase": "root pointer ref", "test": "recursive mismatch", "schema": "ref/schema_0.json", "data": "ref/data_03.json", "valid": "false", "errors": "additional_property_not_allowed"}, + map[string]string{"phase": "relative pointer ref to object", "test": "match", "schema": "ref/schema_1.json", "data": "ref/data_10.json", "valid": "true"}, + map[string]string{"phase": "relative pointer ref to object", "test": "mismatch", "schema": "ref/schema_1.json", "data": "ref/data_11.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "relative pointer ref to array", "test": "match array", "schema": "ref/schema_2.json", "data": "ref/data_20.json", "valid": "true"}, + map[string]string{"phase": "relative pointer ref to array", "test": "mismatch array", "schema": "ref/schema_2.json", "data": "ref/data_21.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "escaped pointer ref", "test": "slash", "schema": "ref/schema_3.json", "data": "ref/data_30.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "escaped pointer ref", "test": "tilda", "schema": "ref/schema_3.json", "data": "ref/data_31.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "escaped pointer ref", "test": "percent", "schema": "ref/schema_3.json", "data": "ref/data_32.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "nested refs", "test": "nested ref valid", "schema": "ref/schema_4.json", "data": "ref/data_40.json", "valid": "true"}, + map[string]string{"phase": "nested refs", "test": "nested ref invalid", "schema": "ref/schema_4.json", "data": "ref/data_41.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "remote ref, containing refs itself", "test": "remote ref valid", "schema": "ref/schema_5.json", "data": "ref/data_50.json", "valid": "true"}, + map[string]string{"phase": "remote ref, containing refs itself", "test": "remote ref invalid", "schema": "ref/schema_5.json", "data": "ref/data_51.json", "valid": "false", "errors": "number_all_of, number_gte"}, + map[string]string{"phase": "a schema given for items", "test": "valid items", "schema": "items/schema_0.json", "data": "items/data_00.json", "valid": "true"}, + map[string]string{"phase": "a schema given for items", "test": "wrong type of items", "schema": "items/schema_0.json", "data": "items/data_01.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "a schema given for items", "test": "ignores non-arrays", "schema": "items/schema_0.json", "data": "items/data_02.json", "valid": "true"}, + map[string]string{"phase": "an array of schemas for items", "test": "correct types", "schema": "items/schema_1.json", "data": "items/data_10.json", "valid": "true"}, + map[string]string{"phase": "an array of schemas for items", "test": "wrong types", "schema": "items/schema_1.json", "data": "items/data_11.json", "valid": "false", "errors": "invalid_type, invalid_type"}, + map[string]string{"phase": "valid definition", "test": "valid definition schema", "schema": "definitions/schema_0.json", "data": "definitions/data_00.json", "valid": "true"}, + map[string]string{"phase": "invalid definition", "test": "invalid definition schema", "schema": "definitions/schema_1.json", "data": "definitions/data_10.json", "valid": "false", "errors": "number_any_of, enum"}, + map[string]string{"phase": "additionalItems as schema", "test": "additional items match schema", "schema": "additionalItems/schema_0.json", "data": "additionalItems/data_00.json", "valid": "true"}, + map[string]string{"phase": "additionalItems as schema", "test": "additional items do not match schema", "schema": "additionalItems/schema_0.json", "data": "additionalItems/data_01.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "items is schema, no additionalItems", "test": "all items match schema", "schema": "additionalItems/schema_1.json", "data": "additionalItems/data_10.json", "valid": "true"}, + map[string]string{"phase": "array of items with no additionalItems", "test": "no additional items present", "schema": "additionalItems/schema_2.json", "data": "additionalItems/data_20.json", "valid": "true"}, + map[string]string{"phase": "array of items with no additionalItems", "test": "additional items are not permitted", "schema": "additionalItems/schema_2.json", "data": "additionalItems/data_21.json", "valid": "false", "errors": "array_no_additional_items"}, + map[string]string{"phase": "additionalItems as false without items", "test": "items defaults to empty schema so everything is valid", "schema": "additionalItems/schema_3.json", "data": "additionalItems/data_30.json", "valid": "true"}, + map[string]string{"phase": "additionalItems as false without items", "test": "ignores non-arrays", "schema": "additionalItems/schema_3.json", "data": "additionalItems/data_31.json", "valid": "true"}, + map[string]string{"phase": "additionalItems are allowed by default", "test": "only the first item is validated", "schema": "additionalItems/schema_4.json", "data": "additionalItems/data_40.json", "valid": "true"}, + map[string]string{"phase": "additionalProperties being false does not allow other properties", "test": "no additional properties is valid", "schema": "additionalProperties/schema_0.json", "data": "additionalProperties/data_00.json", "valid": "true"}, + map[string]string{"phase": "additionalProperties being false does not allow other properties", "test": "an additional property is invalid", "schema": "additionalProperties/schema_0.json", "data": "additionalProperties/data_01.json", "valid": "false", "errors": "additional_property_not_allowed"}, + map[string]string{"phase": "additionalProperties being false does not allow other properties", "test": "ignores non-objects", "schema": "additionalProperties/schema_0.json", "data": "additionalProperties/data_02.json", "valid": "true"}, + map[string]string{"phase": "additionalProperties being false does not allow other properties", "test": "patternProperties are not additional properties", "schema": "additionalProperties/schema_0.json", "data": "additionalProperties/data_03.json", "valid": "true"}, + map[string]string{"phase": "additionalProperties allows a schema which should validate", "test": "no additional properties is valid", "schema": "additionalProperties/schema_1.json", "data": "additionalProperties/data_10.json", "valid": "true"}, + map[string]string{"phase": "additionalProperties allows a schema which should validate", "test": "an additional valid property is valid", "schema": "additionalProperties/schema_1.json", "data": "additionalProperties/data_11.json", "valid": "true"}, + map[string]string{"phase": "additionalProperties allows a schema which should validate", "test": "an additional invalid property is invalid", "schema": "additionalProperties/schema_1.json", "data": "additionalProperties/data_12.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "additionalProperties are allowed by default", "test": "additional properties are allowed", "schema": "additionalProperties/schema_2.json", "data": "additionalProperties/data_20.json", "valid": "true"}, + map[string]string{"phase": "dependencies", "test": "neither", "schema": "dependencies/schema_0.json", "data": "dependencies/data_00.json", "valid": "true"}, + map[string]string{"phase": "dependencies", "test": "nondependant", "schema": "dependencies/schema_0.json", "data": "dependencies/data_01.json", "valid": "true"}, + map[string]string{"phase": "dependencies", "test": "with dependency", "schema": "dependencies/schema_0.json", "data": "dependencies/data_02.json", "valid": "true"}, + map[string]string{"phase": "dependencies", "test": "missing dependency", "schema": "dependencies/schema_0.json", "data": "dependencies/data_03.json", "valid": "false", "errors": "missing_dependency"}, + map[string]string{"phase": "dependencies", "test": "ignores non-objects", "schema": "dependencies/schema_0.json", "data": "dependencies/data_04.json", "valid": "true"}, + map[string]string{"phase": "multiple dependencies", "test": "neither", "schema": "dependencies/schema_1.json", "data": "dependencies/data_10.json", "valid": "true"}, + map[string]string{"phase": "multiple dependencies", "test": "nondependants", "schema": "dependencies/schema_1.json", "data": "dependencies/data_11.json", "valid": "true"}, + map[string]string{"phase": "multiple dependencies", "test": "with dependencies", "schema": "dependencies/schema_1.json", "data": "dependencies/data_12.json", "valid": "true"}, + map[string]string{"phase": "multiple dependencies", "test": "missing dependency", "schema": "dependencies/schema_1.json", "data": "dependencies/data_13.json", "valid": "false", "errors": "missing_dependency"}, + map[string]string{"phase": "multiple dependencies", "test": "missing other dependency", "schema": "dependencies/schema_1.json", "data": "dependencies/data_14.json", "valid": "false", "errors": "missing_dependency"}, + map[string]string{"phase": "multiple dependencies", "test": "missing both dependencies", "schema": "dependencies/schema_1.json", "data": "dependencies/data_15.json", "valid": "false", "errors": "missing_dependency, missing_dependency"}, + map[string]string{"phase": "multiple dependencies subschema", "test": "valid", "schema": "dependencies/schema_2.json", "data": "dependencies/data_20.json", "valid": "true"}, + map[string]string{"phase": "multiple dependencies subschema", "test": "no dependency", "schema": "dependencies/schema_2.json", "data": "dependencies/data_21.json", "valid": "true"}, + map[string]string{"phase": "multiple dependencies subschema", "test": "wrong type", "schema": "dependencies/schema_2.json", "data": "dependencies/data_22.json", "valid": "false"}, + map[string]string{"phase": "multiple dependencies subschema", "test": "wrong type other", "schema": "dependencies/schema_2.json", "data": "dependencies/data_23.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "multiple dependencies subschema", "test": "wrong type both", "schema": "dependencies/schema_2.json", "data": "dependencies/data_24.json", "valid": "false", "errors": "invalid_type, invalid_type"}, + map[string]string{"phase": "patternProperties validates properties matching a regex", "test": "a single valid match is valid", "schema": "patternProperties/schema_0.json", "data": "patternProperties/data_00.json", "valid": "true"}, + map[string]string{"phase": "patternProperties validates properties matching a regex", "test": "multiple valid matches is valid", "schema": "patternProperties/schema_0.json", "data": "patternProperties/data_01.json", "valid": "true"}, + map[string]string{"phase": "patternProperties validates properties matching a regex", "test": "a single invalid match is invalid", "schema": "patternProperties/schema_0.json", "data": "patternProperties/data_02.json", "valid": "false", "errors": "invalid_property_pattern, invalid_type"}, + map[string]string{"phase": "patternProperties validates properties matching a regex", "test": "multiple invalid matches is invalid", "schema": "patternProperties/schema_0.json", "data": "patternProperties/data_03.json", "valid": "false", "errors": "invalid_property_pattern, invalid_property_pattern, invalid_type, invalid_type"}, + map[string]string{"phase": "patternProperties validates properties matching a regex", "test": "ignores non-objects", "schema": "patternProperties/schema_0.json", "data": "patternProperties/data_04.json", "valid": "true"}, + map[string]string{"phase": "patternProperties validates properties matching a regex", "test": "with additionalProperties combination", "schema": "patternProperties/schema_3.json", "data": "patternProperties/data_24.json", "valid": "false", "errors": "additional_property_not_allowed"}, + map[string]string{"phase": "patternProperties validates properties matching a regex", "test": "with additionalProperties combination", "schema": "patternProperties/schema_3.json", "data": "patternProperties/data_25.json", "valid": "false", "errors": "additional_property_not_allowed"}, + map[string]string{"phase": "patternProperties validates properties matching a regex", "test": "with additionalProperties combination", "schema": "patternProperties/schema_4.json", "data": "patternProperties/data_26.json", "valid": "false", "errors": "additional_property_not_allowed"}, + map[string]string{"phase": "multiple simultaneous patternProperties are validated", "test": "a single valid match is valid", "schema": "patternProperties/schema_1.json", "data": "patternProperties/data_10.json", "valid": "true"}, + map[string]string{"phase": "multiple simultaneous patternProperties are validated", "test": "a simultaneous match is valid", "schema": "patternProperties/schema_1.json", "data": "patternProperties/data_11.json", "valid": "true"}, + map[string]string{"phase": "multiple simultaneous patternProperties are validated", "test": "multiple matches is valid", "schema": "patternProperties/schema_1.json", "data": "patternProperties/data_12.json", "valid": "true"}, + map[string]string{"phase": "multiple simultaneous patternProperties are validated", "test": "an invalid due to one is invalid", "schema": "patternProperties/schema_1.json", "data": "patternProperties/data_13.json", "valid": "false", "errors": "invalid_property_pattern, invalid_type"}, + map[string]string{"phase": "multiple simultaneous patternProperties are validated", "test": "an invalid due to the other is invalid", "schema": "patternProperties/schema_1.json", "data": "patternProperties/data_14.json", "valid": "false", "errors": "number_lte"}, + map[string]string{"phase": "multiple simultaneous patternProperties are validated", "test": "an invalid due to both is invalid", "schema": "patternProperties/schema_1.json", "data": "patternProperties/data_15.json", "valid": "false", "errors": "invalid_type, number_lte"}, + map[string]string{"phase": "regexes are not anchored by default and are case sensitive", "test": "non recognized members are ignored", "schema": "patternProperties/schema_2.json", "data": "patternProperties/data_20.json", "valid": "true"}, + map[string]string{"phase": "regexes are not anchored by default and are case sensitive", "test": "recognized members are accounted for", "schema": "patternProperties/schema_2.json", "data": "patternProperties/data_21.json", "valid": "false", "errors": "invalid_property_pattern, invalid_type"}, + map[string]string{"phase": "regexes are not anchored by default and are case sensitive", "test": "regexes are case sensitive", "schema": "patternProperties/schema_2.json", "data": "patternProperties/data_22.json", "valid": "true"}, + map[string]string{"phase": "regexes are not anchored by default and are case sensitive", "test": "regexes are case sensitive, 2", "schema": "patternProperties/schema_2.json", "data": "patternProperties/data_23.json", "valid": "false", "errors": "invalid_property_pattern, invalid_type"}, + map[string]string{"phase": "remote ref", "test": "remote ref valid", "schema": "refRemote/schema_0.json", "data": "refRemote/data_00.json", "valid": "true"}, + map[string]string{"phase": "remote ref", "test": "remote ref invalid", "schema": "refRemote/schema_0.json", "data": "refRemote/data_01.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "fragment within remote ref", "test": "remote fragment valid", "schema": "refRemote/schema_1.json", "data": "refRemote/data_10.json", "valid": "true"}, + map[string]string{"phase": "fragment within remote ref", "test": "remote fragment invalid", "schema": "refRemote/schema_1.json", "data": "refRemote/data_11.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "ref within remote ref", "test": "ref within ref valid", "schema": "refRemote/schema_2.json", "data": "refRemote/data_20.json", "valid": "true"}, + map[string]string{"phase": "ref within remote ref", "test": "ref within ref invalid", "schema": "refRemote/schema_2.json", "data": "refRemote/data_21.json", "valid": "false", "errors": "invalid_type"}, + map[string]string{"phase": "format validation", "test": "email format is invalid", "schema": "format/schema_0.json", "data": "format/data_00.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "email format is invalid", "schema": "format/schema_0.json", "data": "format/data_01.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "email format valid", "schema": "format/schema_0.json", "data": "format/data_02.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "invoice format valid", "schema": "format/schema_1.json", "data": "format/data_03.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "invoice format is invalid", "schema": "format/schema_1.json", "data": "format/data_04.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "date-time format is valid", "schema": "format/schema_2.json", "data": "format/data_05.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "date-time format is valid", "schema": "format/schema_2.json", "data": "format/data_06.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "date-time format is invalid", "schema": "format/schema_2.json", "data": "format/data_07.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "date-time format is valid", "schema": "format/schema_2.json", "data": "format/data_08.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "date-time format is valid", "schema": "format/schema_2.json", "data": "format/data_09.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "date-time format is valid", "schema": "format/schema_2.json", "data": "format/data_10.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "date-time format is valid", "schema": "format/schema_2.json", "data": "format/data_11.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "date-time format is valid", "schema": "format/schema_2.json", "data": "format/data_12.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "hostname format is valid", "schema": "format/schema_3.json", "data": "format/data_13.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "hostname format is valid", "schema": "format/schema_3.json", "data": "format/data_14.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "hostname format is valid", "schema": "format/schema_3.json", "data": "format/data_15.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "hostname format is invalid", "schema": "format/schema_3.json", "data": "format/data_16.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "hostname format is invalid", "schema": "format/schema_3.json", "data": "format/data_17.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "ipv4 format is valid", "schema": "format/schema_4.json", "data": "format/data_18.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "ipv4 format is invalid", "schema": "format/schema_4.json", "data": "format/data_19.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "ipv6 format is valid", "schema": "format/schema_5.json", "data": "format/data_20.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "ipv6 format is valid", "schema": "format/schema_5.json", "data": "format/data_21.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "ipv6 format is invalid", "schema": "format/schema_5.json", "data": "format/data_22.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "ipv6 format is invalid", "schema": "format/schema_5.json", "data": "format/data_23.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "uri format is valid", "schema": "format/schema_6.json", "data": "format/data_24.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "uri format is valid", "schema": "format/schema_6.json", "data": "format/data_25.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "uri format is valid", "schema": "format/schema_6.json", "data": "format/data_26.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "uri format is valid", "schema": "format/schema_6.json", "data": "format/data_27.json", "valid": "true"}, + map[string]string{"phase": "format validation", "test": "uri format is invalid", "schema": "format/schema_6.json", "data": "format/data_28.json", "valid": "false", "errors": "format"}, + map[string]string{"phase": "format validation", "test": "uri format is invalid", "schema": "format/schema_6.json", "data": "format/data_13.json", "valid": "false", "errors": "format"}, + } + + //TODO Pass failed tests : id(s) as scope for references is not implemented yet + //map[string]string{"phase": "change resolution scope", "test": "changed scope ref valid", "schema": "refRemote/schema_3.json", "data": "refRemote/data_30.json", "valid": "true"}, + //map[string]string{"phase": "change resolution scope", "test": "changed scope ref invalid", "schema": "refRemote/schema_3.json", "data": "refRemote/data_31.json", "valid": "false"}} + + // Setup a small http server on localhost:1234 for testing purposes + + wd, err := os.Getwd() + if err != nil { + panic(err.Error()) + } + + testwd := wd + "/json_schema_test_suite" + + go func() { + err := http.ListenAndServe(":1234", http.FileServer(http.Dir(testwd+"/refRemote/remoteFiles"))) + if err != nil { + panic(err.Error()) + } + }() + + // Used for remote schema in ref/schema_5.json that defines "regex" type + FormatCheckers.Add("regex", alwaysTrueFormatChecker{}) + + // Custom Formatter + FormatCheckers.Add("invoice", invoiceFormatChecker{}) + + // Launch tests + + for testJsonIndex, testJson := range JsonSchemaTestSuiteMap { + + fmt.Printf("Test (%d) | %s :: %s\n", testJsonIndex, testJson["phase"], testJson["test"]) + + schemaLoader := NewReferenceLoader("file://" + testwd + "/" + testJson["schema"]) + documentLoader := NewReferenceLoader("file://" + testwd + "/" + testJson["data"]) + + // validate + result, err := Validate(schemaLoader, documentLoader) + if err != nil { + t.Errorf("Error (%s)\n", err.Error()) + } + givenValid := result.Valid() + + if displayErrorMessages { + for vErrI, vErr := range result.Errors() { + fmt.Printf(" Error (%d) | %s\n", vErrI, vErr) + } + } + + expectedValid, _ := strconv.ParseBool(testJson["valid"]) + if givenValid != expectedValid { + t.Errorf("Test failed : %s :: %s, expects %t, given %t\n", testJson["phase"], testJson["test"], expectedValid, givenValid) + } + + if !givenValid && testJson["errors"] != "" { + expectedErrors := rxSplitErrors.Split(testJson["errors"], -1) + errors := result.Errors() + if len(errors) != len(expectedErrors) { + t.Errorf("Test failed : %s :: %s, expects %d errors, given %d errors\n", testJson["phase"], testJson["test"], len(expectedErrors), len(errors)) + } + + actualErrors := make([]string, 0) + for _, e := range result.Errors() { + actualErrors = append(actualErrors, e.Type()) + } + + sort.Strings(actualErrors) + sort.Strings(expectedErrors) + if !reflect.DeepEqual(actualErrors, expectedErrors) { + t.Errorf("Test failed : %s :: %s, expected '%s' errors, given '%s' errors\n", testJson["phase"], testJson["test"], strings.Join(expectedErrors, ", "), strings.Join(actualErrors, ", ")) + } + } + + } + + fmt.Printf("\n%d tests performed / %d total tests to perform ( %.2f %% )\n", len(JsonSchemaTestSuiteMap), 248, float32(len(JsonSchemaTestSuiteMap))/248.0*100.0) +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/subSchema.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/subSchema.go new file mode 100644 index 00000000..b249b7e5 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/subSchema.go @@ -0,0 +1,227 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Defines the structure of a sub-subSchema. +// A sub-subSchema can contain other sub-schemas. +// +// created 27-02-2013 + +package gojsonschema + +import ( + "errors" + "regexp" + "strings" + + "github.com/xeipuuv/gojsonreference" +) + +const ( + KEY_SCHEMA = "$subSchema" + KEY_ID = "$id" + KEY_REF = "$ref" + KEY_TITLE = "title" + KEY_DESCRIPTION = "description" + KEY_TYPE = "type" + KEY_ITEMS = "items" + KEY_ADDITIONAL_ITEMS = "additionalItems" + KEY_PROPERTIES = "properties" + KEY_PATTERN_PROPERTIES = "patternProperties" + KEY_ADDITIONAL_PROPERTIES = "additionalProperties" + KEY_DEFINITIONS = "definitions" + KEY_MULTIPLE_OF = "multipleOf" + KEY_MINIMUM = "minimum" + KEY_MAXIMUM = "maximum" + KEY_EXCLUSIVE_MINIMUM = "exclusiveMinimum" + KEY_EXCLUSIVE_MAXIMUM = "exclusiveMaximum" + KEY_MIN_LENGTH = "minLength" + KEY_MAX_LENGTH = "maxLength" + KEY_PATTERN = "pattern" + KEY_FORMAT = "format" + KEY_MIN_PROPERTIES = "minProperties" + KEY_MAX_PROPERTIES = "maxProperties" + KEY_DEPENDENCIES = "dependencies" + KEY_REQUIRED = "required" + KEY_MIN_ITEMS = "minItems" + KEY_MAX_ITEMS = "maxItems" + KEY_UNIQUE_ITEMS = "uniqueItems" + KEY_ENUM = "enum" + KEY_ONE_OF = "oneOf" + KEY_ANY_OF = "anyOf" + KEY_ALL_OF = "allOf" + KEY_NOT = "not" +) + +type subSchema struct { + + // basic subSchema meta properties + id *string + title *string + description *string + + property string + + // Types associated with the subSchema + types jsonSchemaType + + // Reference url + ref *gojsonreference.JsonReference + // Schema referenced + refSchema *subSchema + // Json reference + subSchema *gojsonreference.JsonReference + + // hierarchy + parent *subSchema + definitions map[string]*subSchema + definitionsChildren []*subSchema + itemsChildren []*subSchema + itemsChildrenIsSingleSchema bool + propertiesChildren []*subSchema + + // validation : number / integer + multipleOf *float64 + maximum *float64 + exclusiveMaximum bool + minimum *float64 + exclusiveMinimum bool + + // validation : string + minLength *int + maxLength *int + pattern *regexp.Regexp + format string + + // validation : object + minProperties *int + maxProperties *int + required []string + + dependencies map[string]interface{} + additionalProperties interface{} + patternProperties map[string]*subSchema + + // validation : array + minItems *int + maxItems *int + uniqueItems bool + + additionalItems interface{} + + // validation : all + enum []string + + // validation : subSchema + oneOf []*subSchema + anyOf []*subSchema + allOf []*subSchema + not *subSchema +} + +func (s *subSchema) AddEnum(i interface{}) error { + + is, err := marshalToJsonString(i) + if err != nil { + return err + } + + if isStringInSlice(s.enum, *is) { + return errors.New(formatErrorDescription( + Locale.KeyItemsMustBeUnique(), + ErrorDetails{"key": KEY_ENUM}, + )) + } + + s.enum = append(s.enum, *is) + + return nil +} + +func (s *subSchema) ContainsEnum(i interface{}) (bool, error) { + + is, err := marshalToJsonString(i) + if err != nil { + return false, err + } + + return isStringInSlice(s.enum, *is), nil +} + +func (s *subSchema) AddOneOf(subSchema *subSchema) { + s.oneOf = append(s.oneOf, subSchema) +} + +func (s *subSchema) AddAllOf(subSchema *subSchema) { + s.allOf = append(s.allOf, subSchema) +} + +func (s *subSchema) AddAnyOf(subSchema *subSchema) { + s.anyOf = append(s.anyOf, subSchema) +} + +func (s *subSchema) SetNot(subSchema *subSchema) { + s.not = subSchema +} + +func (s *subSchema) AddRequired(value string) error { + + if isStringInSlice(s.required, value) { + return errors.New(formatErrorDescription( + Locale.KeyItemsMustBeUnique(), + ErrorDetails{"key": KEY_REQUIRED}, + )) + } + + s.required = append(s.required, value) + + return nil +} + +func (s *subSchema) AddDefinitionChild(child *subSchema) { + s.definitionsChildren = append(s.definitionsChildren, child) +} + +func (s *subSchema) AddItemsChild(child *subSchema) { + s.itemsChildren = append(s.itemsChildren, child) +} + +func (s *subSchema) AddPropertiesChild(child *subSchema) { + s.propertiesChildren = append(s.propertiesChildren, child) +} + +func (s *subSchema) PatternPropertiesString() string { + + if s.patternProperties == nil || len(s.patternProperties) == 0 { + return STRING_UNDEFINED // should never happen + } + + patternPropertiesKeySlice := []string{} + for pk, _ := range s.patternProperties { + patternPropertiesKeySlice = append(patternPropertiesKeySlice, `"`+pk+`"`) + } + + if len(patternPropertiesKeySlice) == 1 { + return patternPropertiesKeySlice[0] + } + + return "[" + strings.Join(patternPropertiesKeySlice, ",") + "]" + +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/types.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/types.go new file mode 100644 index 00000000..952d22ef --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/types.go @@ -0,0 +1,58 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Contains const types for schema and JSON. +// +// created 28-02-2013 + +package gojsonschema + +const ( + TYPE_ARRAY = `array` + TYPE_BOOLEAN = `boolean` + TYPE_INTEGER = `integer` + TYPE_NUMBER = `number` + TYPE_NULL = `null` + TYPE_OBJECT = `object` + TYPE_STRING = `string` +) + +var JSON_TYPES []string +var SCHEMA_TYPES []string + +func init() { + JSON_TYPES = []string{ + TYPE_ARRAY, + TYPE_BOOLEAN, + TYPE_INTEGER, + TYPE_NUMBER, + TYPE_NULL, + TYPE_OBJECT, + TYPE_STRING} + + SCHEMA_TYPES = []string{ + TYPE_ARRAY, + TYPE_BOOLEAN, + TYPE_INTEGER, + TYPE_NUMBER, + TYPE_OBJECT, + TYPE_STRING} +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/utils.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/utils.go new file mode 100644 index 00000000..4cbe0dcc --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/utils.go @@ -0,0 +1,203 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Various utility functions. +// +// created 26-02-2013 + +package gojsonschema + +import ( + "encoding/json" + "fmt" + "math" + "reflect" + "strconv" +) + +func isKind(what interface{}, kind reflect.Kind) bool { + return reflect.ValueOf(what).Kind() == kind +} + +func existsMapKey(m map[string]interface{}, k string) bool { + _, ok := m[k] + return ok +} + +func isStringInSlice(s []string, what string) bool { + for i := range s { + if s[i] == what { + return true + } + } + return false +} + +func marshalToJsonString(value interface{}) (*string, error) { + + mBytes, err := json.Marshal(value) + if err != nil { + return nil, err + } + + sBytes := string(mBytes) + return &sBytes, nil +} + +func isJsonNumber(what interface{}) bool { + + switch what.(type) { + + case json.Number: + return true + } + + return false +} + +func checkJsonNumber(what interface{}) (isValidFloat64 bool, isValidInt64 bool, isValidInt32 bool) { + + jsonNumber := what.(json.Number) + + f64, errFloat64 := jsonNumber.Float64() + s64 := strconv.FormatFloat(f64, 'f', -1, 64) + _, errInt64 := strconv.ParseInt(s64, 10, 64) + + isValidFloat64 = errFloat64 == nil + isValidInt64 = errInt64 == nil + + _, errInt32 := strconv.ParseInt(s64, 10, 32) + isValidInt32 = isValidInt64 && errInt32 == nil + + return + +} + +// same as ECMA Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER +const ( + max_json_float = float64(1<<53 - 1) // 9007199254740991.0 2^53 - 1 + min_json_float = -float64(1<<53 - 1) //-9007199254740991.0 -2^53 - 1 +) + +func isFloat64AnInteger(f float64) bool { + + if math.IsNaN(f) || math.IsInf(f, 0) || f < min_json_float || f > max_json_float { + return false + } + + return f == float64(int64(f)) || f == float64(uint64(f)) +} + +func mustBeInteger(what interface{}) *int { + + if isJsonNumber(what) { + + number := what.(json.Number) + + _, _, isValidInt32 := checkJsonNumber(number) + + if isValidInt32 { + + int64Value, err := number.Int64() + if err != nil { + return nil + } + + int32Value := int(int64Value) + return &int32Value + + } else { + return nil + } + + } + + return nil +} + +func mustBeNumber(what interface{}) *float64 { + + if isJsonNumber(what) { + + number := what.(json.Number) + float64Value, err := number.Float64() + + if err == nil { + return &float64Value + } else { + return nil + } + + } + + return nil + +} + +// formats a number so that it is displayed as the smallest string possible +func resultErrorFormatJsonNumber(n json.Number) string { + + if int64Value, err := n.Int64(); err == nil { + return fmt.Sprintf("%d", int64Value) + } + + float64Value, _ := n.Float64() + + return fmt.Sprintf("%g", float64Value) +} + +// formats a number so that it is displayed as the smallest string possible +func resultErrorFormatNumber(n float64) string { + + if isFloat64AnInteger(n) { + return fmt.Sprintf("%d", int64(n)) + } + + return fmt.Sprintf("%g", n) +} + +func convertDocumentNode(val interface{}) interface{} { + + if lval, ok := val.([]interface{}); ok { + + res := []interface{}{} + for _, v := range lval { + res = append(res, convertDocumentNode(v)) + } + + return res + + } + + if mval, ok := val.(map[interface{}]interface{}); ok { + + res := map[string]interface{}{} + + for k, v := range mval { + res[k.(string)] = convertDocumentNode(v) + } + + return res + + } + + return val +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/utils_test.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/utils_test.go new file mode 100644 index 00000000..489577d4 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/utils_test.go @@ -0,0 +1,64 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author janmentzel +// author-github https://github.com/janmentzel +// author-mail ? ( forward to xeipuuv@gmail.com ) +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description (Unit) Tests for utils ( Float / Integer conversion ). +// +// created 08-08-2013 + +package gojsonschema + +import ( + "github.com/stretchr/testify/assert" + "math" + "testing" +) + +func TestResultErrorFormatNumber(t *testing.T) { + + assert.Equal(t, "1", resultErrorFormatNumber(1)) + assert.Equal(t, "-1", resultErrorFormatNumber(-1)) + assert.Equal(t, "0", resultErrorFormatNumber(0)) + // unfortunately, can not be recognized as float + assert.Equal(t, "0", resultErrorFormatNumber(0.0)) + + assert.Equal(t, "1.001", resultErrorFormatNumber(1.001)) + assert.Equal(t, "-1.001", resultErrorFormatNumber(-1.001)) + assert.Equal(t, "0.0001", resultErrorFormatNumber(0.0001)) + + // casting math.MaxInt64 (1<<63 -1) to float back to int64 + // becomes negative. obviousely because of bit missinterpretation. + // so simply test a slightly smaller "large" integer here + assert.Equal(t, "4.611686018427388e+18", resultErrorFormatNumber(1<<62)) + // with negative int64 max works + assert.Equal(t, "-9.223372036854776e+18", resultErrorFormatNumber(math.MinInt64)) + assert.Equal(t, "-4.611686018427388e+18", resultErrorFormatNumber(-1<<62)) + + assert.Equal(t, "10000000000", resultErrorFormatNumber(1e10)) + assert.Equal(t, "-10000000000", resultErrorFormatNumber(-1e10)) + + assert.Equal(t, "1.000000000001", resultErrorFormatNumber(1.000000000001)) + assert.Equal(t, "-1.000000000001", resultErrorFormatNumber(-1.000000000001)) + assert.Equal(t, "1e-10", resultErrorFormatNumber(1e-10)) + assert.Equal(t, "-1e-10", resultErrorFormatNumber(-1e-10)) + assert.Equal(t, "4.6116860184273876e+07", resultErrorFormatNumber(4.611686018427387904e7)) + assert.Equal(t, "-4.6116860184273876e+07", resultErrorFormatNumber(-4.611686018427387904e7)) + +} diff --git a/vendor/_nuts/github.com/xeipuuv/gojsonschema/validation.go b/vendor/_nuts/github.com/xeipuuv/gojsonschema/validation.go new file mode 100644 index 00000000..2dc0df22 --- /dev/null +++ b/vendor/_nuts/github.com/xeipuuv/gojsonschema/validation.go @@ -0,0 +1,829 @@ +// Copyright 2015 xeipuuv ( https://github.com/xeipuuv ) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// author xeipuuv +// author-github https://github.com/xeipuuv +// author-mail xeipuuv@gmail.com +// +// repository-name gojsonschema +// repository-desc An implementation of JSON Schema, based on IETF's draft v4 - Go language. +// +// description Extends Schema and subSchema, implements the validation phase. +// +// created 28-02-2013 + +package gojsonschema + +import ( + "encoding/json" + "reflect" + "regexp" + "strconv" + "strings" + "unicode/utf8" +) + +func Validate(ls JSONLoader, ld JSONLoader) (*Result, error) { + + var err error + + // load schema + + schema, err := NewSchema(ls) + if err != nil { + return nil, err + } + + // begine validation + + return schema.Validate(ld) + +} + +func (v *Schema) Validate(l JSONLoader) (*Result, error) { + + // load document + + root, err := l.loadJSON() + if err != nil { + return nil, err + } + + // begin validation + + result := &Result{} + context := newJsonContext(STRING_CONTEXT_ROOT, nil) + v.rootSchema.validateRecursive(v.rootSchema, root, result, context) + + return result, nil + +} + +func (v *subSchema) subValidateWithContext(document interface{}, context *jsonContext) *Result { + result := &Result{} + v.validateRecursive(v, document, result, context) + return result +} + +// Walker function to validate the json recursively against the subSchema +func (v *subSchema) validateRecursive(currentSubSchema *subSchema, currentNode interface{}, result *Result, context *jsonContext) { + + if internalLogEnabled { + internalLog("validateRecursive %s", context.String()) + internalLog(" %v", currentNode) + } + + // Handle referenced schemas, returns directly when a $ref is found + if currentSubSchema.refSchema != nil { + v.validateRecursive(currentSubSchema.refSchema, currentNode, result, context) + return + } + + // Check for null value + if currentNode == nil { + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_NULL) { + result.addError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_NULL, + }, + ) + return + } + + currentSubSchema.validateSchema(currentSubSchema, currentNode, result, context) + v.validateCommon(currentSubSchema, currentNode, result, context) + + } else { // Not a null value + + if isJsonNumber(currentNode) { + + value := currentNode.(json.Number) + + _, isValidInt64, _ := checkJsonNumber(value) + + validType := currentSubSchema.types.Contains(TYPE_NUMBER) || (isValidInt64 && currentSubSchema.types.Contains(TYPE_INTEGER)) + + if currentSubSchema.types.IsTyped() && !validType { + + givenType := TYPE_INTEGER + if !isValidInt64 { + givenType = TYPE_NUMBER + } + + result.addError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": givenType, + }, + ) + return + } + + currentSubSchema.validateSchema(currentSubSchema, value, result, context) + v.validateNumber(currentSubSchema, value, result, context) + v.validateCommon(currentSubSchema, value, result, context) + v.validateString(currentSubSchema, value, result, context) + + } else { + + rValue := reflect.ValueOf(currentNode) + rKind := rValue.Kind() + + switch rKind { + + // Slice => JSON array + + case reflect.Slice: + + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_ARRAY) { + result.addError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_ARRAY, + }, + ) + return + } + + castCurrentNode := currentNode.([]interface{}) + + currentSubSchema.validateSchema(currentSubSchema, castCurrentNode, result, context) + + v.validateArray(currentSubSchema, castCurrentNode, result, context) + v.validateCommon(currentSubSchema, castCurrentNode, result, context) + + // Map => JSON object + + case reflect.Map: + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_OBJECT) { + result.addError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_OBJECT, + }, + ) + return + } + + castCurrentNode, ok := currentNode.(map[string]interface{}) + if !ok { + castCurrentNode = convertDocumentNode(currentNode).(map[string]interface{}) + } + + currentSubSchema.validateSchema(currentSubSchema, castCurrentNode, result, context) + + v.validateObject(currentSubSchema, castCurrentNode, result, context) + v.validateCommon(currentSubSchema, castCurrentNode, result, context) + + for _, pSchema := range currentSubSchema.propertiesChildren { + nextNode, ok := castCurrentNode[pSchema.property] + if ok { + subContext := newJsonContext(pSchema.property, context) + v.validateRecursive(pSchema, nextNode, result, subContext) + } + } + + // Simple JSON values : string, number, boolean + + case reflect.Bool: + + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_BOOLEAN) { + result.addError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_BOOLEAN, + }, + ) + return + } + + value := currentNode.(bool) + + currentSubSchema.validateSchema(currentSubSchema, value, result, context) + v.validateNumber(currentSubSchema, value, result, context) + v.validateCommon(currentSubSchema, value, result, context) + v.validateString(currentSubSchema, value, result, context) + + case reflect.String: + + if currentSubSchema.types.IsTyped() && !currentSubSchema.types.Contains(TYPE_STRING) { + result.addError( + new(InvalidTypeError), + context, + currentNode, + ErrorDetails{ + "expected": currentSubSchema.types.String(), + "given": TYPE_STRING, + }, + ) + return + } + + value := currentNode.(string) + + currentSubSchema.validateSchema(currentSubSchema, value, result, context) + v.validateNumber(currentSubSchema, value, result, context) + v.validateCommon(currentSubSchema, value, result, context) + v.validateString(currentSubSchema, value, result, context) + + } + + } + + } + + result.incrementScore() +} + +// Different kinds of validation there, subSchema / common / array / object / string... +func (v *subSchema) validateSchema(currentSubSchema *subSchema, currentNode interface{}, result *Result, context *jsonContext) { + + if internalLogEnabled { + internalLog("validateSchema %s", context.String()) + internalLog(" %v", currentNode) + } + + if len(currentSubSchema.anyOf) > 0 { + + validatedAnyOf := false + var bestValidationResult *Result + + for _, anyOfSchema := range currentSubSchema.anyOf { + if !validatedAnyOf { + validationResult := anyOfSchema.subValidateWithContext(currentNode, context) + validatedAnyOf = validationResult.Valid() + + if !validatedAnyOf && (bestValidationResult == nil || validationResult.score > bestValidationResult.score) { + bestValidationResult = validationResult + } + } + } + if !validatedAnyOf { + + result.addError(new(NumberAnyOfError), context, currentNode, ErrorDetails{}) + + if bestValidationResult != nil { + // add error messages of closest matching subSchema as + // that's probably the one the user was trying to match + result.mergeErrors(bestValidationResult) + } + } + } + + if len(currentSubSchema.oneOf) > 0 { + + nbValidated := 0 + var bestValidationResult *Result + + for _, oneOfSchema := range currentSubSchema.oneOf { + validationResult := oneOfSchema.subValidateWithContext(currentNode, context) + if validationResult.Valid() { + nbValidated++ + } else if nbValidated == 0 && (bestValidationResult == nil || validationResult.score > bestValidationResult.score) { + bestValidationResult = validationResult + } + } + + if nbValidated != 1 { + + result.addError(new(NumberOneOfError), context, currentNode, ErrorDetails{}) + + if nbValidated == 0 { + // add error messages of closest matching subSchema as + // that's probably the one the user was trying to match + result.mergeErrors(bestValidationResult) + } + } + + } + + if len(currentSubSchema.allOf) > 0 { + nbValidated := 0 + + for _, allOfSchema := range currentSubSchema.allOf { + validationResult := allOfSchema.subValidateWithContext(currentNode, context) + if validationResult.Valid() { + nbValidated++ + } + result.mergeErrors(validationResult) + } + + if nbValidated != len(currentSubSchema.allOf) { + result.addError(new(NumberAllOfError), context, currentNode, ErrorDetails{}) + } + } + + if currentSubSchema.not != nil { + validationResult := currentSubSchema.not.subValidateWithContext(currentNode, context) + if validationResult.Valid() { + result.addError(new(NumberNotError), context, currentNode, ErrorDetails{}) + } + } + + if currentSubSchema.dependencies != nil && len(currentSubSchema.dependencies) > 0 { + if isKind(currentNode, reflect.Map) { + for elementKey := range currentNode.(map[string]interface{}) { + if dependency, ok := currentSubSchema.dependencies[elementKey]; ok { + switch dependency := dependency.(type) { + + case []string: + for _, dependOnKey := range dependency { + if _, dependencyResolved := currentNode.(map[string]interface{})[dependOnKey]; !dependencyResolved { + result.addError( + new(MissingDependencyError), + context, + currentNode, + ErrorDetails{"dependency": dependOnKey}, + ) + } + } + + case *subSchema: + dependency.validateRecursive(dependency, currentNode, result, context) + + } + } + } + } + } + + result.incrementScore() +} + +func (v *subSchema) validateCommon(currentSubSchema *subSchema, value interface{}, result *Result, context *jsonContext) { + + if internalLogEnabled { + internalLog("validateCommon %s", context.String()) + internalLog(" %v", value) + } + + // enum: + if len(currentSubSchema.enum) > 0 { + has, err := currentSubSchema.ContainsEnum(value) + if err != nil { + result.addError(new(InternalError), context, value, ErrorDetails{"error": err}) + } + if !has { + result.addError( + new(EnumError), + context, + value, + ErrorDetails{ + "allowed": strings.Join(currentSubSchema.enum, ", "), + }, + ) + } + } + + result.incrementScore() +} + +func (v *subSchema) validateArray(currentSubSchema *subSchema, value []interface{}, result *Result, context *jsonContext) { + + if internalLogEnabled { + internalLog("validateArray %s", context.String()) + internalLog(" %v", value) + } + + nbItems := len(value) + + // TODO explain + if currentSubSchema.itemsChildrenIsSingleSchema { + for i := range value { + subContext := newJsonContext(strconv.Itoa(i), context) + validationResult := currentSubSchema.itemsChildren[0].subValidateWithContext(value[i], subContext) + result.mergeErrors(validationResult) + } + } else { + if currentSubSchema.itemsChildren != nil && len(currentSubSchema.itemsChildren) > 0 { + + nbItems := len(currentSubSchema.itemsChildren) + nbValues := len(value) + + if nbItems == nbValues { + for i := 0; i != nbItems; i++ { + subContext := newJsonContext(strconv.Itoa(i), context) + validationResult := currentSubSchema.itemsChildren[i].subValidateWithContext(value[i], subContext) + result.mergeErrors(validationResult) + } + } else if nbItems < nbValues { + switch currentSubSchema.additionalItems.(type) { + case bool: + if !currentSubSchema.additionalItems.(bool) { + result.addError(new(ArrayNoAdditionalItemsError), context, value, ErrorDetails{}) + } + case *subSchema: + additionalItemSchema := currentSubSchema.additionalItems.(*subSchema) + for i := nbItems; i != nbValues; i++ { + subContext := newJsonContext(strconv.Itoa(i), context) + validationResult := additionalItemSchema.subValidateWithContext(value[i], subContext) + result.mergeErrors(validationResult) + } + } + } + } + } + + // minItems & maxItems + if currentSubSchema.minItems != nil { + if nbItems < int(*currentSubSchema.minItems) { + result.addError( + new(ArrayMinItemsError), + context, + value, + ErrorDetails{"min": *currentSubSchema.minItems}, + ) + } + } + if currentSubSchema.maxItems != nil { + if nbItems > int(*currentSubSchema.maxItems) { + result.addError( + new(ArrayMaxItemsError), + context, + value, + ErrorDetails{"max": *currentSubSchema.maxItems}, + ) + } + } + + // uniqueItems: + if currentSubSchema.uniqueItems { + var stringifiedItems []string + for _, v := range value { + vString, err := marshalToJsonString(v) + if err != nil { + result.addError(new(InternalError), context, value, ErrorDetails{"err": err}) + } + if isStringInSlice(stringifiedItems, *vString) { + result.addError( + new(ItemsMustBeUniqueError), + context, + value, + ErrorDetails{"type": TYPE_ARRAY}, + ) + } + stringifiedItems = append(stringifiedItems, *vString) + } + } + + result.incrementScore() +} + +func (v *subSchema) validateObject(currentSubSchema *subSchema, value map[string]interface{}, result *Result, context *jsonContext) { + + if internalLogEnabled { + internalLog("validateObject %s", context.String()) + internalLog(" %v", value) + } + + // minProperties & maxProperties: + if currentSubSchema.minProperties != nil { + if len(value) < int(*currentSubSchema.minProperties) { + result.addError( + new(ArrayMinPropertiesError), + context, + value, + ErrorDetails{"min": *currentSubSchema.minProperties}, + ) + } + } + if currentSubSchema.maxProperties != nil { + if len(value) > int(*currentSubSchema.maxProperties) { + result.addError( + new(ArrayMaxPropertiesError), + context, + value, + ErrorDetails{"max": *currentSubSchema.maxProperties}, + ) + } + } + + // required: + for _, requiredProperty := range currentSubSchema.required { + _, ok := value[requiredProperty] + if ok { + result.incrementScore() + } else { + result.addError( + new(RequiredError), + context, + value, + ErrorDetails{"property": requiredProperty}, + ) + } + } + + // additionalProperty & patternProperty: + if currentSubSchema.additionalProperties != nil { + + switch currentSubSchema.additionalProperties.(type) { + case bool: + + if !currentSubSchema.additionalProperties.(bool) { + + for pk := range value { + + found := false + for _, spValue := range currentSubSchema.propertiesChildren { + if pk == spValue.property { + found = true + } + } + + pp_has, pp_match := v.validatePatternProperty(currentSubSchema, pk, value[pk], result, context) + + if found { + + if pp_has && !pp_match { + result.addError( + new(AdditionalPropertyNotAllowedError), + context, + value, + ErrorDetails{"property": pk}, + ) + } + + } else { + + if !pp_has || !pp_match { + result.addError( + new(AdditionalPropertyNotAllowedError), + context, + value, + ErrorDetails{"property": pk}, + ) + } + + } + } + } + + case *subSchema: + + additionalPropertiesSchema := currentSubSchema.additionalProperties.(*subSchema) + for pk := range value { + + found := false + for _, spValue := range currentSubSchema.propertiesChildren { + if pk == spValue.property { + found = true + } + } + + pp_has, pp_match := v.validatePatternProperty(currentSubSchema, pk, value[pk], result, context) + + if found { + + if pp_has && !pp_match { + validationResult := additionalPropertiesSchema.subValidateWithContext(value[pk], context) + result.mergeErrors(validationResult) + } + + } else { + + if !pp_has || !pp_match { + validationResult := additionalPropertiesSchema.subValidateWithContext(value[pk], context) + result.mergeErrors(validationResult) + } + + } + + } + } + } else { + + for pk := range value { + + pp_has, pp_match := v.validatePatternProperty(currentSubSchema, pk, value[pk], result, context) + + if pp_has && !pp_match { + + result.addError( + new(InvalidPropertyPatternError), + context, + value, + ErrorDetails{ + "property": pk, + "pattern": currentSubSchema.PatternPropertiesString(), + }, + ) + } + + } + } + + result.incrementScore() +} + +func (v *subSchema) validatePatternProperty(currentSubSchema *subSchema, key string, value interface{}, result *Result, context *jsonContext) (has bool, matched bool) { + + if internalLogEnabled { + internalLog("validatePatternProperty %s", context.String()) + internalLog(" %s %v", key, value) + } + + has = false + + validatedkey := false + + for pk, pv := range currentSubSchema.patternProperties { + if matches, _ := regexp.MatchString(pk, key); matches { + has = true + subContext := newJsonContext(key, context) + validationResult := pv.subValidateWithContext(value, subContext) + result.mergeErrors(validationResult) + if validationResult.Valid() { + validatedkey = true + } + } + } + + if !validatedkey { + return has, false + } + + result.incrementScore() + + return has, true +} + +func (v *subSchema) validateString(currentSubSchema *subSchema, value interface{}, result *Result, context *jsonContext) { + + // Ignore JSON numbers + if isJsonNumber(value) { + return + } + + // Ignore non strings + if !isKind(value, reflect.String) { + return + } + + if internalLogEnabled { + internalLog("validateString %s", context.String()) + internalLog(" %v", value) + } + + stringValue := value.(string) + + // minLength & maxLength: + if currentSubSchema.minLength != nil { + if utf8.RuneCount([]byte(stringValue)) < int(*currentSubSchema.minLength) { + result.addError( + new(StringLengthGTEError), + context, + value, + ErrorDetails{"min": *currentSubSchema.minLength}, + ) + } + } + if currentSubSchema.maxLength != nil { + if utf8.RuneCount([]byte(stringValue)) > int(*currentSubSchema.maxLength) { + result.addError( + new(StringLengthLTEError), + context, + value, + ErrorDetails{"max": *currentSubSchema.maxLength}, + ) + } + } + + // pattern: + if currentSubSchema.pattern != nil { + if !currentSubSchema.pattern.MatchString(stringValue) { + result.addError( + new(DoesNotMatchPatternError), + context, + value, + ErrorDetails{"pattern": currentSubSchema.pattern}, + ) + + } + } + + // format + if currentSubSchema.format != "" { + if !FormatCheckers.IsFormat(currentSubSchema.format, stringValue) { + result.addError( + new(DoesNotMatchFormatError), + context, + value, + ErrorDetails{"format": currentSubSchema.format}, + ) + } + } + + result.incrementScore() +} + +func (v *subSchema) validateNumber(currentSubSchema *subSchema, value interface{}, result *Result, context *jsonContext) { + + // Ignore non numbers + if !isJsonNumber(value) { + return + } + + if internalLogEnabled { + internalLog("validateNumber %s", context.String()) + internalLog(" %v", value) + } + + number := value.(json.Number) + float64Value, _ := number.Float64() + + // multipleOf: + if currentSubSchema.multipleOf != nil { + + if !isFloat64AnInteger(float64Value / *currentSubSchema.multipleOf) { + result.addError( + new(MultipleOfError), + context, + resultErrorFormatJsonNumber(number), + ErrorDetails{"multiple": *currentSubSchema.multipleOf}, + ) + } + } + + //maximum & exclusiveMaximum: + if currentSubSchema.maximum != nil { + if currentSubSchema.exclusiveMaximum { + if float64Value >= *currentSubSchema.maximum { + result.addError( + new(NumberLTError), + context, + resultErrorFormatJsonNumber(number), + ErrorDetails{ + "max": resultErrorFormatNumber(*currentSubSchema.maximum), + }, + ) + } + } else { + if float64Value > *currentSubSchema.maximum { + result.addError( + new(NumberLTEError), + context, + resultErrorFormatJsonNumber(number), + ErrorDetails{ + "max": resultErrorFormatNumber(*currentSubSchema.maximum), + }, + ) + } + } + } + + //minimum & exclusiveMinimum: + if currentSubSchema.minimum != nil { + if currentSubSchema.exclusiveMinimum { + if float64Value <= *currentSubSchema.minimum { + result.addError( + new(NumberGTError), + context, + resultErrorFormatJsonNumber(number), + ErrorDetails{ + "min": resultErrorFormatNumber(*currentSubSchema.minimum), + }, + ) + } + } else { + if float64Value < *currentSubSchema.minimum { + result.addError( + new(NumberGTEError), + context, + resultErrorFormatJsonNumber(number), + ErrorDetails{ + "min": resultErrorFormatNumber(*currentSubSchema.minimum), + }, + ) + } + } + } + + result.incrementScore() +}