-1

I'm trying to build an API and I'm using swagger editor, swagger gen and swagger UI. I have a YAML file from swagger editor, and I generated a python-flask server, I ran the server and it worked fine, the problem is on my page I have a few endpoints when I want to try the endpoint I just press try it now button on the page and press execute and this is the response I keep getting (https://i.stack.imgur.com/vm0rH.png)

what the response should be (https://i.stack.imgur.com/gKm9i.png)

till now I didn't perform any logic for it i'm just trying to print on the server response but i keep getting the same error message

when I figured it out it was because of an error on the controller function of that specific endpoint, and this is what I have tried to print but I keep getting the same error above, i know it's because of that endpoint function but I don't know what exactly (https://i.stack.imgur.com/bMKU4.png)

and this what I'm getting on the terminal [error on the terminal]

i even have tried this but same error second try

any solutions? or why is this happening

Anmar
  • 1
  • 1

1 Answers1

0

Set a breakpoint in your code and debug your application step by step and you might find the reason of the error.

muca
  • 947
  • 7
  • 8
  • i'm very new to swagger and flask, but what i have notice that the argument doesn't pass, the error tell me that the argument is missing but in my code it isn't – Anmar Jan 25 '23 at 00:24