bulk-data-server
bulk-data-server copied to clipboard
metadata: fix profile to be string, not dict
Per the FHIR spec, it is defined as a canonical URL (string, right?): https://www.hl7.org/fhir/capabilitystatement.html
And in fhirclient, it is validated as a string: https://github.com/smart-on-fhir/client-py/blob/b4da2bdc3bf024b6d0a78c85d80bf513302c1b13/fhirclient/models/capabilitystatement.py#L516
And remove non-spec parameter acceptUnknown
.
The current dictionary definition makes it impossible to use fhirclient to inspect server metadata because you'll get an error like:
models.fhirabstractbase.FHIRValidationError: {root}:
rest.0:
resource.2:
profile:
Wrong type <class 'dict'> for property "profile" on <class 'models.capabilitystatement.CapabilityStatementRestResource'>, expecting <class 'str'>
Superfluous entry "acceptUnknown" in data for <models.capabilitystatement.CapabilityStatement object at 0x7f93f0226350>
Noting for posterity that this behavior :may: be acceptable in the 4.0.1 compatible version of fhirclient, though that may be in error.