sipcapture / homer-app

HOMER 7.x Front-End and API Server
http://sipcapture.io
GNU Affero General Public License v3.0
204 stars 79 forks source link

swagger_codegen and swagger.json fails #461

Closed oej closed 2 years ago

oej commented 2 years ago

Using the python app swagger_codegen parsing of swagger.json fails

  File "/usr/local/lib/python3.9/site-packages/swagger_codegen/parsing/loaders.py", line 61, in add_x_names
    for name, schema in schema["components"]["schemas"].items():
KeyError: 'components'
oej commented 2 years ago

https://pypi.org/project/swagger-codegen/

AlexeyOplachko commented 2 years ago

Hi, since our swagger was generated with go-swagger it's a OpenApi 2.x (Swagger 2) while that python library supports only OpenApi 3.x(aka Swagger 3) which is not backwards compatible.

So most likely that's your source of a problem.

oej commented 2 years ago

Ok, will try to find something compliant with 2.x. Thanks!

AlexeyOplachko commented 2 years ago

Feel free to reopen an issue if this doesn't fix your problem :)