1

I have a flask api that automatically validates and generates Swagger documentation thanks to marshmallow package. One of the API methods is a POST request that wants a specific id as a string and a list_of_ids as an array of strings. The GUI looks like this:

enter image description here

Whatever I insert, I always get the same reply: enter image description here

So my question is how do you input such list (or array) or strings? Is there an equivalent curl for it?

purple_lolakos
  • 456
  • 5
  • 15

1 Answers1

0

Hey I created some example POST request similar to what you reqested in Postman and here is the result cURL:

curl --location --request POST 'http://localhost:5000/api/v1/add_articles_to_article_list' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "42",
    "list_of_ids": [
        1,
        2
    ]
}'
Nir
  • 106
  • 1
  • 7