Skip to content

Commit

Permalink
Default fieldset short desc to full desc, add single line check
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Martin committed Mar 1, 2019
1 parent c541cc8 commit 700aa8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions generated/ecs/fields_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -817,9 +817,7 @@ event.module:
level: core
name: module
order: 6
short: 'Name of the module this data is coming from.
This information is coming from the modules used in Beats or Logstash.'
short: Name of the module this data is coming from.
type: keyword
event.original:
description: 'Raw text message of entire event. Used to demonstrate log integrity.
Expand Down
2 changes: 2 additions & 0 deletions generated/ecs/fields_nested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ ecs:
group: 2
name: ecs
prefix: ecs.
short: Meta-information specific to ECS.
title: ECS
type: group
error:
Expand Down Expand Up @@ -1311,6 +1312,7 @@ log:
group: 2
name: log
prefix: log.
short: Fields which are specific to log events.
title: Log
type: group
network:
Expand Down
4 changes: 4 additions & 0 deletions scripts/schema_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def schema_cleanup_values(schema):
def schema_set_default_values(schema):
schema['type'] = 'group'
dict_set_default(schema, 'group', 2)
dict_set_default(schema, 'short', schema['description'])
if "\n" in schema['short']:
raise ValueError("Short descriptions must be single line.\nFieldset: {}\n{}".format(schema['name'], schema))
# print("Short descriptions must be single line. Fieldset: {}".format(schema['name']))


def schema_set_fieldset_prefix(schema):
Expand Down

0 comments on commit 700aa8d

Please sign in to comment.