client-py icon indicating copy to clipboard operation
client-py copied to clipboard

Flask app still failing on non-optional property 'type'

Open mgold99 opened this issue 4 years ago • 2 comments

Unable to run demo flask app. seems to be a validation issue? thanks!

version: repo cloned and built today (22-Jun-20)

smart_defaults = { 'app_id': 'my_web_app', 'api_base': 'https://launch.smarthealthit.org/v/r4/fhir', 'redirect_uri': 'http://localhost:8000/fhir-app/', }

it also fails against this api_base - https://r4.smarthealthit.org

The error: models.fhirabstractbase.FHIRValidationError: {root}: rest.0: resource.70: searchParam.14: 'Non-optional property "type" on <models.capabilitystatement.CapabilityStatementRestResourceSearchParam object at 0x7f8367dd19d0> is missing'

This appears to be similar to this closed issue: https://github.com/smart-on-fhir/client-py/issues/65

mgold99 avatar Jun 22 '20 22:06 mgold99

I have tried all of the base paths from Smart App Launcher with flask_app demo, but all of them are not working with couple of different problem shown below:

    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', TimeoutError(60, 'Operation timed out'))
      searchParam.14:
        'Non-optional property "type" on <models.capabilitystatement.CapabilityStatementRestResourceSearchParam object at 0x113508f40> is missing'
  rest.0:
    operation.0:
      definition:
        Wrong type <class 'dict'> for property "definition" on <class 'models.capabilitystatement.CapabilityStatementRestResourceOperation'>, expecting <class 'str'>
    resource.0:
      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 0x10e9d6cd0>

Chesterguan avatar Sep 09 '20 04:09 Chesterguan

I've just started working on https://github.com/pete88b/smart-on-fhir-client-py-demo to hopefully help people get started with the python FHIR client - working flask app included (o:

although ... it might be hard to keep it working as FHIR servers and the python client project make changes ...

pete88b avatar Apr 29 '21 15:04 pete88b