Browse Source

docs: explain DependentKeyword

Sam Jaffe 3 tháng trước cách đây
mục cha
commit
a180036368
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  1. 9 0
      include/jvalidate/vocabulary.h

+ 9 - 0
include/jvalidate/vocabulary.h

@@ -59,6 +59,15 @@ constexpr struct {
 constexpr struct {
 } PostConstraint;
 
+/**
+ * @brief A Metadata tag for marking a keyword as participating as dependent on
+ * another keyword in order to generate annotations or validate instances.
+ * However - we still must evaluate the keyword for "$id" and "$anchor" tags,
+ * since jumping past the keyword is permissible.
+ * Currently the only example of this is the handling of "if"/"then"/"else",
+ * where the "then" and "else" clauses should not be directly used if the "if"
+ * clause is not present in the schema.
+ */
 struct DependentKeyword : std::string_view {};
 
 /**