logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

JSON::Schema::Modern::Vocabulary::FormatAnnotation - Implementation of the JSON Schema Format-Annotation

Author

       Karen Etheridge <ether@cpan.org>

Description

       Implementation of the JSON Schema Draft 2020-12 "Format-Annotation" vocabulary, indicated in metaschemas
       with the URI "https://json-schema.org/draft/2020-12/vocab/format-annotation" and formally specified in
       <https://json-schema.org/draft/2020-12/json-schema-validation.html#section-7>.

       Support is also provided for

       •   the    equivalent    Draft    2019-09    keyword,    indicated    in   metaschemas   with   the   URI
           "https://json-schema.org/draft/2019-09/vocab/format"      and       formally       specified       in
           <https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-02#section-7>.

       •   the       equivalent       Draft       7       keyword,       as      formally      specified      in
           <https://datatracker.ietf.org/doc/html/draft-handrews-json-schema-validation-01#section-7>.

       •   the      equivalent      Draft      6       keyword,       as       formally       specified       in
           <https://json-schema.org/draft-06/draft-wright-json-schema-validation-01#rfc.section.8>.

       •   the       equivalent       Draft       4       keyword,       as      formally      specified      in
           <https://json-schema.org/draft-04/draft-fge-json-schema-validation-00#rfc.section.7>.

       It also implements format assertion behaviour in  a  relaxed  mode,  meaning  the  "validate_formats"  in
       JSON::Schema::Modern  option has been enabled, and unknown formats will not generate errors; this differs
       from the more strict behaviour in LJSON::Schema::Modern::Vocabulary::FormatAssertion> which requires  all
       formats used in the schema to be supported and defined.

       When  this  vocabulary  (the  Format-Annotation  vocabulary)  is  specified (which is the default for the
       draft2020-12 metaschema) and combined with the  "validate_formats"  option  set  to  true,  unimplemented
       formats  will silently validate, but implemented formats will validate completely. Note that some formats
       require optional module dependencies, and the lack of these modules will generate an error.

       When the Format-Assertion vocabulary is specified, unimplemented formats will generate an error on use.

Name

       JSON::Schema::Modern::Vocabulary::FormatAnnotation - Implementation of the JSON Schema Format-Annotation
       vocabulary

See Also

       •   "Format Validation" in JSON::Schema::Modern

       •   JSON::Schema::Modern::Vocabulary::FormatAssertion

Support

       Bugs may be submitted through <https://github.com/karenetheridge/JSON-Schema-Modern/issues>.

       I am also usually active on irc, as 'ether' at "irc.perl.org" and "irc.libera.chat".

       You can also find me on the JSON Schema Slack server <https://json-schema.slack.com>  and  OpenAPI  Slack
       server <https://open-api.slack.com>, which are also great resources for finding help.

Version

       version 0.611

See Also