When attempting to invoke an endpoint that creates a model with a "self" property, the following traceback is emitted:
Traceback (most recent call last):
File "<ipython-input-14-acee5e06b3f1>", line 1, in <module>
try: c.index.get_index().result()._links.self.href
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado/http_future.py", line 77, in result
self.response_callbacks)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado/http_future.py", line 115, in unmarshal_response
operation)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/response.py", line 110, in unmarshal_response
op.swagger_spec, content_spec, content_value)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 51, in unmarshal_schema_object
return unmarshal_model(swagger_spec, schema_object_spec, value)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 173, in unmarshal_model
model_as_dict = unmarshal_object(swagger_spec, model_spec, model_value)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 133, in unmarshal_object
result[k] = unmarshal_schema_object(swagger_spec, prop_spec, v)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 51, in unmarshal_schema_object
return unmarshal_model(swagger_spec, schema_object_spec, value)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 173, in unmarshal_model
model_as_dict = unmarshal_object(swagger_spec, model_spec, model_value)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 133, in unmarshal_object
result[k] = unmarshal_schema_object(swagger_spec, prop_spec, v)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 54, in unmarshal_schema_object
return unmarshal_object(swagger_spec, schema_object_spec, value)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 133, in unmarshal_object
result[k] = unmarshal_schema_object(swagger_spec, prop_spec, v)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 51, in unmarshal_schema_object
return unmarshal_model(swagger_spec, schema_object_spec, value)
File "/home/jkrukoff/Documents/Services/unifi-go/.virtualenv/lib/python3.5/site-packages/bravado_core/unmarshal.py", line 174, in unmarshal_model
model_instance = model_type(**model_as_dict)
TypeError: <lambda>() got multiple values for argument 'self'
It appears that the model constructor depends on passing **kwargs in, which conflicts with the initial self
parameter for the init method. This is problematic for me, as I'm building a API that uses JSON+HAL, which mandates that a property named self
exist on all resources.
I've an attempt at a PR to resolve the issue, though don't feel like I've a deep enough understanding of the issue to have confidence in my changes.