From 1cd3b6349f47fe2b99e8603c3322793fa857ec72 Mon Sep 17 00:00:00 2001
From: Teddy Valette <teddy.valette@inria.fr>
Date: Tue, 9 Jun 2020 10:53:22 +0200
Subject: [PATCH] [gen/wiki/oar] raise an error when undocumented properties
 instead of a warning banner

---
 lib/refrepo/gen/wiki/generators/oar_properties.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/refrepo/gen/wiki/generators/oar_properties.rb b/lib/refrepo/gen/wiki/generators/oar_properties.rb
index 134e2f10bc0..172310c71a3 100644
--- a/lib/refrepo/gen/wiki/generators/oar_properties.rb
+++ b/lib/refrepo/gen/wiki/generators/oar_properties.rb
@@ -286,13 +286,13 @@ class OarPropertiesGenerator < WikiGenerator
       @@properties[prop]["possible_values"] ||= prop_hash["values"].join(", ") unless @@properties[prop].nil?
     }
 
-    # Compare properties with fields from oar db
+    # If there are undocumented and not ignored properties, we raise an error
     oarapi_properties.reject!{|x| (@@properties.keys.include? x or @@ignored_properties.include? x)}
-
-    @generated_content = "{{Portal|User}}\nProperties on resources managed by OAR allow users to select them according to their experiment's characteristics." + MW::LINE_FEED
     if not oarapi_properties.empty?
-      @generated_content += "{{Warning|text=Following properties are not documented : " + oarapi_properties.sort.join(', ') + "}}" + MW::LINE_FEED
+      raise("Following properties are not documented : #{oarapi_properties.sort.join(', ')}")
     end
+
+    @generated_content = "{{Portal|User}}\nProperties on resources managed by OAR allow users to select them according to their experiment's characteristics." + MW::LINE_FEED
     @generated_content += MW::heading("OAR Properties", 1) + MW::LINE_FEED
 
     @@categories.sort.to_h.each { |cat, cat_properties|
-- 
GitLab