Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 1cd3b634 authored by Teddy Valette's avatar Teddy Valette
Browse files

[gen/wiki/oar] raise an error when undocumented properties instead of a warning banner

parent 6ce7dda8
No related branches found
No related tags found
1 merge request!105[gen/wiki/oar] use get_api helper and raise an error when undocumented properties
Pipeline #150012 passed
......@@ -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|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment