zappa / Zappa

Serverless Python
https://zappa.ws/zappa
MIT License
3.24k stars 362 forks source link

[Migrated] Multiple query fields with same name only returning last value #576

Closed jneves closed 4 months ago

jneves commented 3 years ago

Originally from: https://github.com/Miserlou/Zappa/issues/1508 by seandavi

Context

I have a Flask/Flask-RESTPlus (very simple) that has a query parameter, fields, that is described as:

parser = api.parser()
parser.add_argument('q', type=str,
                    help='A [lucene-syntax](https://lucene.apache.org/core/2_9_4/queryparsersyntax.html) query',
                    default='*')
parser.add_argument('from', type=int, help='The starting record to return (for pagination), zero-based', default=0)
parser.add_argument('size', type=int, help='The number of records to return (for pagination)', default=10)
parser.add_argument('fields', help="fields to include in output. See 'mapping' endpoints for list of available fields", action='append')

Expected Behavior

When running locally and querying with:

http://localhost:5000/....fields=a&fields=b...

My code sees the fields as an array of fields.

Actual Behavior

When running on the API endpoint after deploying (and updating), I see only the last value of the fields parameter.

Possible Fix

Steps to Reproduce

The issue only manifests itself once deployed, not in the "local" environment.

Your Environment

github-actions[bot] commented 5 months ago

Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.

github-actions[bot] commented 4 months ago

Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.