-
Notifications
You must be signed in to change notification settings - Fork 40
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
Remove restrictions armresourcelist #1674
base: main
Are you sure you want to change the base?
Remove restrictions armresourcelist #1674
Conversation
All changed packages have been documented.
Show changes
|
You can try these changes here
|
@@ -293,7 +293,7 @@ model ResourceKindProperty { | |||
*/ | |||
@doc("The response of a {name} list operation.", Resource) | |||
@friendlyName("{name}ListResult", Resource) | |||
model ResourceListResult<Resource extends Foundations.Resource> is Azure.Core.Page<Resource>; | |||
model ResourceListResult<Resource extends {}> is Azure.Core.Page<Resource>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some issue with this. If the intension has been to support scalar or array types, it would not work. Playground. In addition, Azure.Core.Page<T extends Model>
, making this would fail in Azure.Core as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{}
and Model
are equivalent constraints. Also, this handles most list cases. If we want to open up the paged data to be any type (or scalar and model types), we can use our own custom page. Here is a playground showing the definition for ResourceListResult working with Page<T>
and a completely custom paged result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark for this approach, are you thinking on creating a new operation or do we still see this as an update on ArmResourceListByParent operation?
if we update on ArmResourceListByParent, is there a way to do it without being a breaking change?
issue: #262