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
Without the @responds decorator, my function has no header fields in the request, just a json payload.
When I add @responds along with a schema, X-Fields is added to the request in swagger. I'd like a way to disable this, as it makes my swagger more confusing to my end user.
Here's the code in question. Trying to understand how I could disable this, or if it needs a code change.
class UserLogin(Resource):
@accepts(schema=UserInputSchema, api=api)
@responds(schema=TokenSchema, api=api)
def post(self):
"""Login"""
access_token = UserService.login(request.parsed_obj)
if access_token is None:
return {'error': 'invalid username or password'}, 401
return {'access_token': access_token}
Here's the call in flask_accepts that seems to be adding this
The text was updated successfully, but these errors were encountered:
preston-infiswift
changed the title
When using the @response decorator, X-Fields headers are automatically applied to the swagger request
When using the @responds decorator, X-Fields headers are automatically applied to the swagger request
Mar 28, 2021
Without the @responds decorator, my function has no header fields in the request, just a json payload.
When I add @responds along with a schema, X-Fields is added to the request in swagger. I'd like a way to disable this, as it makes my swagger more confusing to my end user.
Here's the code in question. Trying to understand how I could disable this, or if it needs a code change.
Here's the call in flask_accepts that seems to be adding this
flask_accepts/flask_accepts/decorators/decorators.py
Line 280 in 38824c4
The text was updated successfully, but these errors were encountered: