简体   繁体   中英

i'm getting error 500 when i'm trying to perform a function in swagger CodGen

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM