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

[MPG] Backward compat access to "properties" flattening (basic scenario) #2187

Closed
Tracked by #622 ...
lmazuel opened this issue Oct 17, 2023 · 2 comments · Fixed by #2362
Closed
Tracked by #622 ...

[MPG] Backward compat access to "properties" flattening (basic scenario) #2187

lmazuel opened this issue Oct 17, 2023 · 2 comments · Fixed by #2362
Assignees
Labels
mgmt This issue is related to a management-plane library. p0

Comments

@lmazuel
Copy link
Member

lmazuel commented Oct 17, 2023

DPG models from TypeSpec won't flatten. To simplify backward compat for msrest to DPG models, we'll introduce:

If a model has a properties attribute, any direct access from the root to a property under properties should work.

For instance:

m.properties.foo # Returns "foo" in properties
m.foo # Also returns "foo" from properties

In the rare case where there is a name conflict, the local attribute should be returned.

Only for MPG (Mgmt from TypeSpec)

@tadelesh tadelesh self-assigned this Oct 19, 2023
@lmazuel
Copy link
Member Author

lmazuel commented Nov 7, 2023

Let's do typeProperties as well

@msyyc msyyc assigned msyyc and unassigned tadelesh Nov 7, 2023
@iscai-msft iscai-msft added p0 mgmt This issue is related to a management-plane library. labels Nov 30, 2023
@msyyc msyyc changed the title [MPG] Backward compat access to "properties" flattening [MPG] Backward compat access to "properties" flattening (basic scenario) Jan 10, 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. p0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants