Merge "template syntax validation - adding description"
This commit is contained in:
commit
ef0cfbbf3c
@ -26,6 +26,7 @@ class TemplateFields(object):
|
||||
ACTION_TYPE = 'action_type'
|
||||
CATEGORY = 'category'
|
||||
CONDITION = 'condition'
|
||||
DESCRIPTION = 'description'
|
||||
ENTITIES = 'entities'
|
||||
ENTITY = 'entity'
|
||||
ID = 'id'
|
||||
|
@ -64,7 +64,8 @@ def validate_template_sections(template_conf):
|
||||
def validate_metadata_section(metadata):
|
||||
|
||||
schema = Schema({
|
||||
Required(TemplateFields.ID): Any(str, six.text_type)
|
||||
Required(TemplateFields.ID): Any(str, six.text_type),
|
||||
TemplateFields.DESCRIPTION: Any(str, six.text_type)
|
||||
})
|
||||
|
||||
error_msg = SCHEMA_CONTENT_ERROR % (
|
||||
|
@ -1,5 +1,6 @@
|
||||
metadata:
|
||||
id: basic_template
|
||||
description: basic template for general tests
|
||||
definitions:
|
||||
entities:
|
||||
- entity:
|
||||
|
Loading…
x
Reference in New Issue
Block a user