Skip to content
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

API and Python case mismatches #24

Open
dsoper2 opened this issue Apr 19, 2018 · 0 comments
Open

API and Python case mismatches #24

dsoper2 opened this issue Apr 19, 2018 · 0 comments

Comments

@dsoper2
Copy link
Contributor

dsoper2 commented Apr 19, 2018

  1. Input for the Python SDK matches what the API expects and is PascalCase:
    "api_body": {
    "Name":"sjc07-r13-hx-edge-2",
    "MgmtPlatform":"EDGE",
    "Description":"3 node Edge M5 cluster"
    Output from the SDK is snake_case so I currently have internal deserialize methods exposed for the conversion:

check object properties

                    data_module = import_module(item['data_module'])

                    data_class = getattr(data_module, item['data_class'])
                    deserialize_instance = ApiClient()
                    data_object = deserialize_instance._ApiClient__deserialize_model(item['api_body'], data_class)
                    deserialize_dict = data_object.to_dict()
                    props_match = compare_values(deserialize_dict, response_dict)

We would like to have consistent input/output from the API to help in compares.

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

No branches or pull requests

1 participant