You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I went ahead and added '!=': 'ne" to mappings.enum (actually had to change both ./Default/mappings.py and ../mappings.py
Now I run generate and it appears to create all the models but fails during unit test creation:
Traceback (most recent call last):
File "./generate.py", line 31, in
spec.write()
File "/root/fhir-parser/fhirspec.py", line 277, in write
self.parse_unit_tests()
File "/root/fhir-parser/fhirspec.py", line 245, in parse_unit_tests
controller.find_and_parse_tests(self.directory)
File "/root/fhir-parser/fhirunittest.py", line 31, in find_and_parse_tests
test = self.unittest_for_resource(resource)
File "/root/fhir-parser/fhirunittest.py", line 63, in unittest_for_resource
return FHIRUnitTest(self, resource.filepath, resource.content, klass)
File "/root/fhir-parser/fhirunittest.py", line 102, in init
self.expand()
File "/root/fhir-parser/fhirunittest.py", line 137, in expand
tests.extend(item.create_tests(self.controller))
File "/root/fhir-parser/fhirunittest.py", line 174, in create_tests
test = FHIRUnitTest(controller, self.filepath, self.value, self.klass, prefix)
File "/root/fhir-parser/fhirunittest.py", line 102, in init
self.expand()
File "/root/fhir-parser/fhirunittest.py", line 136, in expand
item = FHIRUnitTestItem(self.filepath, path, val, propclass, False, prop.enum)
File "/root/fhir-parser/fhirunittest.py", line 157, in init
self.enum = enum_item['name'] if enum_item is not None else None
TypeError: 'FHIRValueSetEnum' object is not subscriptable
Any ideas what I am doing wrong? My guess is it has something to with me adding '!=': 'ne'
The text was updated successfully, but these errors were encountered:
Similar to #33
"Out of the box"
Got.. Exception: Unable to create a member name for enum '!=' in http://hl7.org/fhir/questionnaire-enable-operator. You may need to add '!=' to mappings.enum_map
So I went ahead and added '!=': 'ne" to mappings.enum (actually had to change both ./Default/mappings.py and ../mappings.py
Now I run generate and it appears to create all the models but fails during unit test creation:
Traceback (most recent call last):
File "./generate.py", line 31, in
spec.write()
File "/root/fhir-parser/fhirspec.py", line 277, in write
self.parse_unit_tests()
File "/root/fhir-parser/fhirspec.py", line 245, in parse_unit_tests
controller.find_and_parse_tests(self.directory)
File "/root/fhir-parser/fhirunittest.py", line 31, in find_and_parse_tests
test = self.unittest_for_resource(resource)
File "/root/fhir-parser/fhirunittest.py", line 63, in unittest_for_resource
return FHIRUnitTest(self, resource.filepath, resource.content, klass)
File "/root/fhir-parser/fhirunittest.py", line 102, in init
self.expand()
File "/root/fhir-parser/fhirunittest.py", line 137, in expand
tests.extend(item.create_tests(self.controller))
File "/root/fhir-parser/fhirunittest.py", line 174, in create_tests
test = FHIRUnitTest(controller, self.filepath, self.value, self.klass, prefix)
File "/root/fhir-parser/fhirunittest.py", line 102, in init
self.expand()
File "/root/fhir-parser/fhirunittest.py", line 136, in expand
item = FHIRUnitTestItem(self.filepath, path, val, propclass, False, prop.enum)
File "/root/fhir-parser/fhirunittest.py", line 157, in init
self.enum = enum_item['name'] if enum_item is not None else None
TypeError: 'FHIRValueSetEnum' object is not subscriptable
Any ideas what I am doing wrong? My guess is it has something to with me adding '!=': 'ne'
The text was updated successfully, but these errors were encountered: