Skip to content

Add test script to validate Python client generation for PetstoreAdd python client test script #21420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Gosling-dude
Copy link

Description

Added a test script test_script.py under samples/client/petstore/python/ to:

  • Validate that the generated Python client builds successfully.
  • Ensure the client modules can be imported.
  • Confirm that the DefaultApi class instance can be created.

This makes it easier to confirm that the Python SDK generated from the Petstore spec is functional and can be used as a reference for users.

Related Area

  • Language: Python
  • Location: samples/client/petstore/python/

Checklist

  • Generated the client using the latest code
  • Tested the client locally
  • Confirmed that imports and class instantiation work

@wing328
Copy link
Member

wing328 commented Jun 18, 2025

are you using an old version of openapi generator?

samples/client/petstore/python/ doesn't exist in the latest version

(python client generator was refactored in v7.x)

@Gosling-dude
Copy link
Author

Thanks for the feedback, @wing328 !

You're right — this script was based on an older version of the project structure. I'll rebase my branch onto the latest master and update the script path to align with the refactored Python client generator in v7.x. Will push the changes shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants