cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to render this definition The provided definition does not specify a valid version field.

zealoustechie
Visitor

Unable to render this definition The provided definition does not specify a valid version field.

Hello:

 

I generated the python-flask server stubs from the swagger hub, plugged in all the code and when I run the code locally, the swagger-ui works fine with <urlprefix>/api/v1/ui/ but when I deployed it to server (EC2 docker with python and flask), I get this error pasted below.

Unable to render this definition

The provided definition does not specify a valid version field.

Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0).

 

No error is being logged or exception is thrown in python code. The explore box shows <urlprefix>/api/v1/openapi.json. Interestingly, when I try to open the openapi.json using the url <urlprefix>/api/v1/openapi.json, it shows up the json and it has this tag 

"openapi": "3.0.0"

Please advise how to debug this.

 

 

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors