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

JSON schema validation fails in GitHub action #1

Closed
HagenFritz opened this issue Oct 7, 2022 · 3 comments
Closed

JSON schema validation fails in GitHub action #1

HagenFritz opened this issue Oct 7, 2022 · 3 comments

Comments

@HagenFritz
Copy link

I can successfully connect to CallFire when I run my script on my machine, but I created an Action to automate the process. However, when I do this, I get the error jsonschema.exceptions.ValidationError: 'responsesObject' does not match any of the regexes: '^x-'. The full stack trace is below in case I am misunderstanding the error.

Run python src/update.py
  python src/update.py
  shell: /usr/bin/bash -e ***0***
  env:
    AZURE_HTTP_USER_AGENT: 
    AZUREPS_HOST_ENVIRONMENT: 
    pythonLocation: /opt/hostedtoolcache/Python/3.10.7/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.7/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.7/x64
    Python[2](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:2)_ROOT_DIR: /opt/hostedtoolcache/Python/[3](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:3).10.7/x6[4](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:4)
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.7/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.7/x64/lib
    API_LOGIN: ***
    API_PASSWORD: ***
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/swagger_spec_validator/common.py", line 36, in wrapper
    return method(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/swagger_spec_validator/validator20.py", line 208, in validate_json
    ref_validators.validate(
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/swagger_spec_validator/ref_validators.py", line [5](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:5)1, in validate
    instance_cls(schema, *args, **kwargs).validate(instance)
  File "/opt/hostedtoolcache/Python/3.10.7/x[6](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:6)4/lib/python3.10/site-packages/jsonschema/validators.py", line 304, in validate
    raise error
jsonschema.exceptions.ValidationError: 'responsesObject' does not match any of the regexes: '^x-'

Failed validating 'additionalProperties' in schema['properties']['paths']['patternProperties']['^/']['properties']['get']:
    ***'additionalProperties': False,
     'patternProperties': ***'^x-': ***'$ref': '#/definitions/vendorExtension'***,
     'properties': ***'consumes': ***'$ref': '#/definitions/mediaTypeList',
                                 'description': 'A list of MIME types the '
                                                'API can consume.'***,
                    'deprecated': ***'default': False, 'type': 'boolean'***,
                    'description': ***'description': 'A longer description '
                                                   'of the operation, '
                                                   'GitHub Flavored '
                                                   'Markdown is allowed.',
                                    'type': 'string'***,
                    'externalDocs': ***'$ref': '#/definitions/externalDocs'***,
                    'operationId': ***'description': 'A unique identifier of '
                                                   'the operation.',
                                    'type': 'string'***,
                    'parameters': ***'$ref': '#/definitions/parametersList'***,
                    'produces': ***'$ref': '#/definitions/mediaTypeList',
                                 'description': 'A list of MIME types the '
                                                'API can produce.'***,
                    'responses': ***'$ref': '#/definitions/responses'***,
                    'schemes': ***'$ref': '#/definitions/schemesList'***,
                    'security': ***'$ref': '#/definitions/security'***,
                    'summary': ***'description': 'A brief summary of the '
                                               'operation.',
                                'type': 'string'***,
                    'tags': ***'items': ***'type': 'string'***,
                             'type': 'array',
                             'uniqueItems': True***,
     'required': ['responses'],
     'type': 'object'***

On instance['paths']['/calls']['get']:
    ***'consumes': ['application/json'],
     'description': 'To search for all calls sent or received by the user. '
                    'Use "id=0" for the campaignId parameter to query for '
                    'all calls sent through the POST /calls API. See [call '
                    'states and '
                    'results](https://developers.callfire.com/results-responses-errors.html)',
     'operationId': 'findCalls',
     'parameters': [***'description': 'Limit fields received in response. '
                                    'E.g. fields: id, name or fields items '
                                    '(id, name), see more at [partial '
                                    'response](https://developers.callfire.com/docs.html#partial-response) '
                                    'page.',
                     'in': 'query',
                     'name': 'fields',
                     'required': False,
                     'type': 'string'***,
                    ***'default': 100,
                     'description': 'To set the maximum number of records '
                                    'to return in a paged list response. '
                                    'The default is 100',
                     'format': 'int32',
                     'in': 'query',
                     'name': 'limit',
                     'required': False,
                     'type': 'integer'***,
                    ***'default': 0,
                     'description': 'Offset to the start of a given page. '
                                    'The default is 0. Check '
                                    '[pagination](https://developers.callfire.com/docs.html#pagination) '
                                    'page for more information about '
                                    'pagination in CallFire API.',
                     'format': 'int32',
                     'in': 'query',
                     'name': 'offset',
                     'required': False,
                     'type': 'integer'***,
                    ***'collectionFormat': 'multi',
                     'description': 'Lists the Call ids to search for. If '
                                    'calls ids are specified then other '
                                    'query parameters can be ignored',
                     'in': 'query',
                     'items': ***'format': 'int64', 'type': 'integer'***,
                     'name': 'id',
                     'required': False,
                     'type': 'array'***,
                    ***'description': 'An id of a campaign, queries for '
                                    'calls included to a particular '
                                    'campaign. Specify null for all '
                                    'campaigns and 0 for default campaign',
                     'format': 'int64',
                     'in': 'query',
                     'name': 'campaignId',
                     'required': False,
                     'type': 'integer'***,
                    ***'description': 'An id of a contact batch, queries for '
                                    'calls of a particular contact batch',
                     'format': 'int64',
                     'in': 'query',
                     'name': 'batchId',
                     'required': False,
                     'type': 'integer'***,
                    ***'description': 'Phone number in E.164 format '
                                    '(11-digit) that call was from. '
                                    'Example: 12132000384',
                     'in': 'query',
                     'name': 'fromNumber',
                     'required': False,
                     'type': 'string'***,
                    ***'description': 'Phone number in E.164 format '
                                    '(11-digit) that call was sent to. '
                                    'Example: 12132000384',
                     'in': 'query',
                     'name': 'toNumber',
                     'required': False,
                     'type': 'string'***,
                    ***'description': 'A label for a specific call',
                     'in': 'query',
                     'name': 'label',
                     'required': False,
                     'type': 'string'***,
                    ***'description': 'Searches for all calls which '
                                    'correspond to statuses listed in a '
                                    'comma separated string. Available '
                                    'values: READY, SELECTED, CALLBACK, '
                                    'FINISHED, DISABLED, DNC, DUP, '
                                    'INVALID, TIMEOUT, PERIOD_LIMIT. See '
                                    '[call states and '
                                    'results](https://developers.callfire.com/results-responses-errors.html)',
                     'in': 'query',
                     'name': 'states',
                     'required': False,
                     'type': 'string'***,
                    ***'description': 'Searches for all calls with statuses '
                                    'listed in a comma separated string. '
                                    'Available values: SENT, RECEIVED, '
                                    'DNT, TOO_BIG, INTERNAL_ERROR, '
                                    'CARRIER_ERROR, CARRIER_TEMP_ERROR, '
                                    'UNDIALED. See [call states and '
                                    'results](https://developers.callfire.com/results-responses-errors.html)',
                     'in': 'query',
                     'name': 'results',
                     'required': False,
                     'type': 'string'***,
                    ***'description': 'Filters inbound calls for "true" '
                                    'value and outbound calls for "false" '
                                    'value',
                     'in': 'query',
                     'name': 'inbound',
                     'required': False,
                     'type': 'boolean'***,
                    ***'description': 'Start of the find time interval, '
                                    'formatted in unix time milliseconds. '
                                    'Example: 14[7](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:7)37[8](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:8)1817000 for Sat, 05 '
                                    'Jan 1[9](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:9)85 14:03:37 GMT',
                     'format': 'int64',
                     'in': 'query',
                     'name': 'intervalBegin',
                     'required': False,
                     'type': 'integer'***,
                    ***'description': 'End of the find time interval, '
                                    'formatted in unix time milliseconds. '
                                    'Example: 1473781817000 for Sat, 05 '
                                    'Jan 1985 14:03:37 GMT',
                     'format': 'int64',
                     'in': 'query',
                     'name': 'intervalEnd',
                     'required': False,
                     'type': 'integer'***],
     'produces': ['application/json'],
     'responses': ***'200': ***'description': 'successful operation',
                           'schema': ***'$ref': '#/definitions/CallPage'***,
                   '400': ***'description': 'Bad request',
                           'schema': ***'$ref': '#/definitions/ErrorResponse'***,
                   '401': ***'description': 'Unauthorized',
                           'schema': ***'$ref': '#/definitions/ErrorResponse'***,
                   '403': ***'description': 'Forbidden',
                           'schema': ***'$ref': '#/definitions/ErrorResponse'***,
                   '404': ***'description': 'Not found',
                           'schema': ***'$ref': '#/definitions/ErrorResponse'***,
                   '500': ***'description': 'Internal Server Error',
                           'schema': ***'$ref': '#/definitions/ErrorResponse'***,
     'responsesObject': ***'200': ***'description': 'successful operation',
                                 'schema': ***'$ref': '#/definitions/CallPage'***,
                         '400': ***'description': 'Bad request',
                                 'schema': ***'$ref': '#/definitions/ErrorResponse'***,
                         '401': ***'description': 'Unauthorized',
                                 'schema': ***'$ref': '#/definitions/ErrorResponse'***,
                         '403': ***'description': 'Forbidden',
                                 'schema': ***'$ref': '#/definitions/ErrorResponse'***,
                         '404': ***'description': 'Not found',
                                 'schema': ***'$ref': '#/definitions/ErrorResponse'***,
                         '500': ***'description': 'Internal Server Error',
                                 'schema': ***'$ref': '#/definitions/ErrorResponse'***,
     'security': [***'basicAuth': []***],
     'summary': 'Find calls',
     'tags': ['calls'],
     'x-sample-csharp-url': '/csharp/calls/findCalls.cs',
     'x-sample-curl-request-url': '/curl/calls/findCalls.sh',
     'x-sample-curl-response-url': '/curl/calls/findCalls.json',
     'x-sample-description-url': '/description/calls/findCalls.md',
     'x-sample-go-url': '/go/calls/findCalls.go',
     'x-sample-java-url': '/java/calls/findCalls.java',
     'x-sample-js-url': '/js/calls/findCalls.js',
     'x-sample-php-url': '/php/calls/findCalls.php',
     'x-sample-python-url': '/python/calls/findCalls.py'***

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/callfire-contact-automation/callfire-contact-automation/src/update.py", line 11, in <module>
    import textline
  File "/home/runner/work/callfire-contact-automation/callfire-contact-automation/src/textline/__init__.py", line 16, in <module>
    CLIENT = CallfireClient(API_LOGIN, API_PASSWORD)
  File "/opt/hostedtoolcache/Python/3.[10](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:10).7/x64/lib/python3.10/site-packages/callfire/client.py", line 21, in __init__
    self.swagger_client = SwaggerClient.from_url(
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/bravado/client.py", line 109, in from_url
    return cls.from_spec(spec_dict, spec_url, http_client, config)
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/bravado/client.py", line 135, in from_spec
    swagger_spec = Spec.from_dict(
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/bravado_core/spec.py", line 355, in from_dict
    spec.build()
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/bravado_core/spec.py", line 367, in build
    self._validate_spec()
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/bravado_core/spec.py", line 360, in _validate_spec
    self.resolver = validator20.validate_spec(
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/swagger_spec_validator/validator20.py", line 158, in validate_spec
    swagger_resolver = validate_json(
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/swagger_spec_validator/common.py", line 38, in wrapper
    six.reraise(
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/six.py", line 718, in reraise
    raise value.with_traceback(tb)
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/swagger_spec_validator/common.py", line 36, in wrapper
    return method(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/swagger_spec_validator/validator20.py", line 208, in validate_json
    ref_validators.validate(
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/swagger_spec_validator/ref_validators.py", line 51, in validate
    instance_cls(schema, *args, **kwargs).validate(instance)
  File "/opt/hostedtoolcache/Python/3.10.7/x64/lib/python3.10/site-packages/jsonschema/validators.py", line 304, in validate
    raise error
swagger_spec_validator.common.SwaggerValidationError: ('\'responsesObject\' does not match any of the regexes: \'^x-\'\n\nFailed validating \'additionalProperties\' in schema[\'properties\'][\'paths\'][\'patternProperties\'][\'^/\'][\'properties\'][\'get\']:\n    ***\'additionalProperties\': False,\n     \'patternProperties\': ***\'^x-\': ***\'$ref\': \'#/definitions/vendorExtension\'***,\n     \'properties\': ***\'consumes\': ***\'$ref\': \'#/definitions/mediaTypeList\',\n                                 \'description\': \'A list of MIME types the \'\n                                                \'API can consume.\'***,\n                    \'deprecated\': ***\'default\': False, \'type\': \'boolean\'***,\n                    \'description\': ***\'description\': \'A longer description \'\n                                                   \'of the operation, \'\n                                                   \'GitHub Flavored \'\n                                                   \'Markdown is allowed.\',\n                                    \'type\': \'string\'***,\n                    \'externalDocs\': ***\'$ref\': \'#/definitions/externalDocs\'***,\n                    \'operationId\': ***\'description\': \'A unique identifier of \'\n                                                   \'the operation.\',\n                                    \'type\': \'string\'***,\n                    \'parameters\': ***\'$ref\': \'#/definitions/parametersList\'***,\n                    \'produces\': ***\'$ref\': \'#/definitions/mediaTypeList\',\n                                 \'description\': \'A list of MIME types the \'\n                                                \'API can produce.\'***,\n                    \'responses\': ***\'$ref\': \'#/definitions/responses\'***,\n                    \'schemes\': ***\'$ref\': \'#/definitions/schemesList\'***,\n                    \'security\': ***\'$ref\': \'#/definitions/security\'***,\n                    \'summary\': ***\'description\': \'A brief summary of the \'\n                                               \'operation.\',\n                                \'type\': \'string\'***,\n                    \'tags\': ***\'items\': ***\'type\': \'string\'***,\n                             \'type\': \'array\',\n                             \'uniqueItems\': True***,\n     \'required\': [\'responses\'],\n     \'type\': \'object\'***\n\nOn instance[\'paths\'][\'/calls\'][\'get\']:\n    ***\'consumes\': [\'application/json\'],\n     \'description\': \'To search for all calls sent or received by the user. \'\n                    \'Use "id=0" for the campaignId parameter to query for \'\n                    \'all calls sent through the POST /calls API. See [call \'\n                    \'states and \'\n                    \'results](https://developers.callfire.com/results-responses-errors.html)\',\n     \'operationId\': \'findCalls\',\n     \'parameters\': [***\'description\': \'Limit fields received in response. \'\n                                    \'E.g. fields: id, name or fields items \'\n                                    \'(id, name), see more at [partial \'\n                                    \'response](https://developers.callfire.com/docs.html#partial-response) \'\n                                    \'page.\',\n                     \'in\': \'query\',\n                     \'name\': \'fields\',\n                     \'required\': False,\n                     \'type\': \'string\'***,\n                    ***\'default\': 100,\n                     \'description\': \'To set the maximum number of records \'\n                                    \'to return in a paged list response. \'\n                                    \'The default is 100\',\n                     \'format\': \'int32\',\n                     \'in\': \'query\',\n                     \'name\': \'limit\',\n                     \'required\': False,\n                     \'type\': \'integer\'***,\n                    ***\'default\': 0,\n                     \'description\': \'Offset to the start of a given page. \'\n                                    \'The default is 0. Check \'\n                                    \'[pagination](https://developers.callfire.com/docs.html#pagination) \'\n                                    \'page for more information about \'\n                                    \'pagination in CallFire API.\',\n                     \'format\': \'int32\',\n                     \'in\': \'query\',\n                     \'name\': \'offset\',\n                     \'required\': False,\n                     \'type\': \'integer\'***,\n                    ***\'collectionFormat\': \'multi\',\n                     \'description\': \'Lists the Call ids to search for. If \'\n                                    \'calls ids are specified then other \'\n                                    \'query parameters can be ignored\',\n                     \'in\': \'query\',\n                     \'items\': ***\'format\': \'int64\', \'type\': \'integer\'***,\n                     \'name\': \'id\',\n                     \'required\': False,\n                     \'type\': \'array\'***,\n                    ***\'description\': \'An id of a campaign, queries for \'\n                                    \'calls included to a particular \'\n                                    \'campaign. Specify null for all \'\n                                    \'campaigns and 0 for default campaign\',\n                     \'format\': \'int64\',\n                     \'in\': \'query\',\n                     \'name\': \'campaignId\',\n                     \'required\': False,\n                     \'type\': \'integer\'***,\n                    ***\'description\': \'An id of a contact batch, queries for \'\n                                    \'calls of a particular contact batch\',\n                     \'format\': \'int64\',\n                     \'in\': \'query\',\n                     \'name\': \'batchId\',\n                     \'required\': False,\n                     \'type\': \'integer\'***,\n                    ***\'description\': \'Phone number in E.164 format \'\n                                    \'([11](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:11)-digit) that call was from. \'\n                                    \'Example: [12](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:12)[13](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:13)2000384\',\n                     \'in\': \'query\',\n                     \'name\': \'fromNumber\',\n                     \'required\': False,\n                     \'type\': \'string\'***,\n                    ***\'description\': \'Phone number in E.164 format \'\n                                    \'(11-digit) that call was sent to. \'\n                                    \'Example: 12132000384\',\n                     \'in\': \'query\',\n                     \'name\': \'toNumber\',\n                     \'required\': False,\n                     \'type\': \'string\'***,\n                    ***\'description\': \'A label for a specific call\',\n                     \'in\': \'query\',\n                     \'name\': \'label\',\n                     \'required\': False,\n                     \'type\': \'string\'***,\n                    ***\'description\': \'Searches for all calls which \'\n                                    \'correspond to statuses listed in a \'\n                                    \'comma separated string. Available \'\n                                    \'values: READY, SELECTED, CALLBACK, \'\n                                    \'FINISHED, DISABLED, DNC, DUP, \'\n                                    \'INVALID, TIMEOUT, PERIOD_LIMIT. See \'\n                                    \'[call states and \'\n                                    \'results](https://developers.callfire.com/results-responses-errors.html)\',\n                     \'in\': \'query\',\n                     \'name\': \'states\',\n                     \'required\': False,\n                     \'type\': \'string\'***,\n                    ***\'description\': \'Searches for all calls with statuses \'\n                                    \'listed in a comma separated string. \'\n                                    \'Available values: SENT, RECEIVED, \'\n                                    \'DNT, TOO_BIG, INTERNAL_ERROR, \'\n                                    \'CARRIER_ERROR, CARRIER_TEMP_ERROR, \'\n                                    \'UNDIALED. See [call states and \'\n                                    \'results](https://developers.callfire.com/results-responses-errors.html)\',\n                     \'in\': \'query\',\n                     \'name\': \'results\',\n                     \'required\': False,\n                     \'type\': \'string\'***,\n                    ***\'description\': \'Filters inbound calls for "true" \'\n                                    \'value and outbound calls for "false" \'\n                                    \'value\',\n                     \'in\': \'query\',\n                     \'name\': \'inbound\',\n                     \'required\': False,\n                     \'type\': \'boolean\'***,\n                    ***\'description\': \'Start of the find time interval, \'\n                                    \'formatted in unix time milliseconds. \'\n                                    \'Example: [14](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:14)737818[17](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:18)000 for Sat, 05 \'\n                                    \'Jan 1985 14:03:37 GMT\',\n                     \'format\': \'int64\',\n                     \'in\': \'query\',\n                     \'name\': \'intervalBegin\',\n                     \'required\': False,\n                     \'type\': \'integer\'***,\n                    ***\'description\': \'End of the find time interval, \'\n                                    \'formatted in unix time milliseconds. \'\n                                    \'Example: 147378[18](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:19)17000 for Sat, 05 \'\n                                    \'Jan [19](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:20)85 14:03:37 GMT\',\n                     \'format\': \'int64\',\n                     \'in\': \'query\',\n                     \'name\': \'intervalEnd\',\n                     \'required\': False,\n                     \'type\': \'integer\'***],\n     \'produces\': [\'application/json\'],\n     \'responses\': ***\'[20](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:21)0\': ***\'description\': \'successful operation\',\n                           \'schema\': ***\'$ref\': \'#/definitions/CallPage\'***,\n                   \'[40](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:41)0\': ***\'description\': \'Bad request\',\n                           \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n                   \'401\': ***\'description\': \'Unauthorized\',\n                           \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n                   \'403\': ***\'description\': \'Forbidden\',\n                           \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n                   \'404\': ***\'description\': \'Not found\',\n                           \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n                   \'[50](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:51)0\': ***\'description\': \'Internal Server Error\',\n                           \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n     \'responsesObject\': ***\'[200](https://github.com/rogers-obrien-rad/callfire-contact-automation/actions/runs/3207261811/jobs/5241957286#step:7:201)\': ***\'description\': \'successful operation\',\n                                 \'schema\': ***\'$ref\': \'#/definitions/CallPage\'***,\n                         \'400\': ***\'description\': \'Bad request\',\n                                 \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n                         \'401\': ***\'description\': \'Unauthorized\',\n                                 \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n                         \'403\': ***\'description\': \'Forbidden\',\n                                 \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n                         \'404\': ***\'description\': \'Not found\',\n                                 \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n                         \'500\': ***\'description\': \'Internal Server Error\',\n                                 \'schema\': ***\'$ref\': \'#/definitions/ErrorResponse\'***,\n     \'security\': [***\'basicAuth\': []***],\n     \'summary\': \'Find calls\',\n     \'tags\': [\'calls\'],\n     \'x-sample-csharp-url\': \'/csharp/calls/findCalls.cs\',\n     \'x-sample-curl-request-url\': \'/curl/calls/findCalls.sh\',\n     \'x-sample-curl-response-url\': \'/curl/calls/findCalls.json\',\n     \'x-sample-description-url\': \'/description/calls/findCalls.md\',\n     \'x-sample-go-url\': \'/go/calls/findCalls.go\',\n     \'x-sample-java-url\': \'/java/calls/findCalls.java\',\n     \'x-sample-js-url\': \'/js/calls/findCalls.js\',\n     \'x-sample-php-url\': \'/php/calls/findCalls.php\',\n     \'x-sample-python-url\': \'/python/calls/findCalls.py\'***', <ValidationError: "'responsesObject' does not match any of the regexes: '^x-'">)
Error: Process completed with exit code 1.

The action I am using is below:

name: CallFire Contact Update

on:
  push:
  schedule:
    - cron: '0,30 * * * *' # runs every 30 minutes

jobs:
  build:
    runs-on: ubuntu-latest
    steps:

      - name: checkout repo content
        uses: actions/checkout@v2 # checkout the repository content to github runner

      - name: setup python
        uses: actions/setup-python@v4
        with:
          python-version: '3.*'
          
      - name: install python packages
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          
      - name: execute python script
        env:
          API_LOGIN: ${{ secrets.API_LOGIN }}
          API_PASSWORD: ${{ secrets.API_PASSWORD }}
        run: python src/update.py
          
      - name: commit files
        run: |
          git config --local user.email "action@github.com"
          git config --local user.name "GitHub Action"
          git add -A
          git diff-index --quiet HEAD || (git commit -a -m "updated contacts" --allow-empty)
          
      - name: push changes
        uses: ad-m/github-push-action@v0.6.0
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          branch: main 

I was looking at these issues which seem related:

@Foyerr
Copy link

Foyerr commented Nov 17, 2022

Hello!
I was running into the same issue a little while back - it looks like callfire might have updated their JSON on their end and it broken my python script. I had an email to their support and got nothing back.

I found a work around by providing the old JSON file that can be found on another github repo.
I updated the swagger_url() method found in lib/site-packages/callfire/client.py and changed the URL to the below
https://raw.githubusercontent.com/APIs-guru/openapi-directory/main/APIs/callfire.com/V2/swagger.yaml'

It's jank, but it works.

Hope it helps

@HagenFritz
Copy link
Author

@Foyerr I have had an email out to them for weeks now and no response even after a follow-up...

Thanks for the suggestion! I think I follow what you are saying -- I will try it out and see if I have any success.

Do you have a link to the other repo you mention by chance?

@HagenFritz
Copy link
Author

Seems the Callfire team has resolved this issue - my program seems to be working just fine now. They responded to my ticket and told me things had been updated as of 11/17.

In regard to the lack of response, I was emailing the wrong account. I think they forgot to update the email in their documentation. Use this one: support@callfire.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants