-
Notifications
You must be signed in to change notification settings - Fork 57
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
error serializing empty arm objects #653
Comments
You can't use flattening if the properties are optional, removing that line would solve the problem: Flattening by definition removes a lot of granularity and expressiveness (with the benefits of being less verbose). Just to confirm one thing, your PUT calls required a body |
@lmazuel, yes, the PUT calls require a body of |
I would create a class At least you get your settable property (even if it's always set to There might be a way to make it a constant and remove it from the signature, but I would have to try and I can't right now, I'll add a note to try that early next week. |
Thanks! I set it to |
I'm using autorest.python 3.0.6.2 to generate the code for az-vmware-cli.
I get this error:
Which I tracked down to this generated code:
If I add a settable property to the object, it then becomes:
There are no settable properties in two of the new APIs. They both require just the name, which is passed in the URL. ARM does require an empty object of
{}
to be passed in.Microsoft employees, this is the work-a-round I added:
https://github.com/Azure/azure-rest-api-specs-pr/pull/1205/commits/19b97045d676c8aa7823f60bf0bc1c206ed72dce
Which resulted in this valid code generation:
Azure/az-vmware-cli@159f682
That workaround shouldn't be in the spec. What are the options.
The text was updated successfully, but these errors were encountered: