lib/generate_models.rb in cqm-models-0.7.2 vs lib/generate_models.rb in cqm-models-0.7.3
- old
+ new
@@ -35,11 +35,11 @@
TYPE_LOOKUP_JS = {
'System.DateTime': 'DateTime',
'System.Integer': 'Number',
'System.Quantity': 'Quantity',
'System.Code': 'Code',
- 'System.Any': '{}',
+ 'System.Any': 'Any',
'interval<System.DateTime>': 'Interval',
'interval<System.Quantity>': 'Interval',
'list<QDM.Component>': '[]',
'System.String': 'String',
'list<QDM.Id>': '[String]',
@@ -245,10 +245,10 @@
js_models_path = 'tmp/' if IS_TEST
files = Dir.glob(js_models_path + '*.js').each do |file_name|
contents = File.read(file_name)
# Replace 'Any' type placeholder (these attributes could point to anything).
- contents.gsub!(/: Any/, ': {}')
+ contents.gsub!(/: Any/, ': Any')
# Add QDM version
contents.gsub!(/qdmVersion: String/, "qdmVersion: { type: String, default: '#{qdm_version}' }")
# Add HQMF oid (if it exists in the given HQMF oid mapping file)