소스 검색

docs: explain DependentKeyword

Sam Jaffe 3 달 전
부모
커밋
a180036368
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  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 {};
 
 /**