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

create_param_docstring doesn't dereference $ref properly #172

Open
jakul opened this issue May 2, 2017 · 0 comments
Open

create_param_docstring doesn't dereference $ref properly #172

jakul opened this issue May 2, 2017 · 0 comments

Comments

@jakul
Copy link

jakul commented May 2, 2017

I have a working Open API, which bravado gives the docstring below for. The param_spec which gets passed in is listed below that. create_param_docstring doesn't know how to dereference $ref'd parameters, and so gives an incorrect docstring.

In [3]: client.Users.user_action_elasticsearch?
{'x-scope': ['http://localhost:5010/users/swagger.json'], u'$ref': u'#/parameters/body_action_user_elasticsearch'}
{'x-scope': ['http://localhost:5010/users/swagger.json'], u'$ref': u'#/parameters/scroll'}
Signature:       client.Users.user_action_elasticsearch(self, **op_kwargs)
Call signature:  client.Users.user_action_elasticsearch(**op_kwargs)
Type:            CallableOperation
String form:     <bravado.client.CallableOperation object at 0x10f260d50>
File:            ~/.virtualenvs/service-intel/lib/python2.7/site-packages/bravado/client.py
Docstring:
[POST] Search Elasticsearch

This view is a direct passthrough to the Elasticsearch `_search` endpoint. Search syntax and examples can be found at https://www.elastic.co/guide/en/elasticsearch/reference/5.1/search-request-body.html

:param None: Document your spec, yo! (optional)
:type None: None
:param None: Document your spec, yo! (optional)
:type None: None
:returns: 200: Search response
:rtype: object
Class docstring:
Wraps an operation to make it callable and provides a docstring. Calling
the operation uses the configured http_client.

:type operation: :class:`bravado_core.operation.Operation`
Call docstring:
Invoke the actual HTTP request and return a future.

:rtype: :class:`bravado.http_future.HTTPFuture
{'x-scope': ['http://localhost:5010/users/swagger.json'], u'$ref': u'#/parameters/body_action_user_elasticsearch'}
{'x-scope': ['http://localhost:5010/users/swagger.json'], u'$ref': u'#/parameters/scroll'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant