Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

OpenAPI Spec doesn't work with python client generators

Maya Kerostasia
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 7, 2024

I've tried with
`openapi-generator-cli -g python`
swagger-codegen online

I always receive errors.  Here's some of the problems reported by the swagger explorer

When importing the generated library, I get pydantic errors with openapi-gen and this with swagger

```python
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\njtwi\work_repos\py_jira_api\swagger_client\__init__.py", line 18, in <module>
from swagger_client.api.announcement_banner_api import AnnouncementBannerApi
File "C:\Users\njtwi\work_repos\py_jira_api\swagger_client\api\__init__.py", line 6, in <module>
from swagger_client.api.announcement_banner_api import AnnouncementBannerApi
File "C:\Users\njtwi\work_repos\py_jira_api\swagger_client\api\announcement_banner_api.py", line 20, in <module>
from swagger_client.api_client import ApiClient
File "C:\Users\njtwi\work_repos\py_jira_api\swagger_client\api_client.py", line 26, in <module>
import swagger_client.models
File "C:\Users\njtwi\work_repos\py_jira_api\swagger_client\models\__init__.py", line 624, in <module>
from swagger_client.models.rule_config_body import RuleConfigBody
File "C:\Users\njtwi\work_repos\py_jira_api\swagger_client\models\rule_config_body.py", line 136
dy=None, user_principal=None): # noqa: E501
^
SyntaxError: duplicate argument 'requested_session_id_from_url' in function definition

```

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events