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

The Python client runtime serializer includes readOnly properties in requests #934

Closed
johanste opened this issue Apr 11, 2016 · 1 comment
Labels

Comments

@johanste
Copy link
Member

When using the generated SDK to update an existing Virtual Machine (doing a virtual_machine_operations.get(), modifying the returned object, and then calling virtual_machine_operations.create_or_update(), the server will fail with a 400 response:

ERROR: The request content was invalid and could not be deserialized: 'Could not find member 'resources' on object of type 'ResourceDefinition'. Path 'resources', line 1, position 58.'.

If I look at the swagger specification, the resources property of a VirtualMachine is marked as readOnly, but according to a quick network trace, it is still included in the request.

Explicitly setting the request attribute on the returned virtual machine object to None before calling create_or_update makes the request succeed.

@annatisch
Copy link
Member

@tbombach - this can be closed now.

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

No branches or pull requests

4 participants