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

additionalProperties: true does not work on a model being flattened #5173

Open
ArcturusZhang opened this issue Nov 21, 2024 · 0 comments
Open
Labels
Mgmt This issue is related to a management-plane library.

Comments

@ArcturusZhang
Copy link
Member

This happens to both swagger and typespec input, but since typespec input we should not turn the client-flatten on, this theoretically only affects swagger input libraries.

If we have additionalProperties: true on a model, but it is marked as x-ms-client-flatten: true on the other model, for example:

"VirtualMachine": {
"properties": {
"$ref": "#/definition/VirtualMachineProperties",
"x-ms-client-flatten": true
}
},
"VirtualMachineProperties": {
"additionalProperties": true
}

In the generated code, the additionalProperties flag in VirtualMachineProperties is not honored at all.

@ArcturusZhang ArcturusZhang added the Mgmt This issue is related to a management-plane library. label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

No branches or pull requests

1 participant