0

I use flask-restx 0.5.1 to define my API.
When describing payload parameter with

@ns.expect(mymodel, description="my model parameter description")

I get the following
enter image description here

When I additionally use

@ns.param('payload', description="This is my payload description but without auto-generated example", example={"key": "value"})

I can get the following

enter image description here

As it is very convenient and nice to see the generated example as in the first picture, I wonder how can I get both, my payload description AND the example? Thx

x y
  • 911
  • 9
  • 27

1 Answers1

0

I found the solution:

You have to use

@ns.param('payload', 'some description goes here', _in='body)

The missing piece was the _in="body"

x y
  • 911
  • 9
  • 27