-
Notifications
You must be signed in to change notification settings - Fork 209
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
Code generator should handle flattened ARM ID's better #1651
Labels
Comments
We still need to do this. |
It's possible we no longer need this now #2323 has been merged. We need to check. |
No we still need to do this I think. Not high priority though. |
No change from above. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the current behavior
Today, there is a special
flattenedPropertyHandler
handler for properties that have been flattened, and areferencePropertyHandler
for properties that are references. Unfortunately, if a property is both flattened and a reference, it ends up taking theflattenedPropertyHandler
path which assumes that the property names on both sides line up. Forreference
properties they don't as one isxReference
and one isxId
(usually).Describe the improvement
Today we have special one-off handling in the
flattenedPropertyHandler
to deal with this case, where it checks for the presence ofastmodel.ARMReferenceTag
and honors that rename instead. Instead, we should consider making a standard way to rename properties so that we don't need to duplicate this logic in two handlers. Additionally if more causes for renames come along, checking each specific one will be difficult whereas if we have a standard one in theory it will be easier.We also need to add tests for these interaction cases as they can be quite tricky. Unfortunately right now flattening isn't easily testable with golden files.
The text was updated successfully, but these errors were encountered: