You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out that if you don't include produces section you will get a very odd error:
Traceback (most recent call last):
File "/Users/iwsmith/anaconda/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/Users/iwsmith/anaconda/lib/python2.7/site-packages/flask/app.py", line 1478, in full_dispatch_request
response = self.make_response(rv)
File "/Users/iwsmith/anaconda/lib/python2.7/site-packages/flask/app.py", line 1577, in make_response
rv = self.response_class.force_type(rv, request.environ)
File "/Users/iwsmith/anaconda/lib/python2.7/site-packages/werkzeug/wrappers.py", line 841, in force_type
response = BaseResponse(*_run_wsgi_app(response, environ))
File "/Users/iwsmith/anaconda/lib/python2.7/site-packages/werkzeug/test.py", line 867, in run_wsgi_app
app_rv = app(environ, start_response)
TypeError: 'object' object is not callable
The swagger fragment that generated this is below:
/feedback/{transaction_id}:
put:
description: Notify Babel of actions taken based on a recommendations
consumes:
- application/json
operationId: app.put_feedback
parameters:
- in: path
name: transaction_id
type: string
required: true
- in: query
name: action
type: string
required: true
enum:
- click
- download
- $ref: '#/parameters/paper_id_query'
- $ref: '#/parameters/publisher_query'
- $ref: '#/parameters/client_id'
responses:
"200":
description: OK
I fixed this by including a produces: -application/json in the definition.
The text was updated successfully, but these errors were encountered:
Probably it makes sense to assume "application/json" as default? The Swagger spec does not mention any default behavior and "produces" seems to be optional.
That seems like a reasonable default, though I think adding a more descriptive error message would also be a reasonable, and potentially less surprising. Both are good though :-)
Hi again,
I found out that if you don't include produces section you will get a very odd error:
The swagger fragment that generated this is below:
I fixed this by including a
produces: -application/json
in the definition.The text was updated successfully, but these errors were encountered: