Skip to content

componentschemas prefix? #397

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

Closed
ramnes opened this issue Apr 28, 2021 · 1 comment
Closed

componentschemas prefix? #397

ramnes opened this issue Apr 28, 2021 · 1 comment
Labels
🐞bug Something isn't working
Milestone

Comments

@ramnes
Copy link
Contributor

ramnes commented Apr 28, 2021

Describe the bug
Since b719316, I see a lot of files and classes created prefixed with componentschemas_ and Componentsschema, which doesn't seem normal to me.

To Reproduce
Run openapi-python-client update --config=generator/config.yaml --path=generator/openapi.yaml && git status on sftpgo-client with openapi-python-client at b719316.

Expected behavior
Not this:

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	sftpgo_client/base/models/componentsschemas_admin_status.py
	sftpgo_client/base/models/componentsschemas_azure_blob_fs_config_access_tier.py
	sftpgo_client/base/models/componentsschemas_connection_status_protocol.py
	sftpgo_client/base/models/componentsschemas_filesystem_config_provider.py
	sftpgo_client/base/models/componentsschemas_ftpd_binding_tls_mode.py
	sftpgo_client/base/models/componentsschemas_gcs_config_automatic_credentials.py
	sftpgo_client/base/models/componentsschemas_secret_status.py
	sftpgo_client/base/models/componentsschemas_services_status_defender.py
	sftpgo_client/base/models/componentsschemas_transfer_operation_type.py
	sftpgo_client/base/models/componentsschemas_user_filters_tls_username.py
	sftpgo_client/base/models/componentsschemas_user_permissions.py
	sftpgo_client/base/models/componentsschemas_user_status.py

OpenAPI Spec File
https://github.com/ramnes/sftpgo-client/blob/5abdfe1ae486e1b16d56b72ac52fe20e9a418bf7/generator/openapi.yaml

Desktop (please complete the following information):

  • OS: Linux
  • Python Version: 3.9
  • openapi-python-client version b719316
@ramnes ramnes added the 🐞bug Something isn't working label Apr 28, 2021
@dbanty
Copy link
Collaborator

dbanty commented Apr 28, 2021

Good catch! I've created a branch here which replicates the bug in our end-to-end tests. Looks like the auto-naming using parent class + property name is using the ref to the parent instead of the generated class name... whoops! 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants