jmcarp / jmcarp/flask-apispec

How do I use/document a GET parameter in flask-apispec?

Open
#90 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
652
Forks
151
PR merge metrics
No merged PRs in 30d

Description

I have GET parameters I would like to use/document with apispec.

Example: I have the GET parameter **color** so I do requests like

`GET /pets?color=black`

```
@app.route('/pets')
@use_kwargs({'category': fields.Str(), 'size': fields.Str()})
@marshal_with(PetSchema(many=True))
def get_pets(**kwargs):
color=request.args.get('color', None)
return Pet.query.filter_by(**kwargs, color)

```

How do I declare **color** GET parameter in flask-apispec?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.