Open FraserMuir opened 1 year ago
@qiaozha looks like a bad swagger input, maybe we can reach out to the service team or do a few transforms?
I will send an email to service team about this.
any update on this?
I think this is a limitation of the current design. I will update this issue when we have a better design to resolve this issue. Please note that, it will probably take a long time to support it.
Describe the bug When using the declared types within the @azure/arm-securityinsight every property is optional and hence could be undefined, even in cases where it is obvious the underlying service (Sentinel in this case) will definitely return required properties (IDs for example)
To Reproduce Steps to reproduce the behavior:
string | undefined
Expected behavior Properties like IDs (and many others) will obviously always be present of their respective entities. These should not be optional properties on their declared types.
Screenshots
Additional context I don't believe it is acceptable to expect the end user of the types exported from this package to conditionally access all properties on Incident objects (also applied to most others such as Entity, Alert, Comment) in cases where these properties must surely not actually be optional in practise.