JSON-Schema-Modern-0.582/000770 000766 000024 00000000000 14553630022 015171 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/Build.PL000644 000766 000024 00000000271 14553630022 016470 0ustar00etherstaff000000 000000 # This Build.PL for JSON-Schema-Modern was generated by Dist::Zilla::Plugin::ModuleBuildTiny 0.017. use strict; use warnings; use v5.20.0; use Module::Build::Tiny 0.034; Build_PL(); JSON-Schema-Modern-0.582/INSTALL000644 000766 000024 00000004710 14553630022 016227 0ustar00etherstaff000000 000000 This is the Perl distribution JSON-Schema-Modern. Installing JSON-Schema-Modern is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm JSON::Schema::Modern If it does not have permission to install modules to the current perl, cpanm will automatically set up and install to a local::lib in your home directory. See the local::lib documentation (https://metacpan.org/pod/local::lib) for details on enabling it in your environment. ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan JSON::Schema::Modern ## Manual installation As a last resort, you can manually install it. If you have not already downloaded the release tarball, you can find the download link on the module's MetaCPAN page: https://metacpan.org/pod/JSON::Schema::Modern Untar the tarball, install configure prerequisites (see below), then build it: % perl Build.PL % ./Build && ./Build test Then install it: % ./Build install Or the more portable variation: % perl Build.PL % perl Build % perl Build test % perl Build install If your perl is system-managed, you can create a local::lib in your home directory to install modules to. For details, see the local::lib documentation: https://metacpan.org/pod/local::lib The prerequisites of this distribution will also have to be installed manually. The prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated by running the manual build process described above. ## Configure Prerequisites This distribution requires other modules to be installed before this distribution's installer can be run. They can be found under the "configure_requires" key of META.yml or the "{prereqs}{configure}{requires}" key of META.json. ## Other Prerequisites This distribution may require additional modules to be installed after running Build.PL. Look for prerequisites in the following phases: * to run ./Build, PHASE = build * to use the module code itself, PHASE = runtime * to run tests, PHASE = test They can all be found in the "PHASE_requires" key of MYMETA.yml or the "{prereqs}{PHASE}{requires}" key of MYMETA.json. ## Documentation JSON-Schema-Modern documentation is available as POD. You can run `perldoc` from a shell to read the documentation: % perldoc JSON::Schema::Modern For more information on installing Perl modules via CPAN, please see: https://www.cpan.org/modules/INSTALL.html JSON-Schema-Modern-0.582/CONTRIBUTING000644 000766 000024 00000010155 14553630022 017030 0ustar00etherstaff000000 000000 CONTRIBUTING Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. PLEASE NOTE that if you have any questions or difficulties, you can reach the maintainer(s) through the bug queue described later in this document (preferred), or by emailing the releaser directly. You are not required to follow any of the steps in this document to submit a patch or bug report; these are just recommendations, intended to help you (and help us help you faster). The distribution is managed with Dist::Zilla (https://metacpan.org/release/Dist-Zilla). This means than many of the usual files you might expect are not in the repository, but are generated at release time (e.g. Makefile.PL). However, you can run tests directly using the 'prove' tool: $ prove -l $ prove -lv t/some_test_file.t $ prove -lvr t/ In most cases, 'prove' is entirely sufficient for you to test any patches you have. You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release -- this is available at https://metacpan.org/release/JSON-Schema-Modern If you use cpanminus, you can do it without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends JSON::Schema::Modern Dist::Zilla is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then run one of the following commands, depending on your CPAN client: $ cpan `dzil authordeps --missing` or $ dzil authordeps --missing | cpanm You should then also install any additional requirements not needed by the dzil build but may be needed by tests or other development: $ cpan `dzil listdeps --author --missing` or $ dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: $ cpan Dist::Zilla::App::Command::stale $ cpan `dzil stale --all` or $ cpanm Dist::Zilla::App::Command::stale $ dzil stale --all | cpanm You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends JSON::Schema::Modern Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is hosted at GitHub. The repository is: https://github.com/karenetheridge/JSON-Schema-Modern You can submit code changes by forking the repository, pushing your code changes to your clone, and then submitting a pull request. Please include a suitable end-user-oriented entry in the Changes file describing your change. Detailed instructions for doing that is available here: https://help.github.com/articles/creating-a-pull-request All pull requests for this distribution will be automatically tested on Linux by Travis at: https://travis-ci.com/karenetheridge/JSON-Schema-Modern Results will be visible in the pull request on GitHub. Follow the appropriate links for details when tests fail. Changes will not be mergeable until all tests pass. Generated files such as README, CONTRIBUTING, Makefile.PL, LICENSE etc should *not* be included in your pull request, as they will be updated automatically during the next release. If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report here: https://github.com/karenetheridge/JSON-Schema-Modern/issues This is a good place to send your questions about the usage of this distribution. If you send me a patch or pull request, your name and email address will be included in the documentation as a contributor (using the attribution on the commit or patch), unless you specifically request for it not to be. If you wish to be listed under a different name or address, you should submit a pull request to the .mailmap file to contain the correct mapping. This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.015 from a template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.163. JSON-Schema-Modern-0.582/Changes000640 000766 000024 00000055200 14553630022 016465 0ustar00etherstaff000000 000000 Revision history for JSON-Schema-Modern 0.582 2024-01-23 03:18:31Z - change the status of some format tests that rely on optional modules so they are not reported as specification failures - fix forking test that failed on MSWin32 0.581 2024-01-18 05:35:16Z - make automated tests much quieter when some optional modules (e.g. used for format tests) are not installed 0.580 2024-01-18 04:38:33Z - update a format test to be more amenable to 32-bit architectures 0.579 2024-01-15 03:32:27Z - improve performance by checking for duplicates by comparing the checksum of a schema rather than the content itself - fix error occurring when using the FormatAssertion vocabulary in an evaluator object that was loaded from a serialized object - fixed custom format definitions to not allow 'integer' types, as per the specification - support custom format definitions that operate on more than one core data type - fixed handling of unrecognized formats in draft2020-12 and later (but only when the FormatAssertion vocabulary is explicitly requested, not with validate_formats=1) - the format keyword now respects the "stringy_numbers" option 0.578 2023-12-29 23:13:44Z - remove use of JSON::MaybeXS, to avoid potential use of JSON::XS; now we use Cpanel::JSON::XS or JSON::PP directly, using the same environment variables as in Mojo::JSON for customization. - new helper interface, get_document() 0.577 2023-12-19 05:27:04Z - new attribute on Error and Result objects: "recommended_response", for use when validating HTTP requests 0.576 2023-12-10 06:10:57Z - the "stringy_numbers" feature now also applies to the "enum", "const", and "uniqueItems" keywords 0.575 2023-11-26 05:11:10Z - properly handle some edge cases where the "$schema" keyword can change the dialect to a different specification version with different Core vocabulary keywords - evaluation at non-schema locations is now prohibited 0.574 2023-11-13 00:50:55Z - better detection of schema locations, for use by Document subclasses - fixed vocabulary ordering (from v0.567) - properly handle "$dynamicRef", "$recursiveRef" and "$schema" referencing a boolean schema - bundled metaschemas have been updated to their latest versions from https://json-schema.org 0.573 2023-10-21 23:49:03Z - fix construction of default values of some attributes e.g. media_types, encodings - fix list context of has_errors, error_count, annotation_count methods 0.572 2023-10-14 22:04:52Z - boost runtime performance by removing uses of MooX::HandlesVia 0.571 2023-09-17 01:14:47Z - removed duration and uuid formats for draft7 (they were not defined until the next spec version) - properly default format validation to true in draft7 0.570 2023-09-02 20:42:03Z - small performance improvements to 'date-time' and 'date' format validation - new stringy_numbers option, for validating numbers more loosely 0.569 2023-07-08 23:36:06Z - fixed some edge cases with ipv6 format validation 0.568 2023-06-17 07:16:54Z - add media-type support for application/x-ndjson and application/x-www-form-urlencoded 0.567 2023-06-03 22:11:23Z - vocabularies are now evaluated in a different order: Validation and Format vocabularies now come before Applicator, in order to allow faster short circuiting when errors are encountered. 0.566 2023-05-11 03:34:59Z - treat ambiguous types as a normal error, rather than an exception which may provide incorrect location data 0.565 2023-03-12 21:19:27Z - traverse and evaluate callbacks can now produce errors, which are incorporated into the overall evaluation results - fix bad handling of empty patterns in "pattern", "patternProperties" keywords 0.564 2023-03-04 00:43:42Z - further tweak performance by short-circuiting inside some subschemas (but not when annotations must be collected for "unevaluated" keywords) - added support for 'base64url' encoding 0.563 2023-02-04 23:38:13Z - documentation update: improve language around data types and JSON decoder recommendations 0.562 2023-01-22 00:49:07Z - bump a test prereq to fix a mismatched exception message 0.561 2023-01-07 20:57:37Z - further tweak performance by only collecting annotations when explicitly requested, or needed by the current evaluation scope 0.560 2022-12-20 20:00:05Z - fix a test that depended on optional prereqs 0.559 2022-12-16 04:29:55Z - fix regression where formats do not validate beyond a $ref (since v0.556) 0.558 2022-11-26 02:43:15Z - add fallback media type handling for text/* - performance is (hopefully) improved by delaying some calculations in annotations until they are needed 0.557 2022-10-30 21:59:04Z - improvements to processing of keywords in the Content vocabulary (contentEncoding, contentMediaType, contentSchema) - LICENSE now provided with bundled metaschema files 0.556 2022-09-18 22:41:50Z - some performance optimizations for schema traversal and evaluation 0.555 2022-09-10 21:43:11Z - the "iri-reference" format is now supported, sort of (all strings will be accepted as valid) - "enum" no longer incorrectly errors if elements are not unique - new experimental output format: "data_only", which encapsulates what is produced when a JSON::Schema::Modern::Result object is stringified 0.554 2022-07-24 00:08:54Z - use new Slurpy type in Types::Standard 0.553 2022-06-25 03:27:14Z - expanded on the documentation for serializing results. - updated IETF URI references from draft-bhutton-json-schema-00 to draft-bhutton-json-schema-01, to reflect the updates to specification draft2020-12 (implementation updates have already been reflected in earlier releases, notably 0.548 and 0.550) 0.552 2022-05-03 03:31:59Z - fix result serialization from exceptions (broken in 0.550) 0.551 2022-05-01 01:29:51Z - the "specification_version" configuration option now accepts values without "draft" in the name, to facilitate a new naming convention used for future specification versions - new "formatted_annotations" option for JSON::Schema::Modern::Result, to allow for omitting annotations from result output 0.550 2022-04-14 04:32:32Z - added 'dump' method to Result, Error and Annotation objects, for easier debugging and generating test output - adjusted syntax checks for $vocabulary keyword to allow for bundled metaschemas - new validate_schema() method, for easily validating a schema against its metaschema 0.549 2022-03-22 03:55:15Z - properly detect the metaschema in json-schema-eval --validate-schema 0.548 2022-03-09 06:27:10Z - "annotate_unknown_keywords" option removed; behaviour is now on for draft2020-12 and off otherwise - annotation behaviour for applicator keywords is fixed per the spec, resulting in fewer redundant errors from unevaluatedItems, unevaluatedProperties keywords 0.547 2022-03-03 06:08:51Z - improved error stringification on document error 0.546 2022-02-23 01:33:03Z - avoid use of newly-experimental signature syntax on 5.35.9 0.545 2022-02-22 04:30:36Z - avoid new experimental warning on 5.35.9 - skip unresolvable identifiers for future drafts in acceptance tests (added in TJSA 1.016) 0.544 2022-02-16 05:53:08Z - add_schema() now has more consistent exception handling 0.543 2022-02-11 04:11:55Z - now allowing runtime overriding of the "strict" configuration - add "effective_base_uri", for adjusting the locations of errors and annotations against a dynamic base 0.542 2022-01-23 08:17:08Z - new "strict" option (and --strict flag to json-schema-eval), for disallowing unknown keywords 0.541 2022-01-17 23:57:35Z - add --add-schema option to json-schema-eval to allow for the reference of additional schemas during evaluation 0.540 2022-01-17 18:58:36Z - make "unimplemented format" errors more visible - fixed serializing of results in acceptance tests - add --validate-schema option to json-schema-eval to provide an easy way to validate a schema against its meta-schema 0.539 2022-01-06 04:07:20Z - updated error message for the "type" keyword to include the actual type, as well as the expected type(s) 0.538 2021-12-31 21:18:21Z - remove no-longer-needed TODO in tests that caused warnings in small-int systems 0.537 2021-12-30 22:49:02Z - fix number/integer differentiation on small-int systems - improve division calculations if either argument is a non-integer 0.536 2021-12-30 05:32:44Z - very large/small numbers are now properly accomodated in all cases, including from JSON-serialized data 0.535 2021-12-28 06:38:37Z - mark more tests TODO (temporarily!) for small-int systems 0.534 2021-12-27 21:05:34Z - clarify exit statuses for 'json-schema-eval' - fix numeric tests for architectures with small int size - fix handling of unsigned ints that cannot be represented in a signed int 0.533 2021-12-23 19:45:11Z - fix exit statuses in json-schema-eval 0.532 2021-12-22 19:14:06Z - add media_type decoders for application/schema+json, application/schema-instance+json - add 'json-schema-eval' executable, for ad-hoc evaluation 0.531 2021-12-06 05:39:53Z - add method to add format implementations after construction - treat media_type names case-insensitively, as per RFC6838, and lookups support wildcards (get_media_type('text/plain') will match an entry for 'text/*' or '*/*') 0.530 2021-12-03 16:44:23Z - fix hash slice syntax that is not available before perl 5.28 0.529 2021-12-03 04:00:26Z - added FREEZE and THAW callbacks to assist with serialization 0.528 2021-11-30 06:17:29Z - evaluation callback sub signature has changed, to add $data - minor performance improvement during evaluation 0.527 2021-11-26 00:53:42Z - fixes to base64 and json decoders used in the Content vocabulary 0.526 2021-11-23 05:11:46Z - fix evaluate() callbacks for keywords that have no runtime-specific actions - optional support for contentEncoding, contentMediaType and contentSchema with the validate_content_schemas option and "encoding", "media_type" handler registries - a boolean flag "unknown" has been added to Annotation objects to indicate they correspond to an unknown keyword in the schema 0.525 2021-11-17 05:35:24Z - minimum Perl version raised to 5.20 - dropped bundling hyper-schema files, as they are not validatable without vocabulary support (see issue #44) - & overload added to JSON::Schema::Modern::Result, for combining results - add callbacks to evaluate(), to enable finding certain positions of interest in a document or schema 0.524 2021-11-10 04:36:49Z - some refactoring of vocabulary and document methods, to faciliate re-use - new utility functions: is_uri_reference, assert_keyword_exists - allow specifying the metaschema_uri for a schema document - add "validate" method to Document object - updated draft2019-09 and added draft2020-12 hyperschema schemas 0.523 2021-10-24 05:58:27Z - fix tests that were relying on an optional prereq - properly gate experimental features by version 0.522 2021-10-22 22:26:29Z - 'date-time' format now properly handles leap seconds 0.521 2021-10-04 05:36:10Z - fix issues when referencing a schema in a metaschema: whose vocabulary is not known, but its keywords can still be validated, or which does not use the $vocabulary keyword at all 0.520 2021-09-27 05:56:11Z - support arbitrary metaschemas in the "$schema" keyword - support custom vocabulary classes, for use in metaschemas that use the "$vocabulary" keyword 0.519 2021-09-21 03:56:13Z - fix tests that were relying on an optional prereq 0.518 2021-09-18 22:00:42Z - skip some regex tests when Unicode library is too old for those character classes being tested - specification versions can now change, via the $schema keyword, within schema resources in a single document or via $ref to another resource 0.517 2021-08-28 04:34:17Z - restore some optional modules used for format validation to the prereq list that were mistakenly dropped in version 0.515 - date-time, date and time formats no longer match non-ascii digits 0.516 2021-08-14 19:53:16Z - fix email format tests on older prereqs - avoid errors when enabling validate_formats before evaluating but after loading a schema 0.515 2021-08-03 04:07:02Z - no longer calling a keyword's callback during traverse() if that keyword has an error - better handling of blessed data types and other references - new config option scalarref_booleans, which will treat \0, \1 in data as json booleans - support for the most recent specification version, draft2020-12 0.514 2021-07-22 05:17:08Z - add_schema() now dies with the errors themselves, rather than an object that serializes to an unhelpful value in uncaught die()s. 0.513 2021-06-26 19:45:51Z - skip acceptance test for integer overflow when nvsize is too large to produce the expected error - support for specification version draft7, through the "$schema" keyword and the new 'specification_version' constructor option 0.512 2021-06-09 02:29:23Z - distribution has been renamed from JSON-Schema-Draft201909 to JSON-Schema-Modern. JSON::Schema::Draft201909 lives on as a compatibility wrapper. 0.028 2021-06-08 02:48:07Z - fix validation regex for the $anchor keyword - unevaluatedItems and unevaluatedProperties keywords are now applied after all other keywords in the applicator vocabulary (true/false results are not affected, but the order of annotations and errors will change) - calculate the canonical uri correctly after navigating a $ref: using the closest resource identifier to the destination, not the one that was used in the $ref 0.027 2021-05-15 18:13:21Z - fixed error strings used for failing "dependentRequired" - in terse output format, do not discard non-summary errors from schema-form of items - keywords in the applicator vocabulary are now applied before the keywords in the validation vocabulary (true/false results are not affected, but the order of annotations and errors will change) - improved validation of the "date-time", "date" and "time" formats 0.026 2021-04-08 20:13:27Z - fix scoping of annotations from uncle keywords (siblings of the schema's parent) that were improperly visible to unevaluatedItems, unevaluatedProperties - 'result' attribute in JSON::Schema::Draft201909::Result has been renamed to 'valid', to better match what it represents (a boolean) 0.025 2021-03-30 05:36:14Z - minor changes to error strings to distinguish between issues that can be determined from static inspection of schema(s), and those that only arise during runtime evaluation (such as URIs that map to missing schema documents, or inconsistent configuration values). - more validity checks at traversal time of $ref, $schema, $vocabulary values - update ipv4 format validation to reject leading zeroes in octets, helping avoid a newly-discovered vulnerability in netmasks 0.024 2021-03-23 21:53:42Z - the default value for "validate_formats" is once again false (it became true in v0.020), to properly conform to the specification 0.023 2021-02-21 18:36:32Z - fix "try/catch is experimental" warnings in perl 5.33.7 0.022 2021-02-07 17:33:14Z - fix erroneous use of postfix dereference (closes #42). 0.021 2021-02-06 18:50:42Z - [Pp]roperties$ keywords now always produce annotations when evaluating successfully, even if there were no matching properties - added the "strict_basic" output format, for strict (but incorrect) adherence to the draft 2019-09 specification 0.020 2021-01-02 17:12:09Z - the default value for "validate_formats" is now true, to reflect the most typical usecase. - gracefully handle the erroneous schema { "type": null } - fixes to relative-json-pointer format validation - new "annotate_unknown_keywords" config option 0.019 2020-12-08 18:40:10Z - further improvements to the "terse" output format - add_schema will now die with a Result object rather than a listref of Error objects, when the document contains errors. 0.018 2020-12-07 18:22:07Z - now can correctly evaluate schemas containing unevaluatedItems, unevaluatedProperties keywords without the user having to explicitly set collect_annotations => 1 in the constructor - fix error in "terse" output formatting that mistakenly dropped some unevaluatedProperties errors 0.017 2020-11-24 19:15:18Z - refactor keyword implementations into separate vocabulary classes, to faciliate future support for custom vocabularies - traverse the schema before evaluation, for more correct and complete extraction of identifiers and invalid syntax - add callbacks to traverse(), to easily find keywords of interest 0.016 2020-11-18 18:18:40Z - further fixes to infinite loop detection - fix dereference error when evaluating "definitions", "dependencies" - when adding two schema documents with no canonical uri, preserve knowledge of other identifiers found in the first document - add_schema() no longer adds additional URIs to the document object, only the evaluator 0.015 2020-10-20 03:08:36Z - fixed infinity/overflow checks for older perls 0.014 2020-10-16 19:21:17Z - ensure "enum" value is an array - do not evaluate non-arrays against "unevaluatedItems" - fix detection of bad $recursiveAnchor - fix canonical uri calculation for $schema, $recursiveAnchor, and infinite loop detection - for output_format=terse, do not omit the important errors for unevaluated* when annotation collection is disabled 0.013 2020-09-15 19:14:53Z - detect more cases of resource identifier collisions - fix resolution of relative $ids - new "terse" output format 0.012 2020-08-13 20:23:21Z - now using unicode semantics for pattern matching 0.011 2020-08-04 22:16:46Z - better normalization of uris in errors - now detecting infinite loops separately from deep traversal - optionally collect annotations - support for the "unevaluatedItems" and "unevaluatedProperties" keywords 0.010 2020-07-23 16:50:18Z - fixed error generation for validator keywords with numeric arguments (e.g. minimum, multipleOf) - new "get" method for fetching the schema found at a URI - improved "ipv6" format validation 0.009 2020-07-07 19:54:44Z - no longer allowing adding another schema document with a duplicate uri but different schema content (some collision checks were too lax). - fix behaviour of $recursiveRef without an $recursiveAnchor in the initial target scope 0.008 2020-06-22 04:24:06Z - fix bad syntax used in a test 0.007 2020-06-21 21:20:33Z - raise some inadequate prereq declarations - fix incorrect canonical uri when evaluating a (sub)schema using a non-canonical uri 0.006 2020-06-19 20:54:40Z - add support for evaluation against a uri - add "add_schema" interface for using additional schema documents within the implementation - support using the "format" keyword as an assertion, with the "validate_formats" option 0.005 2020-06-09 01:54:05Z - fix some edge cases with usage of $recursiveAnchor, $recursiveRef - fixed several issues with resource identification within schema documents 0.004 2020-06-02 19:14:32Z - add support for $recursiveAnchor and $recursiveRef - support use of "$ref":"https://json-schema.org/draft/2019-09/schema" by loading common metaschemas from a local cache 0.003 2020-05-31 20:10:02Z - add infinite recursion detection - process properties in sorted order, for consistent ordering of results - mark a numeric comparison test as TODO on 32-bit machines (see GHI #10) 0.002 2020-05-27 22:28:15Z - fix incorrect prereq needed for tests - add support for $id and $anchor in single schema documents 0.001 2020-05-21 15:51:00Z - Initial release. JSON-Schema-Modern-0.582/MANIFEST000644 000766 000024 00000015335 14553630022 016334 0ustar00etherstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.031. Build.PL CONTRIBUTING Changes INSTALL LICENCE MANIFEST META.json META.yml README dist.ini lib/JSON/Schema/Modern.pm lib/JSON/Schema/Modern/Annotation.pm lib/JSON/Schema/Modern/Document.pm lib/JSON/Schema/Modern/Error.pm lib/JSON/Schema/Modern/Result.pm lib/JSON/Schema/Modern/Utilities.pm lib/JSON/Schema/Modern/Vocabulary.pm lib/JSON/Schema/Modern/Vocabulary/Applicator.pm lib/JSON/Schema/Modern/Vocabulary/Content.pm lib/JSON/Schema/Modern/Vocabulary/Core.pm lib/JSON/Schema/Modern/Vocabulary/FormatAnnotation.pm lib/JSON/Schema/Modern/Vocabulary/FormatAssertion.pm lib/JSON/Schema/Modern/Vocabulary/MetaData.pm lib/JSON/Schema/Modern/Vocabulary/Unevaluated.pm lib/JSON/Schema/Modern/Vocabulary/Validation.pm script/json-schema-eval share/LICENSE share/draft2019-09/meta/applicator.json share/draft2019-09/meta/content.json share/draft2019-09/meta/core.json share/draft2019-09/meta/format.json share/draft2019-09/meta/meta-data.json share/draft2019-09/meta/validation.json share/draft2019-09/output/schema.json share/draft2019-09/schema.json share/draft2020-12/meta/applicator.json share/draft2020-12/meta/content.json share/draft2020-12/meta/core.json share/draft2020-12/meta/format-annotation.json share/draft2020-12/meta/format-assertion.json share/draft2020-12/meta/meta-data.json share/draft2020-12/meta/unevaluated.json share/draft2020-12/meta/validation.json share/draft2020-12/output/schema.json share/draft2020-12/schema.json share/draft7/schema.json t/00-report-prereqs.dd t/00-report-prereqs.t t/add-schema.t t/additional-tests-draft2019-09.t t/additional-tests-draft2019-09/README t/additional-tests-draft2019-09/anchor.json t/additional-tests-draft2019-09/annotation-collection.json t/additional-tests-draft2019-09/badRef.json t/additional-tests-draft2019-09/faux-buggy-schemas.json t/additional-tests-draft2019-09/format-duration.json t/additional-tests-draft2019-09/format-ipv4.json t/additional-tests-draft2019-09/format-ipv6.json t/additional-tests-draft2019-09/format-relative-json-pointer.json t/additional-tests-draft2019-09/formats.json t/additional-tests-draft2019-09/id.json t/additional-tests-draft2019-09/integers.json t/additional-tests-draft2019-09/keyword-independence.json t/additional-tests-draft2019-09/loose-types-const-enum.json t/additional-tests-draft2019-09/optional/format-date-time.json t/additional-tests-draft2019-09/optional/format-date.json t/additional-tests-draft2019-09/optional/format-time.json t/additional-tests-draft2019-09/recursive-dynamic.json t/additional-tests-draft2019-09/ref-and-id.json t/additional-tests-draft2019-09/ref.json t/additional-tests-draft2019-09/short-circuit.json t/additional-tests-draft2019-09/unknownKeyword.json t/additional-tests-draft2019-09/vocabulary.json t/additional-tests-draft2020-12.t t/additional-tests-draft2020-12/README t/additional-tests-draft2020-12/anchor.json t/additional-tests-draft2020-12/annotation-collection.json t/additional-tests-draft2020-12/badRef.json t/additional-tests-draft2020-12/dynamicRef.json t/additional-tests-draft2020-12/faux-buggy-schemas.json t/additional-tests-draft2020-12/format-duration.json t/additional-tests-draft2020-12/format-ipv4.json t/additional-tests-draft2020-12/format-ipv6.json t/additional-tests-draft2020-12/format-relative-json-pointer.json t/additional-tests-draft2020-12/formats.json t/additional-tests-draft2020-12/id.json t/additional-tests-draft2020-12/integers.json t/additional-tests-draft2020-12/keyword-independence.json t/additional-tests-draft2020-12/loose-types-const-enum.json t/additional-tests-draft2020-12/optional/format-date-time.json t/additional-tests-draft2020-12/optional/format-date.json t/additional-tests-draft2020-12/optional/format-time.json t/additional-tests-draft2020-12/recursive-dynamic.json t/additional-tests-draft2020-12/ref-and-id.json t/additional-tests-draft2020-12/ref.json t/additional-tests-draft2020-12/short-circuit.json t/additional-tests-draft2020-12/unknownKeyword.json t/additional-tests-draft2020-12/vocabulary.json t/additional-tests-draft7.t t/additional-tests-draft7/README t/additional-tests-draft7/badRef.json t/additional-tests-draft7/faux-buggy-schemas.json t/additional-tests-draft7/format-ipv4.json t/additional-tests-draft7/format-relative-json-pointer.json t/additional-tests-draft7/id.json t/additional-tests-draft7/integers.json t/additional-tests-draft7/keyword-independence.json t/additional-tests-draft7/loose-types-const-enum.json t/additional-tests-draft7/not-an-anchor.json t/additional-tests-draft7/not-an-id.json t/additional-tests-draft7/optional/format-date-time.json t/additional-tests-draft7/optional/format-date.json t/additional-tests-draft7/optional/format-time.json t/additional-tests-draft7/ref-and-id.json t/additional-tests-draft7/ref.json t/additional-tests-draft7/short-circuit.json t/additional-tests-draft7/unknownKeyword.json t/additional-tests-draft7/vocabulary.json t/annotations.t t/boolean-data.t t/boolean-schemas.t t/cached-metaschemas.t t/callbacks.t t/content-encoding.t t/dialects.t t/document.t t/equality.t t/errors.t t/evaluate_json_string.t t/find-identifiers.t t/formats.t t/invalid-schemas-draft2019-09.t t/invalid-schemas-draft2019-09/invalid-input.json t/invalid-schemas-draft2019-09/ref.json t/invalid-schemas-draft2019-09/vocabulary.json t/lib/Acceptance.pm t/lib/Helper.pm t/lib/MyVocabulary/BadEvaluationOrder.pm t/lib/MyVocabulary/BadVocabularySub1.pm t/lib/MyVocabulary/BadVocabularySub2.pm t/lib/MyVocabulary/BadVocabularySub3.pm t/lib/MyVocabulary/MissingRole.pm t/lib/MyVocabulary/MissingSub.pm t/lib/MyVocabulary/StringComparison.pm t/max_traversal_depth.t t/output_format.t t/pattern.t t/read_serialized_file t/ref.t t/results/draft2019-09-acceptance-format.txt t/results/draft2019-09-acceptance.txt t/results/draft2019-09-additional-tests.txt t/results/draft2019-09-invalid-schemas.txt t/results/draft2020-12-acceptance-format.txt t/results/draft2020-12-acceptance.txt t/results/draft2020-12-additional-tests.txt t/results/draft7-acceptance-format.txt t/results/draft7-acceptance.txt t/results/draft7-additional-tests.txt t/serialization.t t/specification_version.t t/strict.t t/stringy-numbers.t t/traverse.t t/type.t t/unsupported-keywords.t t/validate-schema.t t/zzz-acceptance-draft2019-09-format.t t/zzz-acceptance-draft2019-09.t t/zzz-acceptance-draft2020-12-format.t t/zzz-acceptance-draft2020-12.t t/zzz-acceptance-draft7-format.t t/zzz-acceptance-draft7.t t/zzz-check-breaks.t update-schemas weaver.ini xt/author/00-compile.t xt/author/clean-namespaces.t xt/author/distmeta.t xt/author/eol.t xt/author/kwalitee.t xt/author/minimum-version.t xt/author/mojibake.t xt/author/no-tabs.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t xt/release/changes_has_content.t xt/release/cpan-changes.t JSON-Schema-Modern-0.582/t/000770 000766 000024 00000000000 14553630022 015434 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/xt/000770 000766 000024 00000000000 14553630022 015624 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/README000644 000766 000024 00000000565 14553630022 016062 0ustar00etherstaff000000 000000 This archive contains the distribution JSON-Schema-Modern, version 0.582: Validate data against a schema This software is copyright (c) 2020 by Karen Etheridge. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v6.031. JSON-Schema-Modern-0.582/script/000770 000766 000024 00000000000 14553630022 016475 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/META.yml000644 000766 000024 00000073565 14553630022 016465 0ustar00etherstaff000000 000000 --- abstract: 'Validate data against a schema' author: - 'Karen Etheridge ' build_requires: CPAN::Meta::Check: '0.011' CPAN::Meta::Requirements: '0' Data::Dumper: '0' File::Spec: '0' IPC::Open3: '0' Math::BigInt: '0' Module::Metadata: '0' Test2::V0: '0' Test::Deep: '0' Test::Deep::UnorderedPairs: '0' Test::Fatal: '0' Test::File::ShareDir: '0' Test::JSON::Schema::Acceptance: '1.021' Test::Memory::Cycle: '0' Test::More: '0.96' Test::Needs: '0' Test::Warnings: '0' Test::Without::Module: '0.21' lib: '0' perl: v5.20.0 utf8: '0' configure_requires: Module::Build::Tiny: '0.034' perl: '5.020' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.031, CPAN::Meta::Converter version 2.150010' keywords: - JSON - Schema - validator - data - validation - structure - specification license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: JSON-Schema-Modern no_index: directory: - share - t - xt provides: JSON::Schema::Modern: file: lib/JSON/Schema/Modern.pm version: '0.582' JSON::Schema::Modern::Annotation: file: lib/JSON/Schema/Modern/Annotation.pm version: '0.582' JSON::Schema::Modern::Document: file: lib/JSON/Schema/Modern/Document.pm version: '0.582' JSON::Schema::Modern::Error: file: lib/JSON/Schema/Modern/Error.pm version: '0.582' JSON::Schema::Modern::Result: file: lib/JSON/Schema/Modern/Result.pm version: '0.582' JSON::Schema::Modern::Utilities: file: lib/JSON/Schema/Modern/Utilities.pm version: '0.582' JSON::Schema::Modern::Vocabulary: file: lib/JSON/Schema/Modern/Vocabulary.pm version: '0.582' JSON::Schema::Modern::Vocabulary::Applicator: file: lib/JSON/Schema/Modern/Vocabulary/Applicator.pm version: '0.582' JSON::Schema::Modern::Vocabulary::Content: file: lib/JSON/Schema/Modern/Vocabulary/Content.pm version: '0.582' JSON::Schema::Modern::Vocabulary::Core: file: lib/JSON/Schema/Modern/Vocabulary/Core.pm version: '0.582' JSON::Schema::Modern::Vocabulary::FormatAnnotation: file: lib/JSON/Schema/Modern/Vocabulary/FormatAnnotation.pm version: '0.582' JSON::Schema::Modern::Vocabulary::FormatAssertion: file: lib/JSON/Schema/Modern/Vocabulary/FormatAssertion.pm version: '0.582' JSON::Schema::Modern::Vocabulary::MetaData: file: lib/JSON/Schema/Modern/Vocabulary/MetaData.pm version: '0.582' JSON::Schema::Modern::Vocabulary::Unevaluated: file: lib/JSON/Schema/Modern/Vocabulary/Unevaluated.pm version: '0.582' JSON::Schema::Modern::Vocabulary::Validation: file: lib/JSON/Schema/Modern/Vocabulary/Validation.pm version: '0.582' requires: B: '0' Carp: '0' Digest::MD5: '0' Exporter: '0' Feature::Compat::Try: '0' File::ShareDir: '0' Getopt::Long::Descriptive: '0' JSON::PP: '0' List::Util: '1.55' MIME::Base64: '0' Math::BigFloat: '0' Module::Runtime: '0' Mojo::JSON: '0' Mojo::JSON::Pointer: '0' Mojo::URL: '0' Mojolicious: '7.87' Moo: '0' Moo::Role: '0' MooX::TypeTiny: '0.002002' Path::Tiny: '0' Ref::Util: '0.100' Safe::Isa: '1.000008' Scalar::Util: '0' Storable: '0' Sub::Install: '0' Types::Common::Numeric: '0' Types::Standard: '1.016003' constant: '0' experimental: '0.026' if: '0' namespace::clean: '0' open: '0' overload: '0' perl: v5.20.0 stable: '0.031' strict: '0' strictures: '2' warnings: '0' resources: bugtracker: https://github.com/karenetheridge/JSON-Schema-Modern/issues homepage: https://github.com/karenetheridge/JSON-Schema-Modern repository: https://github.com/karenetheridge/JSON-Schema-Modern.git version: '0.582' x_Dist_Zilla: perl: version: '5.039006' plugins: - class: Dist::Zilla::Plugin::Run::BeforeRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "do './update-schemas'; die $@ || $! if $@ || $!" fatal_errors: 1 quiet: 0 version: '0.049' name: Run::BeforeRelease version: '0.049' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/pluginbundle version' version: '6.031' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::Author::ETHER phase: build run_under_travis: 0 skip: [] name: '@Author::ETHER/stale modules, build' version: '0.058' - class: Dist::Zilla::Plugin::ExecDir name: '@Author::ETHER/ExecDir' version: '6.031' - class: Dist::Zilla::Plugin::FileFinder::ByName name: '@Author::ETHER/Examples' version: '6.031' - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - CONTRIBUTING - INSTALL - LICENCE - README.pod - TODO - pull_request_template.md exclude_match: [] include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@Author::ETHER/Git::GatherDir' version: '2.049' - class: Dist::Zilla::Plugin::MetaYAML name: '@Author::ETHER/MetaYAML' version: '6.031' - class: Dist::Zilla::Plugin::MetaJSON name: '@Author::ETHER/MetaJSON' version: '6.031' - class: Dist::Zilla::Plugin::Readme name: '@Author::ETHER/Readme' version: '6.031' - class: Dist::Zilla::Plugin::Manifest name: '@Author::ETHER/Manifest' version: '6.031' - class: Dist::Zilla::Plugin::License name: '@Author::ETHER/License' version: '6.031' - class: Dist::Zilla::Plugin::GenerateFile::FromShareDir config: Dist::Zilla::Plugin::GenerateFile::FromShareDir: destination_filename: CONTRIBUTING dist: Dist-Zilla-PluginBundle-Author-ETHER encoding: UTF-8 has_xs: 0 location: build source_filename: CONTRIBUTING Dist::Zilla::Role::RepoFileInjector: allow_overwrite: 1 repo_root: . version: '0.009' name: '@Author::ETHER/generate CONTRIBUTING' version: '0.015' - class: Dist::Zilla::Plugin::InstallGuide config: Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000038' version: '0.006' name: '@Author::ETHER/InstallGuide' version: '1.200014' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: 1 fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' - '@Author::ETHER/Examples' skips: [] switch: [] name: '@Author::ETHER/Test::Compile' version: '2.058' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - '@Author::ETHER/Examples' - ':TestFiles' - ':ExtraTestFiles' name: '@Author::ETHER/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':ExecFiles' - ':ExtraTestFiles' - ':InstallModules' - ':TestFiles' - '@Author::ETHER/Examples' trailing_whitespace: 1 name: '@Author::ETHER/Test::EOL' version: '0.19' - class: Dist::Zilla::Plugin::MetaTests name: '@Author::ETHER/MetaTests' version: '6.031' - class: Dist::Zilla::Plugin::Test::CPAN::Changes config: Dist::Zilla::Plugin::Test::CPAN::Changes: changelog: Changes name: '@Author::ETHER/Test::CPAN::Changes' version: '0.012' - class: Dist::Zilla::Plugin::Test::ChangesHasContent name: '@Author::ETHER/Test::ChangesHasContent' version: '0.011' - class: Dist::Zilla::Plugin::Test::MinimumVersion config: Dist::Zilla::Plugin::Test::MinimumVersion: max_target_perl: '5.020' name: '@Author::ETHER/Test::MinimumVersion' version: '2.000010' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Author::ETHER/PodSyntaxTests' version: '6.031' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Author::ETHER/PodCoverageTests' version: '6.031' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: - examples - lib - script - t - xt spell_cmd: '' stopwords: - irc wordlist: Pod::Wordlist name: '@Author::ETHER/Test::PodSpelling' version: '2.007005' - class: Dist::Zilla::Plugin::Test::Kwalitee config: Dist::Zilla::Plugin::Test::Kwalitee: filename: xt/author/kwalitee.t skiptest: [] name: '@Author::ETHER/Test::Kwalitee' version: '2.12' - class: Dist::Zilla::Plugin::MojibakeTests name: '@Author::ETHER/MojibakeTests' version: '0.8' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@Author::ETHER/Test::ReportPrereqs' version: '0.029' - class: Dist::Zilla::Plugin::Test::Portability config: Dist::Zilla::Plugin::Test::Portability: options: '' name: '@Author::ETHER/Test::Portability' version: '2.001001' - class: Dist::Zilla::Plugin::Test::CleanNamespaces config: Dist::Zilla::Plugin::Test::CleanNamespaces: filename: xt/author/clean-namespaces.t skips: [] name: '@Author::ETHER/Test::CleanNamespaces' version: '0.006' - class: Dist::Zilla::Plugin::Git::Describe name: '@Author::ETHER/Git::Describe' version: '0.008' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':PerlExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@Author::ETHER/EnsurePod5' version: '4.019' - class: Pod::Weaver::Plugin::H1Nester name: '@Author::ETHER/H1Nester' version: '4.019' - class: Pod::Weaver::Plugin::SingleEncoding name: '@Author::ETHER/SingleEncoding' version: '4.019' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/List' version: '4.019' - class: Pod::Weaver::Plugin::Transformer name: '@Author::ETHER/Verbatim' version: '4.019' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/header' version: '4.019' - class: Pod::Weaver::Section::Name name: '@Author::ETHER/Name' version: '4.019' - class: Pod::Weaver::Section::Version name: '@Author::ETHER/Version' version: '4.019' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/prelude' version: '4.019' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.019' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.019' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.019' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.019' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.019' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.019' - class: Pod::Weaver::Section::Collect name: TYPES version: '4.019' - class: Pod::Weaver::Section::Leftovers name: '@Author::ETHER/Leftovers' version: '4.019' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/postlude' version: '4.019' - class: Pod::Weaver::Section::GenerateSection name: '@Author::ETHER/generate SUPPORT' version: '4.019' - class: Pod::Weaver::Section::Authors name: '@Author::ETHER/Authors' version: '4.019' - class: Pod::Weaver::Section::AllowOverride name: '@Author::ETHER/allow override AUTHOR' version: '0.05' - class: Pod::Weaver::Section::Contributors name: '@Author::ETHER/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@Author::ETHER/Legal' version: '4.019' - class: Pod::Weaver::Section::Region name: '@Author::ETHER/footer' version: '4.019' - class: Pod::Weaver::Section::AllowOverride name: 'append to SUPPORT' version: '0.05' name: '@Author::ETHER/PodWeaver' version: '4.010' - class: Dist::Zilla::Plugin::GithubMeta name: '@Author::ETHER/GithubMeta' version: '0.58' - class: Dist::Zilla::Plugin::AutoMetaResources name: '@Author::ETHER/AutoMetaResources' version: '1.21' - class: Dist::Zilla::Plugin::Authority name: '@Author::ETHER/Authority' version: '1.009' - class: Dist::Zilla::Plugin::MetaNoIndex name: '@Author::ETHER/MetaNoIndex' version: '6.031' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder: - ':InstallModules' finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.031' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' inherit_missing: 0 inherit_version: 0 meta_noindex: 1 Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000038' version: '0.006' name: '@Author::ETHER/MetaProvides::Package' version: '2.004003' - class: Dist::Zilla::Plugin::MetaConfig name: '@Author::ETHER/MetaConfig' version: '6.031' - class: Dist::Zilla::Plugin::Keywords config: Dist::Zilla::Plugin::Keywords: keywords: - JSON - Schema - validator - data - validation - structure - specification name: '@Author::ETHER/Keywords' version: '0.007' - class: Dist::Zilla::Plugin::UseUnsafeInc config: Dist::Zilla::Plugin::UseUnsafeInc: dot_in_INC: 0 name: '@Author::ETHER/UseUnsafeInc' version: '0.002' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Author::ETHER/AutoPrereqs' version: '6.031' - class: Dist::Zilla::Plugin::Prereqs::AuthorDeps name: '@Author::ETHER/Prereqs::AuthorDeps' version: '0.007' - class: Dist::Zilla::Plugin::MinimumPerl name: '@Author::ETHER/MinimumPerl' version: '1.006' - class: Dist::Zilla::Plugin::ModuleBuildTiny config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/ModuleBuildTiny' version: '0.017' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.43.0 include_authors: 0 include_releaser: 1 order_by: commits paths: [] name: '@Author::ETHER/Git::Contributors' version: '0.036' - class: Dist::Zilla::Plugin::StaticInstall config: Dist::Zilla::Plugin::StaticInstall: dry_run: 0 mode: auto name: '@Author::ETHER/StaticInstall' version: '0.012' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 9 name: '@Author::ETHER/RunExtraTests' version: '0.029' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000038' version: '0.006' name: '@Author::ETHER/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 1 quiet: 1 run: - "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" version: '0.049' name: '@Author::ETHER/.ackrc' version: '0.049' - class: Dist::Zilla::Plugin::Run::AfterBuild config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" fatal_errors: 0 quiet: 1 version: '0.049' name: '@Author::ETHER/.latest' version: '0.049' - class: Dist::Zilla::Plugin::CheckStrictVersion name: '@Author::ETHER/CheckStrictVersion' version: '0.001' - class: Dist::Zilla::Plugin::CheckMetaResources name: '@Author::ETHER/CheckMetaResources' version: '0.001' - class: Dist::Zilla::Plugin::EnsureLatestPerl config: Dist::Zilla::Plugin::EnsureLatestPerl: Module::CoreList: '5.20231230' name: '@Author::ETHER/EnsureLatestPerl' version: '0.010' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release run_under_travis: 0 skip: [] name: '@Author::ETHER/stale modules, release' version: '0.058' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.43.0 repo_root: . name: '@Author::ETHER/initial check' version: '2.049' - class: Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts config: Dist::Zilla::Role::Git::Repo: git_version: 2.43.0 repo_root: . name: '@Author::ETHER/Git::CheckFor::MergeConflicts' version: '0.014' - class: Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: git_version: 2.43.0 repo_root: . name: '@Author::ETHER/Git::CheckFor::CorrectBranch' version: '0.014' - class: Dist::Zilla::Plugin::Git::Remote::Check name: '@Author::ETHER/Git::Remote::Check' version: 0.1.2 - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@Author::ETHER/CheckPrereqsIndexed' version: '0.022' - class: Dist::Zilla::Plugin::TestRelease name: '@Author::ETHER/TestRelease' version: '6.031' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: [] allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.43.0 repo_root: . name: '@Author::ETHER/after tests' version: '2.049' - class: Dist::Zilla::Plugin::CheckIssues name: '@Author::ETHER/CheckIssues' version: '0.011' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Author::ETHER/UploadToCPAN' version: '6.031' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - CONTRIBUTING - INSTALL - LICENCE - LICENSE - ppport.h match: [] name: '@Author::ETHER/copy generated files' version: '0.007' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@Author::ETHER/ReadmeAnyFromPod' version: '0.163250' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: recommends name: '@Author::ETHER/@Git::VersionManager/pluginbundle version' version: '6.031' - class: Dist::Zilla::Plugin::RewriteVersion::Transitional config: Dist::Zilla::Plugin::RewriteVersion: add_tarball_name: 0 finders: - ':ExecFiles' - ':InstallModules' global: 1 skip_version_provider: 0 Dist::Zilla::Plugin::RewriteVersion::Transitional: {} name: '@Author::ETHER/@Git::VersionManager/RewriteVersion::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::MetaProvides::Update name: '@Author::ETHER/@Git::VersionManager/MetaProvides::Update' version: '0.007' - class: Dist::Zilla::Plugin::CopyFilesFromRelease config: Dist::Zilla::Plugin::CopyFilesFromRelease: filename: - Changes match: [] name: '@Author::ETHER/@Git::VersionManager/CopyFilesFromRelease' version: '0.007' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: - . commit_msg: '%N-%v%t%n%n%c' signoff: 0 Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CONTRIBUTING - Changes - INSTALL - LICENCE - README.pod allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.43.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/@Git::VersionManager/release snapshot' version: '2.049' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.582 tag_format: v%V tag_message: v%v%t Dist::Zilla::Role::Git::Repo: git_version: 2.43.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/@Git::VersionManager/Git::Tag' version: '2.049' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':InstallModules' global: 1 munge_makefile_pl: 1 Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} name: '@Author::ETHER/@Git::VersionManager/BumpVersionAfterRelease::Transitional' version: '0.009' - class: Dist::Zilla::Plugin::NextRelease name: '@Author::ETHER/@Git::VersionManager/NextRelease' version: '6.031' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'increment $VERSION after %v release' signoff: 0 Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Build.PL - Changes - Makefile.PL allow_dirty_match: - (?^:^lib/.*\.pm$) changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.43.0 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@Author::ETHER/@Git::VersionManager/post-release commit' version: '2.049' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: x_Dist_Zilla type: requires name: '@Author::ETHER/@Git::VersionManager/prereqs for @Git::VersionManager' version: '6.031' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: git_version: 2.43.0 repo_root: . name: '@Author::ETHER/Git::Push' version: '2.049' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@Author::ETHER/GitHub::Update' version: '0.49' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: fatal_errors: 0 quiet: 0 run: - REDACTED version: '0.049' name: '@Author::ETHER/install release' version: '0.049' - class: Dist::Zilla::Plugin::Run::AfterRelease config: Dist::Zilla::Plugin::Run::Role::Runner: eval: - 'print "release complete!\xa"' fatal_errors: 1 quiet: 1 version: '0.049' name: '@Author::ETHER/release complete' version: '0.049' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Author::ETHER/ConfirmRelease' version: '6.031' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: x_Dist_Zilla type: requires name: '@Author::ETHER/prereqs for @Author::ETHER' version: '6.031' - class: Dist::Zilla::Plugin::ShareDir name: ShareDir version: '6.031' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: RuntimeRequires version: '6.031' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: suggests name: RuntimeSuggests version: '6.031' - class: Dist::Zilla::Plugin::Prereqs::Soften config: Dist::Zilla::Plugin::Prereqs::Soften: copy_to: - develop.requires modules: - Time::Moment - DateTime::Format::RFC3339 - Data::Validate::Domain - Email::Address::XS - Net::IDN::Encode modules_from_features: ~ to_relationship: suggests name: Prereqs::Soften version: '0.006003' - class: Dist::Zilla::Plugin::Breaks name: Breaks version: '0.004' - class: Dist::Zilla::Plugin::Test::CheckBreaks config: Dist::Zilla::Plugin::Test::CheckBreaks: conflicts_module: [] no_forced_deps: 0 Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000038' version: '0.006' name: Test::CheckBreaks version: '0.019' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.031' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.031' - class: Dist::Zilla::Plugin::VerifyPhases name: '@Author::ETHER/PHASE VERIFICATION' version: '0.016' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: 0 version: '6.031' x_authority: cpan:ETHER x_breaks: JSON::Schema::Modern::Document::OpenAPI: '< 0.055' JSON::Schema::Modern::Vocabulary::OpenAPI: '< 0.017' x_generated_by_perl: v5.39.6 x_serialization_backend: 'YAML::Tiny version 1.74' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' x_static_install: 1 x_use_unsafe_inc: 0 JSON-Schema-Modern-0.582/lib/000770 000766 000024 00000000000 14553630022 015737 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/update-schemas000750 000766 000024 00000006016 14553630022 020023 0ustar00etherstaff000000 000000 #!/usr/bin/env perl use strict; use warnings; use Path::Tiny; use HTTP::Tiny; use lib 'lib'; use Test::File::ShareDir -share => { -dist => { 'JSON-Schema-Modern' => 'share' } }; use JSON::Schema::Modern 0.578; # ATTENTION DISTRO REPACKAGERS: do NOT use fresh copies of these files # from their source; it is important to include the original versions # of the files as they were packaged with this cpan distribution, or # surprising behaviour may occur. my %files = ( 'draft2020-12/meta/applicator.json' => 'https://json-schema.org/draft/2020-12/meta/applicator', 'draft2020-12/meta/content.json' => 'https://json-schema.org/draft/2020-12/meta/content', 'draft2020-12/meta/core.json' => 'https://json-schema.org/draft/2020-12/meta/core', 'draft2020-12/meta/format-annotation.json' => 'https://json-schema.org/draft/2020-12/meta/format-annotation', 'draft2020-12/meta/format-assertion.json' => 'https://json-schema.org/draft/2020-12/meta/format-assertion', 'draft2020-12/meta/meta-data.json' => 'https://json-schema.org/draft/2020-12/meta/meta-data', 'draft2020-12/meta/unevaluated.json' => 'https://json-schema.org/draft/2020-12/meta/unevaluated', 'draft2020-12/meta/validation.json' => 'https://json-schema.org/draft/2020-12/meta/validation', 'draft2020-12/output/schema.json' => 'https://json-schema.org/draft/2020-12/output/schema', 'draft2020-12/schema.json' => 'https://json-schema.org/draft/2020-12/schema', 'draft2019-09/meta/applicator.json' => 'https://json-schema.org/draft/2019-09/meta/applicator', 'draft2019-09/meta/content.json' => 'https://json-schema.org/draft/2019-09/meta/content', 'draft2019-09/meta/core.json' => 'https://json-schema.org/draft/2019-09/meta/core', 'draft2019-09/meta/format.json' => 'https://json-schema.org/draft/2019-09/meta/format', 'draft2019-09/meta/meta-data.json' => 'https://json-schema.org/draft/2019-09/meta/meta-data', 'draft2019-09/meta/validation.json' => 'https://json-schema.org/draft/2019-09/meta/validation', 'draft2019-09/output/schema.json' => 'https://json-schema.org/draft/2019-09/output/schema', 'draft2019-09/schema.json' => 'https://json-schema.org/draft/2019-09/schema', 'draft7/schema.json' => 'http://json-schema.org/draft-07/schema#', 'LICENSE' => 'https://raw.githubusercontent.com/json-schema-org/json-schema-spec/main/LICENSE', ); my $js = JSON::Schema::Modern->new(validate_formats => 1); foreach my $target (keys %files) { my $source_uri = $files{$target}; $target = path('share', $target); $target->parent->mkpath; my $response = HTTP::Tiny->new->get($source_uri); die "Failed to fetch $source_uri: $response->{status} $response->{reason}" if not $response->{success}; $target->spew($response->{content}); next if $target->basename eq 'LICENSE'; my $document = $js->get_document($source_uri); print '# validating ', $document->canonical_uri, "\n" if $ENV{DEBUG}; my $result = $document->validate; die $result->dump if not $result; } JSON-Schema-Modern-0.582/weaver.ini000640 000766 000024 00000000157 14553630022 017165 0ustar00etherstaff000000 000000 [@Author::ETHER] [AllowOverride / append to SUPPORT] header_re = ^SUPPORT$ match_anywhere = 1 action = append JSON-Schema-Modern-0.582/LICENCE000644 000766 000024 00000046440 14553630022 016171 0ustar00etherstaff000000 000000 This software is copyright (c) 2020 by Karen Etheridge. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2020 by Karen Etheridge. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Perl Artistic License 1.0 --- This software is Copyright (c) 2020 by Karen Etheridge. This is free software, licensed under: The Perl Artistic License 1.0 The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End JSON-Schema-Modern-0.582/META.json000644 000766 000024 00000146563 14553630022 016634 0ustar00etherstaff000000 000000 { "abstract" : "Validate data against a schema", "author" : [ "Karen Etheridge " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.031, CPAN::Meta::Converter version 2.150010", "keywords" : [ "JSON", "Schema", "validator", "data", "validation", "structure", "specification" ], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "JSON-Schema-Modern", "no_index" : { "directory" : [ "share", "t", "xt" ] }, "prereqs" : { "configure" : { "requires" : { "Module::Build::Tiny" : "0.034", "perl" : "5.020" } }, "develop" : { "recommends" : { "Dist::Zilla::PluginBundle::Author::ETHER" : "0.163", "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007" }, "requires" : { "Data::Validate::Domain" : "0", "DateTime::Format::RFC3339" : "0", "Email::Address::XS" : "1.04", "Encode" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Net::IDN::Encode" : "0", "Pod::Coverage::TrustPod" : "0", "Pod::Wordlist" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta" : "0", "Test::CleanNamespaces" : "0.15", "Test::EOL" : "0", "Test::Kwalitee" : "1.21", "Test::MinimumVersion" : "0", "Test::Mojibake" : "0", "Test::More" : "0.96", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "Time::Moment" : "0" } }, "runtime" : { "requires" : { "B" : "0", "Carp" : "0", "Digest::MD5" : "0", "Exporter" : "0", "Feature::Compat::Try" : "0", "File::ShareDir" : "0", "Getopt::Long::Descriptive" : "0", "JSON::PP" : "0", "List::Util" : "1.55", "MIME::Base64" : "0", "Math::BigFloat" : "0", "Module::Runtime" : "0", "Mojo::JSON" : "0", "Mojo::JSON::Pointer" : "0", "Mojo::URL" : "0", "Mojolicious" : "7.87", "Moo" : "0", "Moo::Role" : "0", "MooX::TypeTiny" : "0.002002", "Path::Tiny" : "0", "Ref::Util" : "0.100", "Safe::Isa" : "1.000008", "Scalar::Util" : "0", "Storable" : "0", "Sub::Install" : "0", "Types::Common::Numeric" : "0", "Types::Standard" : "1.016003", "constant" : "0", "experimental" : "0.026", "if" : "0", "namespace::clean" : "0", "open" : "0", "overload" : "0", "perl" : "v5.20.0", "stable" : "0.031", "strict" : "0", "strictures" : "2", "warnings" : "0" }, "suggests" : { "Class::XSAccessor" : "0", "Cpanel::JSON::XS" : "0", "Data::Validate::Domain" : "0", "DateTime::Format::RFC3339" : "0", "Email::Address::XS" : "1.04", "Net::IDN::Encode" : "0", "Ref::Util::XS" : "0", "Time::Moment" : "0", "Type::Tiny::XS" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "CPAN::Meta::Check" : "0.011", "CPAN::Meta::Requirements" : "0", "Data::Dumper" : "0", "File::Spec" : "0", "IPC::Open3" : "0", "Math::BigInt" : "0", "Module::Metadata" : "0", "Test2::V0" : "0", "Test::Deep" : "0", "Test::Deep::UnorderedPairs" : "0", "Test::Fatal" : "0", "Test::File::ShareDir" : "0", "Test::JSON::Schema::Acceptance" : "1.021", "Test::Memory::Cycle" : "0", "Test::More" : "0.96", "Test::Needs" : "0", "Test::Warnings" : "0", "Test::Without::Module" : "0.21", "lib" : "0", "perl" : "v5.20.0", "utf8" : "0" } }, "x_Dist_Zilla" : { "requires" : { "Dist::Zilla" : "5", "Dist::Zilla::Plugin::Authority" : "1.009", "Dist::Zilla::Plugin::AutoMetaResources" : "0", "Dist::Zilla::Plugin::AutoPrereqs" : "5.038", "Dist::Zilla::Plugin::Breaks" : "0", "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004", "Dist::Zilla::Plugin::CheckIssues" : "0", "Dist::Zilla::Plugin::CheckMetaResources" : "0", "Dist::Zilla::Plugin::CheckPrereqsIndexed" : "0.019", "Dist::Zilla::Plugin::CheckSelfDependency" : "0", "Dist::Zilla::Plugin::CheckStrictVersion" : "0", "Dist::Zilla::Plugin::ConfirmRelease" : "0", "Dist::Zilla::Plugin::CopyFilesFromRelease" : "0", "Dist::Zilla::Plugin::EnsureLatestPerl" : "0", "Dist::Zilla::Plugin::ExecDir" : "0", "Dist::Zilla::Plugin::FileFinder::ByName" : "0", "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : "0", "Dist::Zilla::Plugin::Git::Check" : "0", "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch" : "0.004", "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts" : "0", "Dist::Zilla::Plugin::Git::Commit" : "2.020", "Dist::Zilla::Plugin::Git::Contributors" : "0.029", "Dist::Zilla::Plugin::Git::Describe" : "0.004", "Dist::Zilla::Plugin::Git::GatherDir" : "2.016", "Dist::Zilla::Plugin::Git::Push" : "0", "Dist::Zilla::Plugin::Git::Remote::Check" : "0", "Dist::Zilla::Plugin::Git::Tag" : "0", "Dist::Zilla::Plugin::GitHub::Update" : "0.40", "Dist::Zilla::Plugin::GithubMeta" : "0.54", "Dist::Zilla::Plugin::InstallGuide" : "1.200005", "Dist::Zilla::Plugin::Keywords" : "0.004", "Dist::Zilla::Plugin::License" : "5.038", "Dist::Zilla::Plugin::Manifest" : "0", "Dist::Zilla::Plugin::MetaConfig" : "0", "Dist::Zilla::Plugin::MetaJSON" : "0", "Dist::Zilla::Plugin::MetaNoIndex" : "0", "Dist::Zilla::Plugin::MetaProvides::Package" : "1.15000002", "Dist::Zilla::Plugin::MetaTests" : "0", "Dist::Zilla::Plugin::MetaYAML" : "0", "Dist::Zilla::Plugin::MinimumPerl" : "1.006", "Dist::Zilla::Plugin::ModuleBuildTiny" : "0.012", "Dist::Zilla::Plugin::MojibakeTests" : "0.8", "Dist::Zilla::Plugin::NextRelease" : "5.033", "Dist::Zilla::Plugin::PodCoverageTests" : "5.040", "Dist::Zilla::Plugin::PodSyntaxTests" : "5.040", "Dist::Zilla::Plugin::PodWeaver" : "4.008", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::Plugin::Prereqs::AuthorDeps" : "0.006", "Dist::Zilla::Plugin::Prereqs::Soften" : "0", "Dist::Zilla::Plugin::PromptIfStale" : "0", "Dist::Zilla::Plugin::Readme" : "0", "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.142180", "Dist::Zilla::Plugin::RewriteVersion::Transitional" : "0.006", "Dist::Zilla::Plugin::Run::AfterBuild" : "0.041", "Dist::Zilla::Plugin::Run::AfterRelease" : "0.038", "Dist::Zilla::Plugin::Run::BeforeRelease" : "0", "Dist::Zilla::Plugin::RunExtraTests" : "0.024", "Dist::Zilla::Plugin::ShareDir" : "0", "Dist::Zilla::Plugin::StaticInstall" : "0.005", "Dist::Zilla::Plugin::Test::CPAN::Changes" : "0.012", "Dist::Zilla::Plugin::Test::ChangesHasContent" : "0", "Dist::Zilla::Plugin::Test::CheckBreaks" : "0", "Dist::Zilla::Plugin::Test::CleanNamespaces" : "0.006", "Dist::Zilla::Plugin::Test::Compile" : "2.039", "Dist::Zilla::Plugin::Test::EOL" : "0.17", "Dist::Zilla::Plugin::Test::Kwalitee" : "2.10", "Dist::Zilla::Plugin::Test::MinimumVersion" : "2.000010", "Dist::Zilla::Plugin::Test::NoTabs" : "0.08", "Dist::Zilla::Plugin::Test::PodSpelling" : "2.006003", "Dist::Zilla::Plugin::Test::Portability" : "2.000007", "Dist::Zilla::Plugin::Test::ReportPrereqs" : "0.022", "Dist::Zilla::Plugin::TestRelease" : "0", "Dist::Zilla::Plugin::UploadToCPAN" : "0", "Dist::Zilla::Plugin::UseUnsafeInc" : "0", "Dist::Zilla::PluginBundle::Author::ETHER" : "0.154", "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007", "Software::License::Perl_5" : "0" } } }, "provides" : { "JSON::Schema::Modern" : { "file" : "lib/JSON/Schema/Modern.pm", "version" : "0.582" }, "JSON::Schema::Modern::Annotation" : { "file" : "lib/JSON/Schema/Modern/Annotation.pm", "version" : "0.582" }, "JSON::Schema::Modern::Document" : { "file" : "lib/JSON/Schema/Modern/Document.pm", "version" : "0.582" }, "JSON::Schema::Modern::Error" : { "file" : "lib/JSON/Schema/Modern/Error.pm", "version" : "0.582" }, "JSON::Schema::Modern::Result" : { "file" : "lib/JSON/Schema/Modern/Result.pm", "version" : "0.582" }, "JSON::Schema::Modern::Utilities" : { "file" : "lib/JSON/Schema/Modern/Utilities.pm", "version" : "0.582" }, "JSON::Schema::Modern::Vocabulary" : { "file" : "lib/JSON/Schema/Modern/Vocabulary.pm", "version" : "0.582" }, "JSON::Schema::Modern::Vocabulary::Applicator" : { "file" : "lib/JSON/Schema/Modern/Vocabulary/Applicator.pm", "version" : "0.582" }, "JSON::Schema::Modern::Vocabulary::Content" : { "file" : "lib/JSON/Schema/Modern/Vocabulary/Content.pm", "version" : "0.582" }, "JSON::Schema::Modern::Vocabulary::Core" : { "file" : "lib/JSON/Schema/Modern/Vocabulary/Core.pm", "version" : "0.582" }, "JSON::Schema::Modern::Vocabulary::FormatAnnotation" : { "file" : "lib/JSON/Schema/Modern/Vocabulary/FormatAnnotation.pm", "version" : "0.582" }, "JSON::Schema::Modern::Vocabulary::FormatAssertion" : { "file" : "lib/JSON/Schema/Modern/Vocabulary/FormatAssertion.pm", "version" : "0.582" }, "JSON::Schema::Modern::Vocabulary::MetaData" : { "file" : "lib/JSON/Schema/Modern/Vocabulary/MetaData.pm", "version" : "0.582" }, "JSON::Schema::Modern::Vocabulary::Unevaluated" : { "file" : "lib/JSON/Schema/Modern/Vocabulary/Unevaluated.pm", "version" : "0.582" }, "JSON::Schema::Modern::Vocabulary::Validation" : { "file" : "lib/JSON/Schema/Modern/Vocabulary/Validation.pm", "version" : "0.582" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/karenetheridge/JSON-Schema-Modern/issues" }, "homepage" : "https://github.com/karenetheridge/JSON-Schema-Modern", "repository" : { "type" : "git", "url" : "https://github.com/karenetheridge/JSON-Schema-Modern.git", "web" : "https://github.com/karenetheridge/JSON-Schema-Modern" } }, "version" : "0.582", "x_Dist_Zilla" : { "perl" : { "version" : "5.039006" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Run::BeforeRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "do './update-schemas'; die $@ || $! if $@ || $!" ], "fatal_errors" : 1, "quiet" : 0, "version" : "0.049" } }, "name" : "Run::BeforeRelease", "version" : "0.049" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/pluginbundle version", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::Author::ETHER" ], "phase" : "build", "run_under_travis" : 0, "skip" : [] } }, "name" : "@Author::ETHER/stale modules, build", "version" : "0.058" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Author::ETHER/ExecDir", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FileFinder::ByName", "name" : "@Author::ETHER/Examples", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "CONTRIBUTING", "INSTALL", "LICENCE", "README.pod", "TODO", "pull_request_template.md" ], "exclude_match" : [], "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@Author::ETHER/Git::GatherDir", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Author::ETHER/MetaYAML", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Author::ETHER/MetaJSON", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Author::ETHER/Readme", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Author::ETHER/Manifest", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@Author::ETHER/License", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::FromShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : { "destination_filename" : "CONTRIBUTING", "dist" : "Dist-Zilla-PluginBundle-Author-ETHER", "encoding" : "UTF-8", "has_xs" : 0, "location" : "build", "source_filename" : "CONTRIBUTING" }, "Dist::Zilla::Role::RepoFileInjector" : { "allow_overwrite" : 1, "repo_root" : ".", "version" : "0.009" } }, "name" : "@Author::ETHER/generate CONTRIBUTING", "version" : "0.015" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "config" : { "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000038", "version" : "0.006" } }, "name" : "@Author::ETHER/InstallGuide", "version" : "1.200014" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : 1, "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles", "@Author::ETHER/Examples" ], "skips" : [], "switch" : [] } }, "name" : "@Author::ETHER/Test::Compile", "version" : "2.058" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", "@Author::ETHER/Examples", ":TestFiles", ":ExtraTestFiles" ] } }, "name" : "@Author::ETHER/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":ExecFiles", ":ExtraTestFiles", ":InstallModules", ":TestFiles", "@Author::ETHER/Examples" ], "trailing_whitespace" : 1 } }, "name" : "@Author::ETHER/Test::EOL", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::MetaTests", "name" : "@Author::ETHER/MetaTests", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "config" : { "Dist::Zilla::Plugin::Test::CPAN::Changes" : { "changelog" : "Changes" } }, "name" : "@Author::ETHER/Test::CPAN::Changes", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::Test::ChangesHasContent", "name" : "@Author::ETHER/Test::ChangesHasContent", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Test::MinimumVersion", "config" : { "Dist::Zilla::Plugin::Test::MinimumVersion" : { "max_target_perl" : "5.020" } }, "name" : "@Author::ETHER/Test::MinimumVersion", "version" : "2.000010" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Author::ETHER/PodSyntaxTests", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Author::ETHER/PodCoverageTests", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [ "examples", "lib", "script", "t", "xt" ], "spell_cmd" : "", "stopwords" : [ "irc" ], "wordlist" : "Pod::Wordlist" } }, "name" : "@Author::ETHER/Test::PodSpelling", "version" : "2.007005" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee", "config" : { "Dist::Zilla::Plugin::Test::Kwalitee" : { "filename" : "xt/author/kwalitee.t", "skiptest" : [] } }, "name" : "@Author::ETHER/Test::Kwalitee", "version" : "2.12" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@Author::ETHER/MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@Author::ETHER/Test::ReportPrereqs", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::Test::Portability", "config" : { "Dist::Zilla::Plugin::Test::Portability" : { "options" : "" } }, "name" : "@Author::ETHER/Test::Portability", "version" : "2.001001" }, { "class" : "Dist::Zilla::Plugin::Test::CleanNamespaces", "config" : { "Dist::Zilla::Plugin::Test::CleanNamespaces" : { "filename" : "xt/author/clean-namespaces.t", "skips" : [] } }, "name" : "@Author::ETHER/Test::CleanNamespaces", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Git::Describe", "name" : "@Author::ETHER/Git::Describe", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":PerlExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@Author::ETHER/EnsurePod5", "version" : "4.019" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@Author::ETHER/H1Nester", "version" : "4.019" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@Author::ETHER/SingleEncoding", "version" : "4.019" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/List", "version" : "4.019" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@Author::ETHER/Verbatim", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/header", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@Author::ETHER/Name", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@Author::ETHER/Version", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/prelude", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TYPES", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@Author::ETHER/Leftovers", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/postlude", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@Author::ETHER/generate SUPPORT", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@Author::ETHER/Authors", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "@Author::ETHER/allow override AUTHOR", "version" : "0.05" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@Author::ETHER/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@Author::ETHER/Legal", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@Author::ETHER/footer", "version" : "4.019" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "append to SUPPORT", "version" : "0.05" } ] } }, "name" : "@Author::ETHER/PodWeaver", "version" : "4.010" }, { "class" : "Dist::Zilla::Plugin::GithubMeta", "name" : "@Author::ETHER/GithubMeta", "version" : "0.58" }, { "class" : "Dist::Zilla::Plugin::AutoMetaResources", "name" : "@Author::ETHER/AutoMetaResources", "version" : "1.21" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Author::ETHER/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::MetaNoIndex", "name" : "@Author::ETHER/MetaNoIndex", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder" : [ ":InstallModules" ], "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.031" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004", "inherit_missing" : 0, "inherit_version" : 0, "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000038", "version" : "0.006" } }, "name" : "@Author::ETHER/MetaProvides::Package", "version" : "2.004003" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Author::ETHER/MetaConfig", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Keywords", "config" : { "Dist::Zilla::Plugin::Keywords" : { "keywords" : [ "JSON", "Schema", "validator", "data", "validation", "structure", "specification" ] } }, "name" : "@Author::ETHER/Keywords", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::UseUnsafeInc", "config" : { "Dist::Zilla::Plugin::UseUnsafeInc" : { "dot_in_INC" : 0 } }, "name" : "@Author::ETHER/UseUnsafeInc", "version" : "0.002" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Author::ETHER/AutoPrereqs", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Prereqs::AuthorDeps", "name" : "@Author::ETHER/Prereqs::AuthorDeps", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::MinimumPerl", "name" : "@Author::ETHER/MinimumPerl", "version" : "1.006" }, { "class" : "Dist::Zilla::Plugin::ModuleBuildTiny", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/ModuleBuildTiny", "version" : "0.017" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.43.0", "include_authors" : 0, "include_releaser" : 1, "order_by" : "commits", "paths" : [] } }, "name" : "@Author::ETHER/Git::Contributors", "version" : "0.036" }, { "class" : "Dist::Zilla::Plugin::StaticInstall", "config" : { "Dist::Zilla::Plugin::StaticInstall" : { "dry_run" : 0, "mode" : "auto" } }, "name" : "@Author::ETHER/StaticInstall", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 9 } }, "name" : "@Author::ETHER/RunExtraTests", "version" : "0.029" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000038", "version" : "0.006" } }, "name" : "@Author::ETHER/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 1, "quiet" : 1, "run" : [ "bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%d' >> .ackrc; fi\"" ], "version" : "0.049" } }, "name" : "@Author::ETHER/.ackrc", "version" : "0.049" }, { "class" : "Dist::Zilla::Plugin::Run::AfterBuild", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }" ], "fatal_errors" : 0, "quiet" : 1, "version" : "0.049" } }, "name" : "@Author::ETHER/.latest", "version" : "0.049" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "@Author::ETHER/CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::CheckMetaResources", "name" : "@Author::ETHER/CheckMetaResources", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::EnsureLatestPerl", "config" : { "Dist::Zilla::Plugin::EnsureLatestPerl" : { "Module::CoreList" : "5.20231230" } }, "name" : "@Author::ETHER/EnsureLatestPerl", "version" : "0.010" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 1, "modules" : [], "phase" : "release", "run_under_travis" : 0, "skip" : [] } }, "name" : "@Author::ETHER/stale modules, release", "version" : "0.058" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.43.0", "repo_root" : "." } }, "name" : "@Author::ETHER/initial check", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::MergeConflicts", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.43.0", "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::MergeConflicts", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.43.0", "repo_root" : "." } }, "name" : "@Author::ETHER/Git::CheckFor::CorrectBranch", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::Git::Remote::Check", "name" : "@Author::ETHER/Git::Remote::Check", "version" : "0.1.2" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@Author::ETHER/CheckPrereqsIndexed", "version" : "0.022" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Author::ETHER/TestRelease", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.43.0", "repo_root" : "." } }, "name" : "@Author::ETHER/after tests", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::CheckIssues", "name" : "@Author::ETHER/CheckIssues", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Author::ETHER/UploadToCPAN", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "CONTRIBUTING", "INSTALL", "LICENCE", "LICENSE", "ppport.h" ], "match" : [] } }, "name" : "@Author::ETHER/copy generated files", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@Author::ETHER/ReadmeAnyFromPod", "version" : "0.163250" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "recommends" } }, "name" : "@Author::ETHER/@Git::VersionManager/pluginbundle version", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", "config" : { "Dist::Zilla::Plugin::RewriteVersion" : { "add_tarball_name" : 0, "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 1, "skip_version_provider" : 0 }, "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {} }, "name" : "@Author::ETHER/@Git::VersionManager/RewriteVersion::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Update", "name" : "@Author::ETHER/@Git::VersionManager/MetaProvides::Update", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", "config" : { "Dist::Zilla::Plugin::CopyFilesFromRelease" : { "filename" : [ "Changes" ], "match" : [] } }, "name" : "@Author::ETHER/@Git::VersionManager/CopyFilesFromRelease", "version" : "0.007" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [ "." ], "commit_msg" : "%N-%v%t%n%n%c", "signoff" : 0 }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CONTRIBUTING", "Changes", "INSTALL", "LICENCE", "README.pod" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.43.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/@Git::VersionManager/release snapshot", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.582", "tag_format" : "v%V", "tag_message" : "v%v%t" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.43.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/@Git::VersionManager/Git::Tag", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":InstallModules" ], "global" : 1, "munge_makefile_pl" : 1 }, "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} }, "name" : "@Author::ETHER/@Git::VersionManager/BumpVersionAfterRelease::Transitional", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@Author::ETHER/@Git::VersionManager/NextRelease", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "increment $VERSION after %v release", "signoff" : 0 }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Build.PL", "Changes", "Makefile.PL" ], "allow_dirty_match" : [ "(?^:^lib/.*\\.pm$)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.43.0", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@Author::ETHER/@Git::VersionManager/post-release commit", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "x_Dist_Zilla", "type" : "requires" } }, "name" : "@Author::ETHER/@Git::VersionManager/prereqs for @Git::VersionManager", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.43.0", "repo_root" : "." } }, "name" : "@Author::ETHER/Git::Push", "version" : "2.049" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@Author::ETHER/GitHub::Update", "version" : "0.49" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "fatal_errors" : 0, "quiet" : 0, "run" : [ "REDACTED" ], "version" : "0.049" } }, "name" : "@Author::ETHER/install release", "version" : "0.049" }, { "class" : "Dist::Zilla::Plugin::Run::AfterRelease", "config" : { "Dist::Zilla::Plugin::Run::Role::Runner" : { "eval" : [ "print \"release complete!\\xa\"" ], "fatal_errors" : 1, "quiet" : 1, "version" : "0.049" } }, "name" : "@Author::ETHER/release complete", "version" : "0.049" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Author::ETHER/ConfirmRelease", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "x_Dist_Zilla", "type" : "requires" } }, "name" : "@Author::ETHER/prereqs for @Author::ETHER", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "ShareDir", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "RuntimeRequires", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "suggests" } }, "name" : "RuntimeSuggests", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::Prereqs::Soften", "config" : { "Dist::Zilla::Plugin::Prereqs::Soften" : { "copy_to" : [ "develop.requires" ], "modules" : [ "Time::Moment", "DateTime::Format::RFC3339", "Data::Validate::Domain", "Email::Address::XS", "Net::IDN::Encode" ], "modules_from_features" : null, "to_relationship" : "suggests" } }, "name" : "Prereqs::Soften", "version" : "0.006003" }, { "class" : "Dist::Zilla::Plugin::Breaks", "name" : "Breaks", "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::Test::CheckBreaks", "config" : { "Dist::Zilla::Plugin::Test::CheckBreaks" : { "conflicts_module" : [], "no_forced_deps" : 0 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000038", "version" : "0.006" } }, "name" : "Test::CheckBreaks", "version" : "0.019" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.031" }, { "class" : "Dist::Zilla::Plugin::VerifyPhases", "name" : "@Author::ETHER/PHASE VERIFICATION", "version" : "0.016" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.031" } }, "x_authority" : "cpan:ETHER", "x_breaks" : { "JSON::Schema::Modern::Document::OpenAPI" : "< 0.055", "JSON::Schema::Modern::Vocabulary::OpenAPI" : "< 0.017" }, "x_generated_by_perl" : "v5.39.6", "x_serialization_backend" : "Cpanel::JSON::XS version 4.37", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later", "x_static_install" : 1, "x_use_unsafe_inc" : 0 } JSON-Schema-Modern-0.582/share/000770 000766 000024 00000000000 14553630022 016273 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/dist.ini000640 000766 000024 00000004047 14553630022 016641 0ustar00etherstaff000000 000000 name = JSON-Schema-Modern author = Karen Etheridge copyright_holder = Karen Etheridge copyright_year = 2020 license = Perl_5 ; ATTENTION DISTRO REPACKAGERS: do NOT use fresh copies of these files ; from their source; it is important to include the original versions ; of the files as they were packaged with this cpan distribution, or ; surprising behaviour may occur. [Run::BeforeRelease] eval = do './update-schemas'; die $@ || $! if $@ || $! [@Author::ETHER] :version = 0.154 bugtracker = github installer = ModuleBuildTiny Test::MinimumVersion.max_target_perl = 5.020 ; may go higher later on Git::GatherDir.exclude_filename = pull_request_template.md Test::ReportPrereqs.include[0] = JSON::PP Test::ReportPrereqs.include[1] = Cpanel::JSON::XS Test::ReportPrereqs.include[2] = JSON::XS Test::ReportPrereqs.include[3] = Mojolicious Test::ReportPrereqs.include[4] = Sereal::Encoder Test::ReportPrereqs.include[5] = Sereal::Decoder Test::ReportPrereqs.include[6] = Math::BigInt Test::ReportPrereqs.include[7] = Math::BigFloat -remove = Test::Pod::No404s ; some vocabulary class URIs now return 403 Forbidden [ShareDir] dir = share [Prereqs / RuntimeRequires] Mojolicious = 7.87 ; Mojo::JSON::JSON_XS Email::Address::XS = 1.04 ; softened later [Prereqs / RuntimeSuggests] Class::XSAccessor = 0 Type::Tiny::XS = 0 Ref::Util::XS = 0 Cpanel::JSON::XS = 0 [Prereqs::Soften] to_relationship = suggests copy_to = develop.requires module = Time::Moment ; required for format 'date-time', 'date', 'time' module = DateTime::Format::RFC3339 ; required for edge cases for format 'date-time' module = Data::Validate::Domain ; required for format 'hostname', 'idn-hostname' module = Email::Address::XS ; required for format 'email', 'idn-email' module = Net::IDN::Encode ; required for format 'idn-hostname' [Breaks] JSON::Schema::Modern::Vocabulary::OpenAPI = < 0.017 ; is_uri_reference JSON::Schema::Modern::Document::OpenAPI = < 0.055 ; $state->{depth} must now be defined [Test::CheckBreaks] JSON-Schema-Modern-0.582/share/LICENSE000640 000766 000024 00000026733 14553630022 017312 0ustar00etherstaff000000 000000 Copyright (c) 2022 JSON Schema Specification Authors Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: Licensed under the Academic Free License version 3.0 1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: a) to reproduce the Original Work in copies, either alone or as part of a collective work; b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor's reserved rights and remedies, in this Academic Free License; d) to perform the Original Work publicly; and e) to display the Original Work publicly. 2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. 3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. 5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). 6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. 7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. 8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. 9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). 10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. 11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. 12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. 13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. 14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For 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. 15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. 16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. JSON-Schema-Modern-0.582/share/draft2020-12/000770 000766 000024 00000000000 14553630022 020117 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/share/draft7/000770 000766 000024 00000000000 14553630022 017462 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/share/draft2019-09/000770 000766 000024 00000000000 14553630022 020135 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/share/draft2019-09/output/000770 000766 000024 00000000000 14553630022 021475 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/share/draft2019-09/meta/000770 000766 000024 00000000000 14553630022 021063 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/share/draft2019-09/schema.json000640 000766 000024 00000003371 14553630022 022273 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2019-09/schema", "$id": "https://json-schema.org/draft/2019-09/schema", "$vocabulary": { "https://json-schema.org/draft/2019-09/vocab/core": true, "https://json-schema.org/draft/2019-09/vocab/applicator": true, "https://json-schema.org/draft/2019-09/vocab/validation": true, "https://json-schema.org/draft/2019-09/vocab/meta-data": true, "https://json-schema.org/draft/2019-09/vocab/format": false, "https://json-schema.org/draft/2019-09/vocab/content": true }, "$recursiveAnchor": true, "title": "Core and Validation specifications meta-schema", "allOf": [ {"$ref": "meta/core"}, {"$ref": "meta/applicator"}, {"$ref": "meta/validation"}, {"$ref": "meta/meta-data"}, {"$ref": "meta/format"}, {"$ref": "meta/content"} ], "type": ["object", "boolean"], "properties": { "definitions": { "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", "type": "object", "additionalProperties": { "$recursiveRef": "#" }, "default": {} }, "dependencies": { "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", "type": "object", "additionalProperties": { "anyOf": [ { "$recursiveRef": "#" }, { "$ref": "meta/validation#/$defs/stringArray" } ] } } } } JSON-Schema-Modern-0.582/share/draft2019-09/meta/content.json000640 000766 000024 00000000645 14553630022 023434 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2019-09/schema", "$id": "https://json-schema.org/draft/2019-09/meta/content", "$recursiveAnchor": true, "title": "Content vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "contentMediaType": { "type": "string" }, "contentEncoding": { "type": "string" }, "contentSchema": { "$recursiveRef": "#" } } } JSON-Schema-Modern-0.582/share/draft2019-09/meta/applicator.json000640 000766 000024 00000003341 14553630022 024114 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2019-09/schema", "$id": "https://json-schema.org/draft/2019-09/meta/applicator", "$recursiveAnchor": true, "title": "Applicator vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "additionalItems": { "$recursiveRef": "#" }, "unevaluatedItems": { "$recursiveRef": "#" }, "items": { "anyOf": [ { "$recursiveRef": "#" }, { "$ref": "#/$defs/schemaArray" } ] }, "contains": { "$recursiveRef": "#" }, "additionalProperties": { "$recursiveRef": "#" }, "unevaluatedProperties": { "$recursiveRef": "#" }, "properties": { "type": "object", "additionalProperties": { "$recursiveRef": "#" }, "default": {} }, "patternProperties": { "type": "object", "additionalProperties": { "$recursiveRef": "#" }, "propertyNames": { "format": "regex" }, "default": {} }, "dependentSchemas": { "type": "object", "additionalProperties": { "$recursiveRef": "#" } }, "propertyNames": { "$recursiveRef": "#" }, "if": { "$recursiveRef": "#" }, "then": { "$recursiveRef": "#" }, "else": { "$recursiveRef": "#" }, "allOf": { "$ref": "#/$defs/schemaArray" }, "anyOf": { "$ref": "#/$defs/schemaArray" }, "oneOf": { "$ref": "#/$defs/schemaArray" }, "not": { "$recursiveRef": "#" } }, "$defs": { "schemaArray": { "type": "array", "minItems": 1, "items": { "$recursiveRef": "#" } } } } JSON-Schema-Modern-0.582/share/draft2019-09/meta/meta-data.json000640 000766 000024 00000001432 14553630022 023612 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2019-09/schema", "$id": "https://json-schema.org/draft/2019-09/meta/meta-data", "$recursiveAnchor": true, "title": "Meta-data vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "default": true, "deprecated": { "type": "boolean", "default": false }, "readOnly": { "type": "boolean", "default": false }, "writeOnly": { "type": "boolean", "default": false }, "examples": { "type": "array", "items": true } } } JSON-Schema-Modern-0.582/share/draft2019-09/meta/core.json000640 000766 000024 00000002636 14553630022 022714 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2019-09/schema", "$id": "https://json-schema.org/draft/2019-09/meta/core", "$recursiveAnchor": true, "title": "Core vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "$id": { "type": "string", "format": "uri-reference", "$comment": "Non-empty fragments not allowed.", "pattern": "^[^#]*#?$" }, "$schema": { "type": "string", "format": "uri" }, "$anchor": { "type": "string", "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$" }, "$ref": { "type": "string", "format": "uri-reference" }, "$recursiveRef": { "type": "string", "format": "uri-reference" }, "$recursiveAnchor": { "type": "boolean", "default": false }, "$vocabulary": { "type": "object", "propertyNames": { "type": "string", "format": "uri" }, "additionalProperties": { "type": "boolean" } }, "$comment": { "type": "string" }, "$defs": { "type": "object", "additionalProperties": { "$recursiveRef": "#" }, "default": {} } } } JSON-Schema-Modern-0.582/share/draft2019-09/meta/validation.json000640 000766 000024 00000005257 14553630022 024120 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2019-09/schema", "$id": "https://json-schema.org/draft/2019-09/meta/validation", "$recursiveAnchor": true, "title": "Validation vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "multipleOf": { "type": "number", "exclusiveMinimum": 0 }, "maximum": { "type": "number" }, "exclusiveMaximum": { "type": "number" }, "minimum": { "type": "number" }, "exclusiveMinimum": { "type": "number" }, "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, "pattern": { "type": "string", "format": "regex" }, "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, "uniqueItems": { "type": "boolean", "default": false }, "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, "minContains": { "$ref": "#/$defs/nonNegativeInteger", "default": 1 }, "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, "required": { "$ref": "#/$defs/stringArray" }, "dependentRequired": { "type": "object", "additionalProperties": { "$ref": "#/$defs/stringArray" } }, "const": true, "enum": { "type": "array", "items": true }, "type": { "anyOf": [ { "$ref": "#/$defs/simpleTypes" }, { "type": "array", "items": { "$ref": "#/$defs/simpleTypes" }, "minItems": 1, "uniqueItems": true } ] } }, "$defs": { "nonNegativeInteger": { "type": "integer", "minimum": 0 }, "nonNegativeIntegerDefault0": { "$ref": "#/$defs/nonNegativeInteger", "default": 0 }, "simpleTypes": { "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] }, "stringArray": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "default": [] } } } JSON-Schema-Modern-0.582/share/draft2019-09/meta/format.json000640 000766 000024 00000000464 14553630022 023251 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2019-09/schema", "$id": "https://json-schema.org/draft/2019-09/meta/format", "$recursiveAnchor": true, "title": "Format vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "format": { "type": "string" } } } JSON-Schema-Modern-0.582/share/draft2019-09/output/schema.json000640 000766 000024 00000004174 14553630022 023635 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2019-09/schema", "$id": "https://json-schema.org/draft/2019-09/output/schema", "description": "A schema that validates the minimum requirements for validation output", "oneOf": [ { "$ref": "#/$defs/flag" }, { "$ref": "#/$defs/basic" }, { "$ref": "#/$defs/detailed" }, { "$ref": "#/$defs/verbose" } ], "$defs": { "outputUnit":{ "properties": { "valid": { "type": "boolean" }, "keywordLocation": { "type": "string", "format": "uri-reference" }, "absoluteKeywordLocation": { "type": "string", "format": "uri" }, "instanceLocation": { "type": "string", "format": "uri-reference" }, "errors": { "$ref": "#/$defs/outputUnitArray" }, "annotations": { "$ref": "#/$defs/outputUnitArray" } }, "required": [ "valid", "keywordLocation", "instanceLocation" ], "allOf": [ { "if": { "properties": { "valid": { "const": false } } }, "then": { "required": [ "errors" ] } }, { "if": { "anyOf": [ { "properties": { "keywordLocation": { "pattern": "/\\$ref/" } } }, { "properties": { "keywordLocation": { "pattern": "/\\$recursiveRef/" } } } ] }, "then": { "required": [ "absoluteKeywordLocation" ] } } ] }, "outputUnitArray": { "type": "array", "items": { "$ref": "#/$defs/outputUnit" } }, "flag": { "properties": { "valid": { "type": "boolean" } }, "required": [ "valid" ] }, "basic": { "$ref": "#/$defs/outputUnit" }, "detailed": { "$ref": "#/$defs/outputUnit" }, "verbose": { "$ref": "#/$defs/outputUnit" } } } JSON-Schema-Modern-0.582/share/draft7/schema.json000640 000766 000024 00000011563 14553630022 021622 0ustar00etherstaff000000 000000 { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://json-schema.org/draft-07/schema#", "title": "Core schema meta-schema", "definitions": { "schemaArray": { "type": "array", "minItems": 1, "items": { "$ref": "#" } }, "nonNegativeInteger": { "type": "integer", "minimum": 0 }, "nonNegativeIntegerDefault0": { "allOf": [ { "$ref": "#/definitions/nonNegativeInteger" }, { "default": 0 } ] }, "simpleTypes": { "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] }, "stringArray": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "default": [] } }, "type": ["object", "boolean"], "properties": { "$id": { "type": "string", "format": "uri-reference" }, "$schema": { "type": "string", "format": "uri" }, "$ref": { "type": "string", "format": "uri-reference" }, "$comment": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "default": true, "readOnly": { "type": "boolean", "default": false }, "writeOnly": { "type": "boolean", "default": false }, "examples": { "type": "array", "items": true }, "multipleOf": { "type": "number", "exclusiveMinimum": 0 }, "maximum": { "type": "number" }, "exclusiveMaximum": { "type": "number" }, "minimum": { "type": "number" }, "exclusiveMinimum": { "type": "number" }, "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "pattern": { "type": "string", "format": "regex" }, "additionalItems": { "$ref": "#" }, "items": { "anyOf": [ { "$ref": "#" }, { "$ref": "#/definitions/schemaArray" } ], "default": true }, "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "uniqueItems": { "type": "boolean", "default": false }, "contains": { "$ref": "#" }, "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "required": { "$ref": "#/definitions/stringArray" }, "additionalProperties": { "$ref": "#" }, "definitions": { "type": "object", "additionalProperties": { "$ref": "#" }, "default": {} }, "properties": { "type": "object", "additionalProperties": { "$ref": "#" }, "default": {} }, "patternProperties": { "type": "object", "additionalProperties": { "$ref": "#" }, "propertyNames": { "format": "regex" }, "default": {} }, "dependencies": { "type": "object", "additionalProperties": { "anyOf": [ { "$ref": "#" }, { "$ref": "#/definitions/stringArray" } ] } }, "propertyNames": { "$ref": "#" }, "const": true, "enum": { "type": "array", "items": true, "minItems": 1, "uniqueItems": true }, "type": { "anyOf": [ { "$ref": "#/definitions/simpleTypes" }, { "type": "array", "items": { "$ref": "#/definitions/simpleTypes" }, "minItems": 1, "uniqueItems": true } ] }, "format": { "type": "string" }, "contentMediaType": { "type": "string" }, "contentEncoding": { "type": "string" }, "if": { "$ref": "#" }, "then": { "$ref": "#" }, "else": { "$ref": "#" }, "allOf": { "$ref": "#/definitions/schemaArray" }, "anyOf": { "$ref": "#/definitions/schemaArray" }, "oneOf": { "$ref": "#/definitions/schemaArray" }, "not": { "$ref": "#" } }, "default": true } JSON-Schema-Modern-0.582/share/draft2020-12/output/000770 000766 000024 00000000000 14553630022 021457 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/share/draft2020-12/meta/000770 000766 000024 00000000000 14553630022 021045 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/share/draft2020-12/schema.json000640 000766 000024 00000004624 14553630022 022257 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/schema", "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true, "https://json-schema.org/draft/2020-12/vocab/applicator": true, "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, "https://json-schema.org/draft/2020-12/vocab/validation": true, "https://json-schema.org/draft/2020-12/vocab/meta-data": true, "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, "https://json-schema.org/draft/2020-12/vocab/content": true }, "$dynamicAnchor": "meta", "title": "Core and Validation specifications meta-schema", "allOf": [ {"$ref": "meta/core"}, {"$ref": "meta/applicator"}, {"$ref": "meta/unevaluated"}, {"$ref": "meta/validation"}, {"$ref": "meta/meta-data"}, {"$ref": "meta/format-annotation"}, {"$ref": "meta/content"} ], "type": ["object", "boolean"], "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.", "properties": { "definitions": { "$comment": "\"definitions\" has been replaced by \"$defs\".", "type": "object", "additionalProperties": { "$dynamicRef": "#meta" }, "deprecated": true, "default": {} }, "dependencies": { "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.", "type": "object", "additionalProperties": { "anyOf": [ { "$dynamicRef": "#meta" }, { "$ref": "meta/validation#/$defs/stringArray" } ] }, "deprecated": true, "default": {} }, "$recursiveAnchor": { "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".", "$ref": "meta/core#/$defs/anchorString", "deprecated": true }, "$recursiveRef": { "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".", "$ref": "meta/core#/$defs/uriReferenceString", "deprecated": true } } } JSON-Schema-Modern-0.582/share/draft2020-12/meta/content.json000640 000766 000024 00000000647 14553630022 023420 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/meta/content", "$dynamicAnchor": "meta", "title": "Content vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "contentEncoding": { "type": "string" }, "contentMediaType": { "type": "string" }, "contentSchema": { "$dynamicRef": "#meta" } } } JSON-Schema-Modern-0.582/share/draft2020-12/meta/unevaluated.json000640 000766 000024 00000000626 14553630022 024260 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated", "$dynamicAnchor": "meta", "title": "Unevaluated applicator vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "unevaluatedItems": { "$dynamicRef": "#meta" }, "unevaluatedProperties": { "$dynamicRef": "#meta" } } } JSON-Schema-Modern-0.582/share/draft2020-12/meta/format-annotation.json000640 000766 000024 00000000526 14553630022 025402 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation", "$dynamicAnchor": "meta", "title": "Format vocabulary meta-schema for annotation results", "type": ["object", "boolean"], "properties": { "format": { "type": "string" } } } JSON-Schema-Modern-0.582/share/draft2020-12/meta/format-assertion.json000640 000766 000024 00000000524 14553630022 025235 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/meta/format-assertion", "$dynamicAnchor": "meta", "title": "Format vocabulary meta-schema for assertion results", "type": ["object", "boolean"], "properties": { "format": { "type": "string" } } } JSON-Schema-Modern-0.582/share/draft2020-12/meta/applicator.json000640 000766 000024 00000003030 14553630022 024071 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/meta/applicator", "$dynamicAnchor": "meta", "title": "Applicator vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "prefixItems": { "$ref": "#/$defs/schemaArray" }, "items": { "$dynamicRef": "#meta" }, "contains": { "$dynamicRef": "#meta" }, "additionalProperties": { "$dynamicRef": "#meta" }, "properties": { "type": "object", "additionalProperties": { "$dynamicRef": "#meta" }, "default": {} }, "patternProperties": { "type": "object", "additionalProperties": { "$dynamicRef": "#meta" }, "propertyNames": { "format": "regex" }, "default": {} }, "dependentSchemas": { "type": "object", "additionalProperties": { "$dynamicRef": "#meta" }, "default": {} }, "propertyNames": { "$dynamicRef": "#meta" }, "if": { "$dynamicRef": "#meta" }, "then": { "$dynamicRef": "#meta" }, "else": { "$dynamicRef": "#meta" }, "allOf": { "$ref": "#/$defs/schemaArray" }, "anyOf": { "$ref": "#/$defs/schemaArray" }, "oneOf": { "$ref": "#/$defs/schemaArray" }, "not": { "$dynamicRef": "#meta" } }, "$defs": { "schemaArray": { "type": "array", "minItems": 1, "items": { "$dynamicRef": "#meta" } } } } JSON-Schema-Modern-0.582/share/draft2020-12/meta/meta-data.json000640 000766 000024 00000001432 14553630022 023574 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/meta/meta-data", "$dynamicAnchor": "meta", "title": "Meta-data vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "default": true, "deprecated": { "type": "boolean", "default": false }, "readOnly": { "type": "boolean", "default": false }, "writeOnly": { "type": "boolean", "default": false }, "examples": { "type": "array", "items": true } } } JSON-Schema-Modern-0.582/share/draft2020-12/meta/core.json000640 000766 000024 00000002677 14553630022 022703 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/meta/core", "$dynamicAnchor": "meta", "title": "Core vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "$id": { "$ref": "#/$defs/uriReferenceString", "$comment": "Non-empty fragments not allowed.", "pattern": "^[^#]*#?$" }, "$schema": { "$ref": "#/$defs/uriString" }, "$ref": { "$ref": "#/$defs/uriReferenceString" }, "$anchor": { "$ref": "#/$defs/anchorString" }, "$dynamicRef": { "$ref": "#/$defs/uriReferenceString" }, "$dynamicAnchor": { "$ref": "#/$defs/anchorString" }, "$vocabulary": { "type": "object", "propertyNames": { "$ref": "#/$defs/uriString" }, "additionalProperties": { "type": "boolean" } }, "$comment": { "type": "string" }, "$defs": { "type": "object", "additionalProperties": { "$dynamicRef": "#meta" } } }, "$defs": { "anchorString": { "type": "string", "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" }, "uriString": { "type": "string", "format": "uri" }, "uriReferenceString": { "type": "string", "format": "uri-reference" } } } JSON-Schema-Modern-0.582/share/draft2020-12/meta/validation.json000640 000766 000024 00000005257 14553630022 024102 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/meta/validation", "$dynamicAnchor": "meta", "title": "Validation vocabulary meta-schema", "type": ["object", "boolean"], "properties": { "type": { "anyOf": [ { "$ref": "#/$defs/simpleTypes" }, { "type": "array", "items": { "$ref": "#/$defs/simpleTypes" }, "minItems": 1, "uniqueItems": true } ] }, "const": true, "enum": { "type": "array", "items": true }, "multipleOf": { "type": "number", "exclusiveMinimum": 0 }, "maximum": { "type": "number" }, "exclusiveMaximum": { "type": "number" }, "minimum": { "type": "number" }, "exclusiveMinimum": { "type": "number" }, "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, "pattern": { "type": "string", "format": "regex" }, "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, "uniqueItems": { "type": "boolean", "default": false }, "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, "minContains": { "$ref": "#/$defs/nonNegativeInteger", "default": 1 }, "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, "required": { "$ref": "#/$defs/stringArray" }, "dependentRequired": { "type": "object", "additionalProperties": { "$ref": "#/$defs/stringArray" } } }, "$defs": { "nonNegativeInteger": { "type": "integer", "minimum": 0 }, "nonNegativeIntegerDefault0": { "$ref": "#/$defs/nonNegativeInteger", "default": 0 }, "simpleTypes": { "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] }, "stringArray": { "type": "array", "items": { "type": "string" }, "uniqueItems": true, "default": [] } } } JSON-Schema-Modern-0.582/share/draft2020-12/output/schema.json000640 000766 000024 00000004503 14553630022 023613 0ustar00etherstaff000000 000000 { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://json-schema.org/draft/2020-12/output/schema", "description": "A schema that validates the minimum requirements for validation output", "anyOf": [ { "$ref": "#/$defs/flag" }, { "$ref": "#/$defs/basic" }, { "$ref": "#/$defs/detailed" }, { "$ref": "#/$defs/verbose" } ], "$defs": { "outputUnit":{ "properties": { "valid": { "type": "boolean" }, "keywordLocation": { "type": "string", "format": "json-pointer" }, "absoluteKeywordLocation": { "type": "string", "format": "uri" }, "instanceLocation": { "type": "string", "format": "json-pointer" }, "error": { "type": "string" }, "errors": { "$ref": "#/$defs/outputUnitArray" }, "annotations": { "$ref": "#/$defs/outputUnitArray" } }, "required": [ "valid", "keywordLocation", "instanceLocation" ], "allOf": [ { "if": { "properties": { "valid": { "const": false } } }, "then": { "anyOf": [ { "required": [ "error" ] }, { "required": [ "errors" ] } ] } }, { "if": { "anyOf": [ { "properties": { "keywordLocation": { "pattern": "/\\$ref/" } } }, { "properties": { "keywordLocation": { "pattern": "/\\$dynamicRef/" } } } ] }, "then": { "required": [ "absoluteKeywordLocation" ] } } ] }, "outputUnitArray": { "type": "array", "items": { "$ref": "#/$defs/outputUnit" } }, "flag": { "properties": { "valid": { "type": "boolean" } }, "required": [ "valid" ] }, "basic": { "$ref": "#/$defs/outputUnit" }, "detailed": { "$ref": "#/$defs/outputUnit" }, "verbose": { "$ref": "#/$defs/outputUnit" } } } JSON-Schema-Modern-0.582/lib/JSON/000770 000766 000024 00000000000 14553630022 016510 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/lib/JSON/Schema/000770 000766 000024 00000000000 14553630022 017710 5ustar00etherstaff000000 000000 JSON-Schema-Modern-0.582/lib/JSON/Schema/Modern.pm000640 000766 000024 00000210626 14553630022 021500 0ustar00etherstaff000000 000000 use strict; use warnings; package JSON::Schema::Modern; # git description: v0.581-7-g6f026737 # vim: set ts=8 sts=2 sw=2 tw=100 et : # ABSTRACT: Validate data against a schema # KEYWORDS: JSON Schema validator data validation structure specification our $VERSION = '0.582'; use 5.020; # for fc, unicode_strings features use Moo; use strictures 2; use stable 0.031 'postderef'; use experimental 'signatures'; use if "$]" >= 5.022, experimental => 're_strict'; no if "$]" >= 5.031009, feature => 'indirect'; no if "$]" >= 5.033001, feature => 'multidimensional'; no if "$]" >= 5.033006, feature => 'bareword_filehandles'; use Mojo::JSON (); # for JSON_XS, MOJO_NO_JSON_XS environment variables use Carp qw(croak carp); use List::Util 1.55 qw(pairs first uniqint pairmap uniq any); use Ref::Util 0.100 qw(is_ref is_plain_hashref); use Scalar::Util 'refaddr'; use Mojo::URL; use Safe::Isa; use Path::Tiny; use Storable 'dclone'; use File::ShareDir 'dist_dir'; use Module::Runtime qw(use_module require_module); use MooX::TypeTiny 0.002002; use Types::Standard 1.016003 qw(Bool Int Str HasMethods Enum InstanceOf HashRef Dict CodeRef Optional Slurpy ArrayRef Undef ClassName Tuple Map); use Digest::MD5 'md5'; use Feature::Compat::Try; use JSON::Schema::Modern::Error; use JSON::Schema::Modern::Result; use JSON::Schema::Modern::Document; use JSON::Schema::Modern::Utilities qw(get_type canonical_uri E abort annotate_self jsonp is_type assert_uri); use namespace::clean; our @CARP_NOT = qw( JSON::Schema::Modern::Document JSON::Schema::Modern::Vocabulary JSON::Schema::Modern::Vocabulary::Applicator OpenAPI::Modern ); use constant SPECIFICATION_VERSION_DEFAULT => 'draft2020-12'; use constant SPECIFICATION_VERSIONS_SUPPORTED => [qw(draft7 draft2019-09 draft2020-12)]; has specification_version => ( is => 'ro', isa => Enum(SPECIFICATION_VERSIONS_SUPPORTED), coerce => sub { return $_[0] if any { $_[0] eq $_ } SPECIFICATION_VERSIONS_SUPPORTED->@*; my $real = 'draft'.($_[0]//''); (any { $real eq $_ } SPECIFICATION_VERSIONS_SUPPORTED->@*) ? $real : $_[0]; }, ); has output_format => ( is => 'ro', isa => Enum(JSON::Schema::Modern::Result->OUTPUT_FORMATS), default => 'basic', ); has short_circuit => ( is => 'ro', isa => Bool, lazy => 1, default => sub { $_[0]->output_format eq 'flag' && !$_[0]->collect_annotations }, ); has max_traversal_depth => ( is => 'ro', isa => Int, default => 50, ); has validate_formats => ( is => 'ro', isa => Bool, lazy => 1, # as specified by https://json-schema.org/draft//schema#/$vocabulary default => sub { ($_[0]->specification_version//SPECIFICATION_VERSION_DEFAULT) eq 'draft7' ? 1 : 0 }, ); has validate_content_schemas => ( is => 'ro', isa => Bool, lazy => 1, # defaults to false in latest versions, as specified by # https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.8.2 default => sub { ($_[0]->specification_version//'') eq 'draft7' }, ); has [qw(collect_annotations scalarref_booleans stringy_numbers strict)] => ( is => 'ro', isa => Bool, ); my $core_types = Enum[qw(null object array boolean string number)]; my @core_formats = qw(date-time date time duration email idn-email hostname idn-hostname ipv4 ipv6 uri uri-reference iri iri-reference uuid uri-template json-pointer relative-json-pointer regex); # { $format_name => { type => ..., sub => ... }, ... } has _format_validations => ( is => 'bare', isa => my $format_type = HashRef[Dict[ type => $core_types|ArrayRef[$core_types], sub => CodeRef, ]], init_arg => 'format_validations', lazy => 1, default => sub { {} }, ); sub _get_format_validation ($self, $format) { $self->{_format_validations}{$format} } sub add_format_validation ($self, $format, $definition) { $definition = { type => 'string', sub => $definition } if not is_plain_hashref($definition); $format_type->({ $format => $definition }); # all core formats are of type string (so far); changing type of custom format is permitted croak "Type for override of format $format does not match original type" if any { $format eq $_ } @core_formats and $definition->{type} ne 'string'; $self->{_format_validations}{$format} = $definition; } around BUILDARGS => sub ($orig, $class, @args) { my $args = $class->$orig(@args); croak 'output_format: strict_basic can only be used with specification_version: draft2019-09' if ($args->{output_format}//'') eq 'strict_basic' and ($args->{specification_version}//'') ne 'draft2019-09'; croak 'collect_annotations cannot be used with specification_version draft7' if $args->{collect_annotations} and ($args->{specification_version}//'') eq 'draft7'; $args->{format_validations} = +{ map +($_->[0] => is_plain_hashref($_->[1]) ? $_->[1] : +{ type => 'string', sub => $_->[1] }), pairs $args->{format_validations}->%* } if $args->{format_validations}; return $args; }; sub add_schema { croak 'insufficient arguments' if @_ < 2; my $self = shift; # TODO: resolve $uri against $self->base_uri my $uri = !is_ref($_[0]) ? Mojo::URL->new(shift) : $_[0]->$_isa('Mojo::URL') ? shift : Mojo::URL->new; croak 'cannot add a schema with a uri with a fragment' if defined $uri->fragment; if (not @_) { my $schema_info = $self->_fetch_from_uri($uri); return if not $schema_info or not defined wantarray; return $schema_info->{document}; } # document BUILD will trigger $self->traverse($schema) my $document = $_[0]->$_isa('JSON::Schema::Modern::Document') ? shift : JSON::Schema::Modern::Document->new( schema => shift, $uri ? (canonical_uri => $uri) : (), evaluator => $self, # used mainly for traversal during document construction ); if ($document->has_errors) { my $result = JSON::Schema::Modern::Result->new( output_format => $self->output_format, valid => 0, errors => [ $document->errors ], exception => 1, ); die $result; } if (not grep refaddr($_->{document}) == refaddr($document), $self->_canonical_resources) { my $schema_checksum = $document->_checksum // $document->_checksum(md5($self->_json_decoder->encode($document->schema))); if (my $existing_doc = first { my $existing_checksum = $_->_checksum // $_->_checksum(md5($self->_json_decoder->encode($_->schema))); $existing_checksum eq $schema_checksum } uniqint map $_->{document}, $self->_canonical_resources) { # we already have this schema content in another document object. $document = $existing_doc; } else { $self->_add_resources(map +($_->[0] => +{ $_->[1]->%*, document => $document }), $document->resource_pairs); } } if ("$uri") { my $resource = $document->_get_resource($document->canonical_uri); $self->_add_resources($uri => { path => '', canonical_uri => $document->canonical_uri, specification_version => $resource->{specification_version}, vocabularies => $resource->{vocabularies}, # reference, not copy document => $document, configs => $resource->{configs}, }); } return $document; } sub evaluate_json_string ($self, $json_data, $schema, $config_override = {}) { croak 'evaluate_json_string called in void context' if not defined wantarray; my $data; try { $data = $self->_json_decoder->decode($json_data) } catch ($e) { return JSON::Schema::Modern::Result->new( output_format => $self->output_format, valid => 0, exception => 1, errors => [ JSON::Schema::Modern::Error->new( depth => 0, keyword => undef, instance_location => '', keyword_location => '', error => $e, ) ], ); } return $self->evaluate($data, $schema, $config_override); } # this is called whenever we need to walk a document for something. # for now it is just called when a ::Document object is created, to verify the integrity of the # schema structure, to identify the metaschema (via the $schema keyword), and to extract all # embedded resources via $id and $anchor keywords within. # Returns the internal $state object accumulated during the traversal. sub traverse ($self, $schema_reference, $config_override = {}) { # Note: the starting position is not guaranteed to be at the root of the $document. my $initial_uri = Mojo::URL->new($config_override->{initial_schema_uri} // ''); my $initial_path = $config_override->{traversed_schema_path} // ''; my $spec_version = $self->specification_version//SPECIFICATION_VERSION_DEFAULT; my $state = { depth => 0, data_path => '', # this never changes since we don't have an instance yet initial_schema_uri => $initial_uri, # the canonical URI as of the start of this method or last $id traversed_schema_path => $initial_path, # the accumulated traversal path as of the start or last $id schema_path => '', # the rest of the path, since the start of this method or last $id effective_base_uri => Mojo::URL->new(''), errors => [], identifiers => [], subschemas => [], configs => {}, callbacks => $config_override->{callbacks} // {}, evaluator => $self, traverse => 1, }; try { my $for_canonical_uri = Mojo::URL->new( (is_plain_hashref($schema_reference) && exists $schema_reference->{'$id'} ? Mojo::URL->new($schema_reference->{'$id'}) : undef) // $state->{initial_schema_uri}); $for_canonical_uri->fragment(undef) if not length $for_canonical_uri->fragment; # a subsequent "$schema" keyword can still change these values $state->@{qw(spec_version vocabularies)} = $self->_get_metaschema_info( $config_override->{metaschema_uri} // $self->METASCHEMA_URIS->{$spec_version}, $for_canonical_uri, ); } catch ($e) { if ($e->$_isa('JSON::Schema::Modern::Result')) { push $state->{errors}->@*, $e->errors; } elsif ($e->$_isa('JSON::Schema::Modern::Error')) { push $state->{errors}->@*, $e; } else { ()= E({ %$state, exception => 1 }, 'EXCEPTION: '.$e); } return $state; } try { $self->_traverse_subschema($schema_reference, $state); } catch ($e) { if ($e->$_isa('JSON::Schema::Modern::Error')) { # note: we should never be here, since traversal subs are no longer be fatal push $state->{errors}->@*, $e; } else { E({ %$state, exception => 1 }, 'EXCEPTION: '.$e); } } delete $state->{traverse}; return $state; } # the actual runtime evaluation of the schema against input data. sub evaluate ($self, $data, $schema_reference, $config_override = {}) { croak 'evaluate called in void context' if not defined wantarray; my $initial_path = $config_override->{traversed_schema_path} // ''; my $effective_base_uri = Mojo::URL->new($config_override->{effective_base_uri}//''); my $state = { data_path => $config_override->{data_path} // '', traversed_schema_path => $initial_path, # the accumulated path as of the start of evaluation or last $id or $ref initial_schema_uri => Mojo::URL->new, # the canonical URI as of the start of evaluation or last $id or $ref schema_path => '', # the rest of the path, since the start of evaluation or last $id or $ref effective_base_uri => $effective_base_uri, # resolve locations against this for errors and annotations errors => [], depth => 0, }; exists $config_override->{$_} and die $_.' not supported as a config override' foreach qw(output_format specification_version); my $valid; try { my $schema_info; if (not is_ref($schema_reference) or $schema_reference->$_isa('Mojo::URL')) { $schema_info = $self->_fetch_from_uri($schema_reference); $state->{initial_schema_uri} = Mojo::URL->new($config_override->{initial_schema_uri} // ''); } else { # traverse is called via add_schema -> ::Document->new -> ::Document->BUILD my $document = $self->add_schema('', $schema_reference); my $base_resource = $document->_get_resource($document->canonical_uri) || croak "couldn't get resource: document parse error"; $schema_info = { schema => $document->schema, document => $document, document_path => '', $base_resource->%{qw(canonical_uri specification_version vocabularies configs)}, }; } abort($state, 'EXCEPTION: unable to find resource %s', $schema_reference) if not $schema_info; abort($state, 'EXCEPTION: %s is not a schema', $schema_reference) if not $schema_info->{document}->get_entity_at_location($schema_info->{document_path}); $state = +{ %$state, initial_schema_uri => $schema_info->{canonical_uri}, # the canonical URI as of the start of evaluation, or last $id or $ref document => $schema_info->{document}, # the ::Document object containing this schema document_path => $schema_info->{document_path}, # the path within the document of this schema, as of the start of evaluation, or last $id or $ref dynamic_scope => [ $schema_info->{canonical_uri} ], annotations => [], seen => {}, spec_version => $schema_info->{specification_version}, vocabularies => $schema_info->{vocabularies}, callbacks => $config_override->{callbacks} // {}, evaluator => $self, $schema_info->{configs}->%*, (map { my $val = $config_override->{$_} // $self->$_; defined $val ? ( $_ => $val ) : () } qw(validate_formats validate_content_schemas short_circuit collect_annotations scalarref_booleans stringy_numbers strict)), }; # we're going to set collect_annotations during evaluation when we see an unevaluated* keyword, # but after we pass to a new data scope we'll clear it again.. unless we've got the config set # globally for the entire evaluation, so we store that value in a high bit. $state->{collect_annotations} = ($state->{collect_annotations}//0) << 8; $valid = $self->_eval_subschema($data, $schema_info->{schema}, $state); warn 'result is false but there are no errors' if not $valid and not $state->{errors}->@*; } catch ($e) { if ($e->$_isa('JSON::Schema::Modern::Result')) { return $e; } elsif ($e->$_isa('JSON::Schema::Modern::Error')) { push $state->{errors}->@*, $e; } else { $valid = E({ %$state, exception => 1 }, 'EXCEPTION: '.$e); } } die 'evaluate validity inconsistent with error count' if $valid xor !$state->{errors}->@*; return JSON::Schema::Modern::Result->new( output_format => $self->output_format, valid => $valid, $valid # strip annotations from result if user didn't explicitly ask for them ? ($config_override->{collect_annotations} // $self->collect_annotations ? (annotations => $state->{annotations}) : ()) : (errors => $state->{errors}), ); } sub validate_schema ($self, $schema, $config_override = {}) { croak 'validate_schema called in void context' if not defined wantarray; my $metaschema_uri = is_plain_hashref($schema) && $schema->{'$schema'} ? $schema->{'$schema'} : $self->METASCHEMA_URIS->{$self->specification_version // $self->SPECIFICATION_VERSION_DEFAULT}; return $self->evaluate($schema, $metaschema_uri, $config_override); } sub get ($self, $uri_reference) { my $schema_info = $self->_fetch_from_uri($uri_reference); return if not $schema_info; my $subschema = is_ref($schema_info->{schema}) ? dclone($schema_info->{schema}) : $schema_info->{schema}; return wantarray ? ($subschema, $schema_info->{canonical_uri}) : $subschema; } sub get_document ($self, $uri_reference) { my $schema_info = $self->_fetch_from_uri($uri_reference); return if not $schema_info; return $schema_info->{document}; } # defined lower down: # sub add_vocabulary { ... } # sub add_encoding { ... } # sub add_media_type { ... } ######## NO PUBLIC INTERFACES FOLLOW THIS POINT ######## # current spec version => { keyword => undef, or arrayref of alternatives } my %removed_keywords = ( 'draft7' => { id => [ '$id' ], }, 'draft2019-09' => { id => [ '$id' ], definitions => [ '$defs' ], dependencies => [ qw(dependentSchemas dependentRequired) ], }, 'draft2020-12' => { id => [ '$id' ], definitions => [ '$defs' ], dependencies => [ qw(dependentSchemas dependentRequired) ], '$recursiveAnchor' => [ '$dynamicAnchor' ], '$recursiveRef' => [ '$dynamicRef' ], additionalItems => [ 'items' ], }, ); # { # $spec_version => { # $vocabulary_class => { # traverse => [ [ $keyword => $subref ], [ ... ] ], # evaluate => [ [ $keyword => $subref ], [ ... ] ], # } # } # } # If we could serialize coderefs, this could be an object attribute; # otherwise, we might as well persist this for the lifetime of the process. our $vocabulary_cache = {}; sub _traverse_subschema ($self, $schema, $state) { delete $state->{keyword}; return E($state, 'EXCEPTION: maximum traversal depth (%d) exceeded', $self->max_traversal_depth) if $state->{depth}++ > $self->max_traversal_depth; push $state->{subschemas}->@*, $state->{traversed_schema_path}.$state->{schema_path}; my $schema_type = get_type($schema); return 1 if $schema_type eq 'boolean'; return E($state, 'invalid schema type: %s', $schema_type) if $schema_type ne 'object'; return 1 if not keys %$schema; my $valid = 1; my %unknown_keywords = map +($_ => undef), keys %$schema; # First, we must determine the dialect to use. This is given to us in metaschema_uri # and can also be indicated with the '$schema' keyword. We need to do this now, before iterating # over vocabulary classes and keywords, because these can change depending on the dialect. if (exists $schema->{'$schema'}) { return if not $self->_parse_keyword_schema($state, $schema->{'$schema'}); # This is a bit of a chicken-and-egg situation. If we start off at draft2020-12, then all # keywords are valid, so we inspect and process the $schema keyword; this switches us to draft7 # but now only the $ref keyword is respected and everything else should be ignored, so the # $schema keyword never happened, so now we're back to draft2020-12 again, and...?! # The only winning move is not to play. return E($state, '$schema and $ref cannot be used together in older drafts') if exists $schema->{'$ref'} and $state->{spec_version} eq 'draft7'; } ALL_KEYWORDS: foreach my $vocabulary ($state->{vocabularies}->@*) { # [ [ $keyword => $subref ], [ ... ] ] my $keyword_list = $vocabulary_cache->{$state->{spec_version}}{$vocabulary}{traverse} //= [ map [ $_ => $vocabulary->can('_traverse_keyword_'.($_ =~ s/^\$//r)) ], $vocabulary->keywords($state->{spec_version}) ]; foreach my $keyword_tuple ($keyword_list->@*) { my ($keyword, $sub) = $keyword_tuple->@*; next if not exists $schema->{$keyword}; # keywords adjacent to $ref are not evaluated before draft2019-09 next if $keyword ne '$ref' and exists $schema->{'$ref'} and $state->{spec_version} eq 'draft7'; delete $unknown_keywords{$keyword}; $state->{keyword} = $keyword; if (not $sub->($vocabulary, $schema, $state)) { die 'traverse result is false but there are no errors (keyword: '.$keyword.')' if not $state->{errors}->@*; $valid = 0; next; } if (my $callback = $state->{callbacks}{$keyword}) { if (not $callback->($schema, $state)) { die 'callback result is false but there are no errors (keyword: '.$keyword.')' if not $state->{errors}->@*; $valid = 0; next; } } } } delete $state->{keyword}; if ($self->strict and keys %unknown_keywords) { ()= E($state, 'unknown keyword%s found: %s', keys %unknown_keywords > 1 ? 's' : '', join(', ', sort keys %unknown_keywords)); } # check for previously-supported but now removed keywords foreach my $keyword (sort keys $removed_keywords{$state->{spec_version}}->%*) { next if not exists $schema->{$keyword}; my $message ='no-longer-supported "'.$keyword.'" keyword present (at location "' .canonical_uri($state).'")'; if (my $alternates = $removed_keywords{$state->{spec_version}}->{$keyword}) { my @list = map '"'.$_.'"', @$alternates; @list = ((map $_.',', @list[0..$#list-1]), $list[-1]) if @list > 2; splice(@list, -1, 0, 'or') if @list > 1; $message .= ': this should be rewritten as '.join(' ', @list); } carp $message; } return $valid; } sub _eval_subschema ($self, $data, $schema, $state) { croak '_eval_subschema called in void context' if not defined wantarray; # callers created a new $state for us, so we do not propagate upwards changes to depth, traversed # paths; but annotations, errors are arrayrefs so their contents will be shared $state->{dynamic_scope} = [ ($state->{dynamic_scope}//[])->@* ]; delete $state->@{'keyword', grep /^_/, keys %$state}; abort($state, 'EXCEPTION: maximum evaluation depth (%d) exceeded', $self->max_traversal_depth) if $state->{depth}++ > $self->max_traversal_depth; my $schema_type = get_type($schema); return $schema || E($state, 'subschema is false') if $schema_type eq 'boolean'; # this should never happen, due to checks in traverse abort($state, 'invalid schema type: %s', $schema_type) if $schema_type ne 'object'; return 1 if not keys %$schema; # find all schema locations in effect at this data path + canonical_uri combination # if any of them are absolute prefix of this schema location, we are in a loop. my $canonical_uri = canonical_uri($state); my $schema_location = $state->{traversed_schema_path}.$state->{schema_path}; abort($state, 'EXCEPTION: infinite loop detected (same location evaluated twice)') if grep substr($schema_location, 0, length) eq $_, keys $state->{seen}{$state->{data_path}}{$canonical_uri}->%*; $state->{seen}{$state->{data_path}}{$canonical_uri}{$schema_location}++; my $valid = 1; my %unknown_keywords = map +($_ => undef), keys %$schema; # set aside annotations collected so far; they are not used in the current scope's evaluation my $parent_annotations = $state->{annotations}; $state->{annotations} = []; # in order to collect annotations from applicator keywords only when needed, we twiddle the low # bit if we see a local unevaluated* keyword, and clear it again as we move on to a new data path. $state->{collect_annotations} |= 0+(exists $schema->{unevaluatedItems} || exists $schema->{unevaluatedProperties}); # in order to collect annotations for unevaluated* keywords, we sometimes need to ignore the # suggestion to short_circuit evaluation at this scope (but lower scopes are still fine) $state->{short_circuit} = ($state->{short_circuit} || delete($state->{short_circuit_suggested})) && !exists($schema->{unevaluatedItems}) && !exists($schema->{unevaluatedProperties}); ALL_KEYWORDS: foreach my $vocabulary ($state->{vocabularies}->@*) { # [ [ $keyword => $subref|undef ], [ ... ] ] my $keyword_list = $vocabulary_cache->{$state->{spec_version}}{$vocabulary}{evaluate} //= [ map [ $_ => $vocabulary->can('_eval_keyword_'.($_ =~ s/^\$//r)) ], $vocabulary->keywords($state->{spec_version}) ]; foreach my $keyword_tuple ($keyword_list->@*) { my ($keyword, $sub) = $keyword_tuple->@*; next if not exists $schema->{$keyword}; # keywords adjacent to $ref are not evaluated before draft2019-09 next if $keyword ne '$ref' and exists $schema->{'$ref'} and $state->{spec_version} eq 'draft7'; delete $unknown_keywords{$keyword}; $state->{keyword} = $keyword; if ($sub) { my $error_count = $state->{errors}->@*; if (not $sub->($vocabulary, $data, $schema, $state)) { warn 'evaluation result is false but there are no errors (keyword: '.$keyword.')' if $error_count == $state->{errors}->@*; $valid = 0; last ALL_KEYWORDS if $state->{short_circuit}; next; } } if (my $callback = $state->{callbacks}{$keyword}) { my $error_count = $state->{errors}->@*; if (not $callback->($data, $schema, $state)) { warn 'callback result is false but there are no errors (keyword: '.$keyword.')' if $error_count == $state->{errors}->@*; $valid = 0; last ALL_KEYWORDS if $state->{short_circuit}; next; } } } } delete $state->{keyword}; if ($state->{strict} and keys %unknown_keywords) { abort($state, 'unknown keyword%s found: %s', keys %unknown_keywords > 1 ? 's' : '', join(', ', sort keys %unknown_keywords)); } if ($valid and $state->{collect_annotations} and $state->{spec_version} !~ qr/^draft(7|2019-09)$/) { annotate_self(+{ %$state, keyword => $_, _unknown => 1 }, $schema) foreach sort keys %unknown_keywords; } # only keep new annotations if schema is valid push $parent_annotations->@*, $state->{annotations}->@* if $valid; return $valid; } has _resource_index => ( is => 'bare', isa => HashRef[my $resource_type = Dict[ canonical_uri => InstanceOf['Mojo::URL'], path => Str, specification_version => my $spec_version_type = Enum(SPECIFICATION_VERSIONS_SUPPORTED), document => InstanceOf['JSON::Schema::Modern::Document'], # the vocabularies used when evaluating instance data against schema vocabularies => ArrayRef[my $vocabulary_class_type = ClassName->where(q{$_->DOES('JSON::Schema::Modern::Vocabulary')})], configs => HashRef, Slurpy[HashRef[Undef]], # no other fields allowed ]], lazy => 1, default => sub { {} }, ); sub _get_resource { $_[0]->{_resource_index}{$_[1]} } sub _add_resources { $_[0]->{_resource_index}{$_->[0]} = $resource_type->($_->[1]) foreach pairs @_[1..$#_]; } sub _add_resources_unsafe { $_[0]->{_resource_index}{$_->[0]} = $resource_type->($_->[1]) foreach pairs @_[1..$#_]; } sub _resource_index { $_[0]->{_resource_index}->%* } sub _canonical_resources { values $_[0]->{_resource_index}->%* } around _add_resources => sub { my ($orig, $self) = (shift, shift); my @resources; foreach my $pair (sort { $a->[0] cmp $b->[0] } pairs @_) { my ($key, $value) = @$pair; if (my $existing = $self->_get_resource($key)) { # we allow overwriting canonical_uri = '' to allow for ad hoc evaluation of schemas that # lack all identifiers altogether, but preserve other resources from the original document if ($key ne '') { next if $existing->{path} eq $value->{path} and $existing->{canonical_uri} eq $value->{canonical_uri} and $existing->{specification_version} eq $value->{specification_version} and refaddr($existing->{document}) == refaddr($value->{document}); croak 'uri "'.$key.'" conflicts with an existing schema resource'; } } elsif ($self->CACHED_METASCHEMAS->{$key}) { croak 'uri "'.$key.'" conflicts with an existing meta-schema resource'; } my $fragment = $value->{canonical_uri}->fragment; croak sprintf('canonical_uri cannot contain an empty fragment (%s)', $value->{canonical_uri}) if defined $fragment and $fragment eq ''; croak sprintf('canonical_uri cannot contain a plain-name fragment (%s)', $value->{canonical_uri}) if ($fragment // '') =~ m{^[^/]}; $self->$orig($key, $value); } }; # $vocabulary uri (not its $id!) => [ spec_version, class ] has _vocabulary_classes => ( is => 'bare', isa => HashRef[ my $vocabulary_type = Tuple[ $spec_version_type, $vocabulary_class_type, ] ], reader => '__vocabulary_classes', lazy => 1, default => sub { +{ map { my $class = $_; pairmap { $a => [ $b, $class ] } $class->vocabulary } map use_module('JSON::Schema::Modern::Vocabulary::'.$_), qw(Core Applicator Validation FormatAssertion FormatAnnotation Content MetaData Unevaluated) } }, ); sub _get_vocabulary_class { $_[0]->__vocabulary_classes->{$_[1]} } sub add_vocabulary ($self, $classname) { return if grep $_->[1] eq $classname, values $self->__vocabulary_classes->%*; $vocabulary_class_type->(use_module($classname)); # uri => version, uri => version foreach my $pair (pairs $classname->vocabulary) { my ($uri_string, $spec_version) = @$pair; Str->where(q{my $uri = Mojo::URL->new($_); $uri->is_abs && !defined $uri->fragment})->($uri_string); $spec_version_type->($spec_version); $self->{_vocabulary_classes}{$uri_string} = $vocabulary_type->([ $spec_version, $classname ]); } } # $schema uri => [ spec_version, [ vocab classes, in evaluation order ] ]. has _metaschema_vocabulary_classes => ( is => 'bare', isa => HashRef[ my $mvc_type = Tuple[ $spec_version_type, ArrayRef[$vocabulary_class_type], ] ], reader => '__metaschema_vocabulary_classes', lazy => 1, default => sub { my @modules = map use_module('JSON::Schema::Modern::Vocabulary::'.$_), qw(Core Validation FormatAnnotation Applicator Content MetaData Unevaluated); +{ 'https://json-schema.org/draft/2020-12/schema' => [ 'draft2020-12', [ @modules ] ], do { pop @modules; () }, 'https://json-schema.org/draft/2019-09/schema' => [ 'draft2019-09', \@modules ], 'http://json-schema.org/draft-07/schema' => [ 'draft7', \@modules ], }, }, ); sub _get_metaschema_vocabulary_classes { $_[0]->__metaschema_vocabulary_classes->{$_[1] =~ s/#$//r} } sub _set_metaschema_vocabulary_classes { $_[0]->__metaschema_vocabulary_classes->{$_[1] =~ s/#$//r} = $mvc_type->($_[2]) } sub __all_metaschema_vocabulary_classes { values $_[0]->__metaschema_vocabulary_classes->%* } # retrieves metaschema info either from cache or by parsing the schema for vocabularies # throws a JSON::Schema::Modern::Result on error sub _get_metaschema_info ($self, $metaschema_uri, $for_canonical_uri) { # check the cache. specification metaschemas are already populated. my $metaschema_info = $self->_get_metaschema_vocabulary_classes($metaschema_uri); return @$metaschema_info if $metaschema_info; # otherwise, fetch the metaschema and parse its $vocabulary keyword. # we do this by traversing a baby schema with just the $schema keyword. my $state = $self->traverse({ '$schema' => $metaschema_uri.'' }); die JSON::Schema::Modern::Result->new( output_format => $self->output_format, valid => JSON::PP::false, errors => [ map { my $e = $_; # absolute location is undef iff the location = '/$schema' my $absolute_location = $e->absolute_keyword_location // $for_canonical_uri; JSON::Schema::Modern::Error->new( depth => $e->depth, keyword => $e->keyword eq '$schema' ? '' : $e->keyword, instance_location => $e->instance_location, keyword_location => ($for_canonical_uri->fragment//'').($e->keyword_location =~ s{^/\$schema\b}{}r), length $absolute_location ? ( absolute_keyword_location => $absolute_location ) : (), error => $e->error, ) } $state->{errors}->@* ], exception => 1, ) if $state->{errors}->@*; return ($state->{spec_version}, $state->{vocabularies}); } # we can't do this work in the context of looping over vocabularies and keywords, because this # keyword changes which vocabularies and keywords we're going to use. Additionally we may need to # fetch and parse the referenced schema to discover what vocabularies it defines. sub _parse_keyword_schema ($self, $state, $metaschema_uri) { $state->{keyword} = '$schema'; return E($state, '$schema value is not a string') if not is_type('string', $metaschema_uri); return if not assert_uri($state, { '$schema' => $metaschema_uri }); my ($spec_version, $vocabularies); if (my $metaschema_info = $self->_get_metaschema_vocabulary_classes($metaschema_uri)) { ($spec_version, $vocabularies) = @$metaschema_info; } else { my $schema_info = $self->_fetch_from_uri($metaschema_uri); return E($state, 'EXCEPTION: unable to find resource %s', $metaschema_uri) if not $schema_info; # this cannot happen unless there are other entity types in the index return E($state, 'EXCEPTION: bad reference to $schema %s: not a schema', $schema_info->{canonical_uri}) if $schema_info->{document}->get_entity_at_location($schema_info->{document_path}) ne 'schema'; if (not is_plain_hashref($schema_info->{schema})) { ()= E($state, 'metaschemas must be objects'); } else { ($spec_version, $vocabularies) = $self->_fetch_vocabulary_data({ %$state, keyword => '$vocabulary', initial_schema_uri => Mojo::URL->new($metaschema_uri), traversed_schema_path => jsonp($state->{schema_path}, '$schema'), }, $schema_info); } } return E($state, '"%s" is not a valid metaschema', $metaschema_uri) if not $vocabularies or not @$vocabularies; $state->@{qw(spec_version vocabularies)} = ($spec_version, $vocabularies); return 1; } # translate vocabulary URIs into classes, caching the results (if any) sub _fetch_vocabulary_data ($self, $state, $schema_info) { if (not exists $schema_info->{schema}{'$vocabulary'}) { # "If "$vocabulary" is absent, an implementation MAY determine behavior based on the meta-schema # if it is recognized from the URI value of the referring schema's "$schema" keyword." my $metaschema_uri = $self->METASCHEMA_URIS->{$schema_info->{specification_version}}; return $self->_get_metaschema_vocabulary_classes($metaschema_uri)->@*; } my $valid = 1; $valid = E($state, '$vocabulary can only appear at the document root') if length $schema_info->{document_path}; $valid = E($state, 'metaschemas must have an $id') if not exists $schema_info->{schema}{'$id'}; return (undef, []) if not $valid; my @vocabulary_classes; foreach my $uri (sort keys $schema_info->{schema}{'$vocabulary'}->%*) { my $class_info = $self->_get_vocabulary_class($uri); $valid = E({ %$state, _schema_path_suffix => $uri }, '"%s" is not a known vocabulary', $uri), next if $schema_info->{schema}{'$vocabulary'}{$uri} and not $class_info; next if not $class_info; # vocabulary is not known, but marked as false in the metaschema my ($spec_version, $class) = @$class_info; $valid = E({ %$state, _schema_path_suffix => $uri }, '"%s" uses %s, but the metaschema itself uses %s', $uri, $spec_version, $schema_info->{specification_version}), next if $spec_version ne $schema_info->{specification_version}; push @vocabulary_classes, $class; } @vocabulary_classes = sort { $a->evaluation_order <=> $b->evaluation_order || ($a->evaluation_order == 999 ? 0 : ($valid = E($state, '%s and %s have a conflicting evaluation_order', sort $a, $b))) } @vocabulary_classes; $valid = E($state, 'the first vocabulary (by evaluation_order) must be Core') if ($vocabulary_classes[0]//'') ne 'JSON::Schema::Modern::Vocabulary::Core'; $self->_set_metaschema_vocabulary_classes($schema_info->{canonical_uri}, [ $schema_info->{specification_version}, \@vocabulary_classes ]) if $valid; return ($schema_info->{specification_version}, $valid ? \@vocabulary_classes : []); } # used for determining a default '$schema' keyword where there is none use constant METASCHEMA_URIS => { 'draft2020-12' => 'https://json-schema.org/draft/2020-12/schema', 'draft2019-09' => 'https://json-schema.org/draft/2019-09/schema', 'draft7' => 'http://json-schema.org/draft-07/schema#', }; use constant CACHED_METASCHEMAS => { 'https://json-schema.org/draft/2020-12/meta/applicator' => 'draft2020-12/meta/applicator.json', 'https://json-schema.org/draft/2020-12/meta/content' => 'draft2020-12/meta/content.json', 'https://json-schema.org/draft/2020-12/meta/core' => 'draft2020-12/meta/core.json', 'https://json-schema.org/draft/2020-12/meta/format-annotation' => 'draft2020-12/meta/format-annotation.json', 'https://json-schema.org/draft/2020-12/meta/format-assertion' => 'draft2020-12/meta/format-assertion.json', 'https://json-schema.org/draft/2020-12/meta/meta-data' => 'draft2020-12/meta/meta-data.json', 'https://json-schema.org/draft/2020-12/meta/unevaluated' => 'draft2020-12/meta/unevaluated.json', 'https://json-schema.org/draft/2020-12/meta/validation' => 'draft2020-12/meta/validation.json', 'https://json-schema.org/draft/2020-12/output/schema' => 'draft2020-12/output/schema.json', 'https://json-schema.org/draft/2020-12/schema' => 'draft2020-12/schema.json', 'https://json-schema.org/draft/2019-09/meta/applicator' => 'draft2019-09/meta/applicator.json', 'https://json-schema.org/draft/2019-09/meta/content' => 'draft2019-09/meta/content.json', 'https://json-schema.org/draft/2019-09/meta/core' => 'draft2019-09/meta/core.json', 'https://json-schema.org/draft/2019-09/meta/format' => 'draft2019-09/meta/format.json', 'https://json-schema.org/draft/2019-09/meta/meta-data' => 'draft2019-09/meta/meta-data.json', 'https://json-schema.org/draft/2019-09/meta/validation' => 'draft2019-09/meta/validation.json', 'https://json-schema.org/draft/2019-09/output/schema' => 'draft2019-09/output/schema.json', 'https://json-schema.org/draft/2019-09/schema' => 'draft2019-09/schema.json', # trailing # is omitted because we always cache documents by its canonical (fragmentless) URI 'http://json-schema.org/draft-07/schema' => 'draft7/schema.json', }; # returns the same as _get_resource sub _get_or_load_resource ($self, $uri) { my $resource = $self->_get_resource($uri); return $resource if $resource; if (my $local_filename = $self->CACHED_METASCHEMAS->{$uri}) { my $file = path(dist_dir('JSON-Schema-Modern'), $local_filename); my $schema = $self->_json_decoder->decode($file->slurp_raw); my $document = JSON::Schema::Modern::Document->new(schema => $schema, evaluator => $self); # this should be caught by the try/catch in evaluate() die JSON::Schema::Modern::Result->new( output_format => $self->output_format, valid => 0, errors => [ $document->errors ], exception => 1, ) if $document->has_errors; # we have already performed the appropriate collision checks, so we bypass them here $self->_add_resources_unsafe( map +($_->[0] => +{ $_->[1]->%*, document => $document }), $document->resource_pairs ); return $self->_get_resource($uri); } # TODO: # - load from network or disk return; }; # returns information necessary to use a schema found at a particular URI or uri-reference: # - a schema (which may not be at a document root) # - the canonical uri for that schema, # - the JSON::Schema::Modern::Document object that holds that schema # - the path relative to the document root for this schema # - the specification version that applies to this schema # - the vocabularies to use when considering schema keywords # - the config overrides to set when considering schema keywords # creates a Document and adds it to the resource index, if not already present. sub _fetch_from_uri ($self, $uri_reference) { $uri_reference = Mojo::URL->new($uri_reference) if not is_ref($uri_reference); my $fragment = $uri_reference->fragment; if (not length($fragment) or $fragment =~ m{^/}) { my $base = $uri_reference->clone->fragment(undef); if (my $resource = $self->_get_or_load_resource($base)) { my $subschema = $resource->{document}->get(my $document_path = $resource->{path}.($fragment//'')); return if not defined $subschema; my $document = $resource->{document}; my $closest_resource = first { !length($_->[1]{path}) # document root || length($document_path) && $document_path =~ m{^\Q$_->[1]{path}\E(?:/|\z)} } # path is above present location sort { length($b->[1]{path}) <=> length($a->[1]{path}) } # sort by length, descending grep { not length Mojo::URL->new($_->[0])->fragment } # omit anchors $document->resource_pairs; my $canonical_uri = $closest_resource->[1]{canonical_uri}->clone ->fragment(substr($document_path, length($closest_resource->[1]{path}))); $canonical_uri->fragment(undef) if not length($canonical_uri->fragment); return { schema => $subschema, canonical_uri => $canonical_uri, document => $document, document_path => $document_path, $resource->%{qw(specification_version vocabularies configs)}, # reference, not copy }; } } else { # we are following a URI with a plain-name fragment if (my $resource = $self->_get_resource($uri_reference)) { my $subschema = $resource->{document}->get($resource->{path}); return if not defined $subschema; return { schema => $subschema, canonical_uri => $resource->{canonical_uri}->clone, # this is *not* the anchor-containing URI document => $resource->{document}, document_path => $resource->{path}, $resource->%{qw(specification_version vocabularies configs)}, # reference, not copy }; } } } use constant _JSON_BACKEND => Mojo::JSON::JSON_XS ? 'Cpanel::JSON::XS' : 'JSON::PP'; # used for internal encoding as well (when caching serialized schemas) has _json_decoder => ( is => 'ro', isa => HasMethods[qw(encode decode)], lazy => 1, default => sub { _JSON_BACKEND->new->allow_nonref(1)->canonical(1)->utf8(1)->allow_bignum(1)->convert_blessed(1) }, ); # since media types are case-insensitive, all type names must be casefolded on insertion. has _media_type => ( is => 'bare', isa => my $media_type_type = Map[Str->where(q{$_ eq CORE::fc($_)}), CodeRef], reader => '__media_type', lazy => 1, default => sub ($self) { my $_json_media_type = sub ($content_ref) { # utf-8 decoding is always done, as per the JSON spec. # other charsets are not supported: see RFC8259 §11 \ _JSON_BACKEND->new->allow_nonref(1)->utf8(1)->decode($content_ref->$*); }; +{ (map +($_ => $_json_media_type), qw(application/json application/schema+json application/schema-instance+json)), (map +($_ => sub ($content_ref) { $content_ref }), qw(text/* application/octet-stream)), 'application/x-www-form-urlencoded' => sub ($content_ref) { \ Mojo::Parameters->new->charset('UTF-8')->parse($content_ref->$*)->to_hash; }, 'application/x-ndjson' => sub ($content_ref) { my $decoder = _JSON_BACKEND->new->allow_nonref(1)->utf8(1); my $line = 0; # line numbers start at 1 \[ map { do { try { ++$line; $decoder->decode($_) } catch ($e) { die 'parse error at line '.$line.': '.$e } } } split(/\r?\n/, $content_ref->$*) ]; }, }; }, ); sub add_media_type { $media_type_type->({ @_[1..2] }); $_[0]->__media_type->{$_[1]} = $_[2]; } # get_media_type('TExT/bloop') will fall through to matching an entry for 'text/*' or '*/*' sub get_media_type ($self, $type) { my $types = $self->__media_type; my $mt = $types->{fc $type}; return $mt if $mt; return $types->{(first { m{([^/]+)/\*$} && fc($type) =~ m{^\Q$1\E/[^/]+$} } keys %$types) // '*/*'}; }; has _encoding => ( is => 'bare', isa => HashRef[CodeRef], reader => '__encoding', lazy => 1, default => sub ($self) { +{ identity => sub ($content_ref) { $content_ref }, base64 => sub ($content_ref) { die "invalid characters\n" if $content_ref->$* =~ m{[^A-Za-z0-9+/=]} or $content_ref->$* =~ m{=(?=[^=])}; require MIME::Base64; \ MIME::Base64::decode_base64($content_ref->$*); }, base64url => sub ($content_ref) { die "invalid characters\n" if $content_ref->$* =~ m{[^A-Za-z0-9=_-]} or $content_ref->$* =~ m{=(?=[^=])}; require MIME::Base64; \ MIME::Base64::decode_base64url($content_ref->$*); }, }; }, ); sub get_encoding { $_[0]->__encoding->{$_[1]} } sub add_encoding { $_[0]->__encoding->{$_[1]} = CodeRef->($_[2]) } # callback hook for Sereal::Encoder sub FREEZE ($self, $serializer) { my $data = +{ %$self }; # Cpanel::JSON::XS doesn't serialize: https://github.com/Sereal/Sereal/issues/266 # coderefs can't serialize cleanly and must be re-added by the user. delete $data->@{qw(_json_decoder _format_validations _media_type _encoding)}; return $data; } # callback hook for Sereal::Decoder sub THAW ($class, $serializer, $data) { my $self = bless($data, $class); # load all vocabulary classes, both those used by loaded schemas, as well as all the core modules require_module($_) foreach uniq( (map $_->{vocabularies}->@*, $self->_canonical_resources), (map $_->[1], values $self->__vocabulary_classes->%*)); return $self; } 1; __END__ =pod =encoding UTF-8 =for stopwords schema subschema metaschema validator evaluator listref =head1 NAME JSON::Schema::Modern - Validate data against a schema =head1 VERSION version 0.582 =head1 SYNOPSIS use JSON::Schema::Modern; $js = JSON::Schema::Modern->new( specification_version => 'draft2020-12', output_format => 'flag', ... # other options ); $result = $js->evaluate($instance_data, $schema_data); =head1 DESCRIPTION This module aims to be a fully-compliant L evaluator and validator, targeting the currently-latest L version of the specification. =head1 CONFIGURATION OPTIONS These values are all passed as arguments to the constructor. =head2 specification_version Indicates which version of the JSON Schema specification is used during evaluation. When not set, this value is derived from the C<$schema> keyword in the schema used in evaluation, or defaults to the latest version (currently C). The use of this option is I encouraged to ensure continued correct operation of your schema. The current default value will not stay the same over time. May be one of: =over 4 =item * L or C<2020-12>|https://json-schema.org/specification-links.html#2020-12>, corresponding to metaschema C =item * L or C<2019-09>|https://json-schema.org/specification-links.html#2019-09-formerly-known-as-draft-8>, corresponding to metaschema C =item * L or C<7>|https://json-schema.org/specification-links.html#draft-7>, corresponding to metaschema C =back Note that you can also use a C<$schema> keyword in the schema itself, to specify a different metaschema or specification version. =head2 output_format One of: C, C, C, C, C, C. Defaults to C. C can only be used with C. Passed to L. =head2 short_circuit When true, evaluation will return early in any execution path as soon as the outcome can be determined, rather than continuing to find all errors or annotations. This option is safe to use in all circumstances, even in the presence of C and C keywords: the validation result will not change; only some errors will be omitted from the result. Defaults to true when C is C, and false otherwise. =head2 max_traversal_depth The maximum number of levels deep a schema traversal may go, before evaluation is halted. This is to protect against accidental infinite recursion, such as from two subschemas that each reference each other, or badly-written schemas that could be optimized. Defaults to 50. =head2 validate_formats When true, the C keyword will be treated as an assertion, not merely an annotation. Defaults to true when specification_version is draft7, and false for all other versions, but this may change in the future. Note that the use of a format that does not have a defined handler will B be interpreted as an error in this mode; instead, the undefined format will simply be ignored. If you instead want this to be treated as an evaluation error, you must define a custom schema dialect that uses the format-assertion vocabulary (available in specification version C) and reference it in your schema with the C<$schema> keyword. =head2 format_validations =for stopwords subref An optional hashref that allows overriding the validation method for formats, or adding new ones. Overrides to existing formats (see L) must be specified in the form of C<< { $format_name => $format_sub } >>, where the format sub is a subref that takes one argument and returns a boolean result. New formats must be specified in the form of C<< { $format_name => { type => $type, sub => $format_sub } } >>, where the type indicates which of the core JSON Schema types (null, object, array, boolean, string, number, or integer) the instance value must be for the format validation to be considered. =head2 validate_content_schemas When true, the C and C keywords are not treated as pure annotations: C (when present) is used to decode the applied data payload and then C will be used as the media-type for decoding to produce the data payload which is then applied to the schema in C for validation. (Note that treating these keywords as anything beyond simple annotations is contrary to the specification, therefore this option defaults to false.) See L and L for adding additional type support. =for stopwords shhh Technically only draft7 allows this and drafts 2019-09 and 2020-12 prohibit ever returning the subschema evaluation results together with their parent schema's results, so shhh. I'm trying to get this fixed for the next draft. =head2 collect_annotations When true, annotations are collected from keywords that produce them, when validation succeeds. These annotations are available in the returned result (see L). Not operational when L is C. Defaults to false. =head2 scalarref_booleans When true, any value that is expected to be a boolean B may also be expressed as the scalar references C<\0> or C<\1> (which are serialized as booleans by JSON backends). Defaults to false. =head2 stringy_numbers When true, any value that is expected to be a number or integer B may also be expressed as a string. This applies only to the following keywords: =over 4 =item * C (where both C and C (and possibly C) are considered valid) =item * C and C (where the string C<"1"> will match with C<"const": 1>) =item * C (where strings and numbers are compared numerically to each other, if either or both are numeric) =item * C =item * C =item * C =item * C =item * C =item * C (for formats defined to validate numbers) =back This allows you to write a schema like this (which validates a string representing an integer): type: string pattern: ^[0-9]$ multipleOf: 4 minimum: 16 maximum: 256 Such keywords are only applied if the value looks like a number, and do not generate a failure otherwise. Values are determined to be numbers via L. This option is only intended to be used for evaluating data from sources that can only be strings, such as the extracted value of an HTTP header or query parameter. Defaults to false. =head2 strict When true, unrecognized keywords are disallowed in schemas (they will cause an immediate abort in L or L). Defaults to false. =head1 METHODS =for Pod::Coverage BUILDARGS FREEZE THAW =head2 evaluate_json_string $result = $js->evaluate_json_string($data_as_json_string, $schema); $result = $js->evaluate_json_string($data_as_json_string, $schema, { collect_annotations => 1}); Evaluates the provided instance data against the known schema document. The data is in the form of a JSON-encoded string (in accordance with L). B The schema must be in one of these forms: =over 4 =item * a Perl data structure, such as what is returned from a JSON decode operation, =item * a L object, =item * or a URI string indicating the location where such a schema is located. =back Optionally, a hashref can be passed as a third parameter which allows changing the values of the L, L, L, L, L, L, and/or L settings for just this evaluation call. You can also pass use these keys to alter behaviour (these are generally only used by custom validation applications that contain embedded JSON Schemas): =over 4 =item * C: adjusts the effective path of the data instance as of the start of evaluation =item * C: adjusts the accumulated path as of the start of evaluation (or last C<$id> or C<$ref>) =item * C: adjusts the recorded absolute keyword location as of the start of evaluation =item * C: locations in errors and annotations are resolved against this URI =back The return value is a L object, which can also be used as a boolean. =head2 evaluate $result = $js->evaluate($instance_data, $schema); $result = $js->evaluate($instance_data, $schema, { short_circuit => 0 }); Evaluates the provided instance data against the known schema document. The data is in the form of an unblessed nested Perl data structure representing any type that JSON allows: null, boolean, string, number, object, array. (See L below.) The schema must be in one of these forms: =over 4 =item * a Perl data structure, such as what is returned from a JSON decode operation, =item * a L object, =item * or a URI string indicating the location where such a schema is located. =back Optionally, a hashref can be passed as a third parameter which allows changing the values of the L, L, L, L, L, L, and/or L settings for just this evaluation call. You can also pass use these keys to alter behaviour (these are generally only used by custom validation applications that contain embedded JSON Schemas): =over 4 =item * C: adjusts the effective path of the data instance as of the start of evaluation =item * C: adjusts the accumulated path as of the start of evaluation (or last C<$id> or C<$ref>) =item * C: adjusts the recorded absolute keyword location as of the start of evaluation =item * C: locations in errors and annotations are resolved against this URI =back You can pass a series of callback subs to this method corresponding to keywords, which is useful for identifying various data that are not exposed by annotations. This feature is highly experimental and may change in the future. For example, to find the locations where all C<$ref> keywords are applied B: my @used_ref_at; $js->evaluate($data, $schema_or_uri, { callbacks => { '$ref' => sub ($data, $schema, $state) { push @used_ref_at, $state->{data_path}; } }, }); The return value is a L object, which can also be used as a boolean. Callbacks are not compatible with L mode. =head2 validate_schema $result = $js->validate_schema($schema); $result = $js->validate_schema($schema, $config_override); Evaluates the provided schema as instance data against its metaschema. Accepts C<$schema> and C<$config_override> parameters in the same form as L. =head2 traverse $result = $js->traverse($schema); $result = $js->traverse($schema, { initial_schema_uri => 'http://example.com' }); Traverses the provided schema without evaluating it against any instance data. Returns the internal state object accumulated during the traversal, including any identifiers found therein, and any errors found during parsing. For internal purposes only. Optionally, a hashref can be passed as a second parameter which alters some behaviour (these are generally only used by custom validation applications that contain embedded JSON Schemas): =over 4 =item * C: adjusts the accumulated path as of the start of evaluation (or last C<$id> or C<$ref>) =item * C: adjusts the recorded absolute keyword location as of the start of evaluation =item * C: use the indicated URI as the metaschema =back You can pass a series of callback subs to this method corresponding to keywords, which is useful for extracting data from within schemas and skipping properties that may look like keywords but actually are not (for example C<{"const": {"$ref": "this is not actually a $ref"}}>). This feature is highly experimental and is highly likely to change in the future. For example, to find the resolved targets of all C<$ref> keywords in a schema document: my @refs; JSON::Schema::Modern->new->traverse($schema, { callbacks => { '$ref' => sub ($schema, $state) { push @refs, Mojo::URL->new($schema->{'$ref'}) ->to_abs(JSON::Schema::Modern::Utilities::canonical_uri($state)); } }, }); =head2 add_schema $js->add_schema($uri => $schema); $js->add_schema($uri => $document); $js->add_schema($schema); $js->add_schema($document); Introduces the (unblessed, nested) Perl data structure or L object, representing a JSON Schema, to the implementation, registering it under the indicated URI if provided (and if not, C<''> will be used if no other identifier can be found within). You B call C for any external resources that a schema may reference via C<$ref> before calling L, other than the standard metaschemas which are loaded from a local cache as needed. Returns C if the resource could not be found; if there were errors in the document, will die with these errors; otherwise returns the L that contains the added schema. =head2 add_format_validation $js->add_format_validation(all_lc => sub ($value) { lc($value) eq $value }); =for comment we are the nine Eleven Deniers or $js->add_format_validation(no_nines => { type => 'number', sub => sub ($value) { $value =~ m/^[0-8]$$/ }); Adds support for a custom format. If not supplied, the data type(s) that this format applies to defaults to string; all values of any other type will automatically be deemed to be valid, and will not be passed to the subref. Additionally, you can redefine the definition for any core format (see L), but the data type(s) supported by that format may not be changed. Be careful to not mutate the type of the value while checking it -- for example, if it is a string, do not apply arithmetic operators to it -- or subsequent type checks on this value may fail. =head2 add_vocabulary $js->add_vocabulary('My::Custom::Vocabulary::Class'); Makes a custom vocabulary class available to metaschemas that make use of this vocabulary. as described in the specification at L<"Meta-Schemas and Vocabularies"|https://json-schema.org/draft/2020-12/json-schema-core.html#rfc.section.8.1>. The class must compose the L role and implement the L and L methods, as well as C<< _traverse_keyword_ >> methods for each keyword. C<< _eval_keyword_ >> methods are optional; when not provided, evaluation will always return a true result. =head2 add_media_type $js->add_media_type('application/furble' => sub ($content_ref) { return ...; # data representing the deserialized text for Content-Type: application/furble }); Takes a media-type name and a subref which takes a single scalar reference, which is expected to be a reference to a string, which might contain wide characters (i.e. not octets), especially when used in conjunction with L below. Must return B (which is then dereferenced for the C keyword). These media types are already known: =over 4 =item * C - see L =item * C - see L =item * C - see L =item * C - passes strings through unchanged =item * C =item * C - see L =item * C - passes strings through unchanged =back =head2 get_media_type Fetches a decoder sub for the indicated media type. Lookups are performed B. =for stopwords thusly You can use it thusly: $js->add_media_type('application/furble' => sub { ... }); # as above my $decoder = $self->get_media_type('application/furble') or die 'cannot find media type decoder'; my $content_ref = $decoder->(\$content_string); =head2 add_encoding $js->add_encoding('bloop' => sub ($content_ref) { return \ ...; # data representing the deserialized content for Content-Transfer-Encoding: bloop }); Takes an encoding name and a subref which takes a single scalar reference, which is expected to be a reference to a string, which SHOULD be a 7-bit or 8-bit string. Result values MUST be a scalar-reference to a string (which is then dereferenced for the C keyword). =for stopwords natively Encodings handled natively are: =over 4 =item * C - passes strings through unchanged =item * C - see L =item * C - see L =back See also L. =head2 get_encoding Fetches a decoder sub for the indicated encoding. Incoming values MUST be a reference to an octet string. Result values will be a scalar-reference to a string, which might be passed to a media_type decoder (see above). You can use it thusly: my $decoder = $self->get_encoding('base64') or die 'cannot find encoding decoder'; my $content_ref = $decoder->(\$content_string); =head2 get my $schema = $js->get($uri); my ($schema, $canonical_uri) = $js->get($uri); Fetches the Perl data structure representing the JSON Schema at the indicated identifier (uri or uri-reference). When called in list context, the canonical URI of that location is also returned, as a L. Returns C if the schema with that URI has not been loaded (or cached). =head2 get_document my $document = $js->get_document($uri_reference); Fetches the L object that contains the provided identifier (uri or uri-reference). C if the schema with that URI has not been loaded (or cached). =head1 LIMITATIONS =head2 Types Perl is a more loosely-typed language than JSON. This module delves into a value's internal representation in an attempt to derive the true "intended" type of the value. However, if a value is used in another context (for example, a numeric value is concatenated into a string, or a numeric string is used in an arithmetic operation), additional flags can be added onto the variable causing it to resemble the other type. This should not be an issue if data validation is occurring immediately after decoding a JSON payload, or if the JSON string itself is passed to this module. If you are still having difficulties, make sure you are using Perl's fastest and most trusted and reliable JSON decoder, L. Other JSON decoders are known to produce data with incorrect data types. For more information, see L. =head2 Format Validation By default (and unless you specify a custom metaschema with the C<$schema> keyword or L), formats are treated only as annotations, not assertions. When L is true, strings are also checked against the format as specified in the schema. At present the following formats are supported (use of any other formats than these will always evaluate as true, but remember you can always supply custom format handlers; see L above): =over 4 =item * C =item * C =item * C