Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken YAML #74

Merged
merged 5 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/rsmp_schema/convert/export/json_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ def self.handle_enum item, out
if item["values"]
out["enum"] = case item["values"]
when Hash
item["values"].each_pair do |k,v|
if v=='' or v==nil
raise "Error: '#{k}' has empty value in #{item}. (When using a hash to specify 'values', the hash values cannot be empty.)"
end
end
item["values"].keys.sort
when Array
item["values"].sort
Expand Down
8 changes: 2 additions & 6 deletions schemas/tlc/1.0.10/sxl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -857,9 +857,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand All @@ -884,9 +882,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand Down
8 changes: 2 additions & 6 deletions schemas/tlc/1.0.13/sxl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1159,9 +1159,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand All @@ -1186,9 +1184,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand Down
8 changes: 2 additions & 6 deletions schemas/tlc/1.0.14/sxl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1297,9 +1297,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand All @@ -1324,9 +1322,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand Down
8 changes: 2 additions & 6 deletions schemas/tlc/1.0.15/sxl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1436,9 +1436,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand All @@ -1463,9 +1461,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand Down
8 changes: 2 additions & 6 deletions schemas/tlc/1.0.7/sxl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand All @@ -855,9 +853,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand Down
8 changes: 2 additions & 6 deletions schemas/tlc/1.0.8/sxl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -857,9 +857,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand All @@ -884,9 +882,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand Down
8 changes: 2 additions & 6 deletions schemas/tlc/1.0.9/sxl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -857,9 +857,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand All @@ -884,9 +882,7 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
values:
'on': ''
'off': ''
values: ['on','off']
manual:
type: boolean
description: Manually controlled detector logic (True/False)
Expand Down
7 changes: 6 additions & 1 deletion schemas/tlc/1.1/sxl.yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unresolved merge conflict?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, fixed now

Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,10 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
<<<<<<< HEAD
# on/off must be quoted, otherwise they are parsed as true/false
=======
>>>>>>> 59e99c4 (use array for on/off enums, show error if an enum hash has empty values)
values: ['on','off']
manual:
type: boolean
Expand All @@ -1912,7 +1915,10 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
<<<<<<< HEAD
# on/off must be quoted, otherwise they are parsed as true/false
=======
>>>>>>> 59e99c4 (use array for on/off enums, show error if an enum hash has empty values)
values: ['on','off']
manual:
type: boolean
Expand Down Expand Up @@ -1943,7 +1949,6 @@ objects:
errormode:
type: string
description: Detector forced on/off while detector error
# on/off must be quoted, otherwise they are parsed as true/false
values: ['on','off']
manual:
type: boolean
Expand Down