-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add networksecurityperimeter and managedidentitywithdelegation common types #1505
base: main
Are you sure you want to change the base?
Conversation
All changed packages have been documented.
Show changes
|
packages/samples/common-types/openapi/v5/networksecurityperimeter.json
Outdated
Show resolved
Hide resolved
"items": { | ||
"$ref": "#/definitions/NetworkSecurityPerimeterConfiguration" | ||
}, | ||
"x-ms-identifiers": [] |
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 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.
I tried to address this one but I am unsure if it is a problem on my definition or when the generation of the common types is happening.
For what I saw, "x-ms-identifiers" is included when there is not an id for the array, in this case there is an id coming from resource:
Line 170 in 80f5576
model NetworkSecurityPerimeterConfiguration extends ProxyResource { |
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.
I think this is related to this bug: #1358 as the same logic is likely to be used
If so, we probably want to fix this before we merge this PR
You can try these changes here
|
packages/typespec-azure-resource-manager/lib/common-types/network-security-perimeter.tsp
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/lib/common-types/network-security-perimeter.tsp
Outdated
Show resolved
Hide resolved
packages/typespec-azure-resource-manager/lib/common-types/network-security-perimeter.tsp
Show resolved
Hide resolved
* The default NetworkSecurityPerimeterConfigurationName. | ||
*/ | ||
@added(Versions.v5) | ||
model NetworkSecurityPerimeterConfigurationNameParameter { |
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.
We need to decide how to handle the segment name in this parameter model. We might wanto to do this: #1358
Or there may be a static value that is always be used. This depends on usage inside specs
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, I think that is the link for the bug that you mentioned above, could you please share the link for the suggestion?
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.
Yes, I meant a template, like this:
typespec-azure/packages/typespec-azure-resource-manager/lib/common-types/private-links.tsp
Lines 117 to 127 in 95cc6b9
/** | |
* The name of the private endpoint connection associated with the Azure resource. | |
* @template Segment The resource type name for private endpoint connections (default is privateEndpointConnections) | |
*/ | |
model PrivateEndpointConnectionParameter<Segment extends valueof string = "privateEndpointConnections"> { | |
/** The name of the private endpoint connection associated with the Azure resource. */ | |
@path | |
@TypeSpec.Rest.segment(Segment) | |
@key("privateEndpointConnectionName") | |
name: string; | |
} |
packages/typespec-azure-resource-manager/lib/common-types/network-security-perimeter.tsp
Show resolved
Hide resolved
… update documentation
* The default NetworkSecurityPerimeterConfigurationName. | ||
*/ | ||
@added(Versions.v5) | ||
model NetworkSecurityPerimeterConfigurationNameParameter { |
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.
Yes, I meant a template, like this:
typespec-azure/packages/typespec-azure-resource-manager/lib/common-types/private-links.tsp
Lines 117 to 127 in 95cc6b9
/** | |
* The name of the private endpoint connection associated with the Azure resource. | |
* @template Segment The resource type name for private endpoint connections (default is privateEndpointConnections) | |
*/ | |
model PrivateEndpointConnectionParameter<Segment extends valueof string = "privateEndpointConnections"> { | |
/** The name of the private endpoint connection associated with the Azure resource. */ | |
@path | |
@TypeSpec.Rest.segment(Segment) | |
@key("privateEndpointConnectionName") | |
name: string; | |
} |
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.
Approved pending resolution of the two remaining issues
issue: #1160