-
Notifications
You must be signed in to change notification settings - Fork 54
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
DevCenter
@ 2022-04-01
#2675
DevCenter
@ 2022-04-01
#2675
Conversation
x-link: hashicorp/go-azure-sdk#549 |
Looks like there's a Swagger issue blocking this one:
Rebased this on top of |
d94ba3f
to
bebc619
Compare
@tombuildsstuff I am from the team owning the swagger. Do you have any suggestions on how to fix this issue? Thank you. |
@am-lim looking into this one, it appears the root of the issue is that the The following diff fixes this issue: diff --git a/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/devcenter.json b/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/devcenter.json
index e0b943d07a..424114f64d 100644
--- a/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/devcenter.json
+++ b/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01/devcenter.json
@@ -3406,15 +3406,11 @@
"creatorRoleAssignment": {
"description": "The role definition assigned to the environment creator on backing resources.",
"type": "object",
- "properties": {
- "roles": {
- "type": "object",
- "description": "A map of roles to assign to the environment creator.",
- "additionalProperties": {
- "$ref": "#/definitions/EnvironmentRole"
- }
+ "allOf": [
+ {
+ "$ref": "#/definitions/RoleAssignment"
}
- }
+ ]
},
"userRoleAssignments": {
"description": "Role Assignments created on environment backing resources. This is a mapping from a user object ID to an object of role definition IDs.",
@@ -3674,10 +3670,8 @@
}
}
},
- "UserRoleAssignment": {
+ "RoleAssignment": {
"type": "object",
- "description": "Mapping of user object ID to role assignments.",
- "x-ms-client-name": "userRoleAssignmentValue",
"properties": {
"roles": {
"type": "object",
@@ -3688,6 +3682,16 @@
}
}
},
+ "UserRoleAssignment": {
+ "type": "object",
+ "description": "Mapping of user object ID to role assignments.",
+ "x-ms-client-name": "userRoleAssignmentValue",
+ "allOf": [
+ {
+ "$ref": "#/definitions/RoleAssignment"
+ }
+ ]
+ },
"OperationStatus": {
"description": "The current status of an async operation",
"type": "object", However the import should be able to process this as it is, so I believe this is ultimately a bug in the importer which needs fixing. |
Thanks for the suggestion @tombuildsstuff. Is it possible that the bug in the importer will be fixed soon? |
@tombuildsstuff The suggestion would cause a breaking change on our side which would involve difficulty in getting our SDK updated in the meanwhile and immediate future. Could we prioritize the importer bug to be fixed? |
@tombuildsstuff Thanks for fixing the bug! Any update on this PR? Can the checks be re-run? |
@am-lim FWIW the bug isn't fixed from our side, I've added a test for this in the branch above whilst I have the context, but as there's some higher priority items from our side, so unfortunately I don't have a timeframe for when this'll be fixed in the importer. That said, if @jiaweitao001 or someone else is able to send a PR to fix that in the interim then we'd be happy to accept a PR for that - but in the short-term the most reliable way to fix this is going to be to update the Swagger (which, fwiw, I don't believe this'd be a breaking change, since the SDK output is the same?) |
@jiaweitao001 @wuxu92 mind rebasing this one so we can get this in? |
bebc619
to
ac20c12
Compare
@tombuildsstuff Thanks for reminding. Rebased. |
@tombuildsstuff Any update on whether this PR can be checked in? |
@am-lim @jiaweitao001 looks like there's an issue with the Swagger here where this field isn't marked as readonly: Azure/azure-rest-api-specs#26189 - mind taking a look so we can add support for this? |
@tombuildsstuff the change looks good, verified by @nickdepinet |
@tombuildsstuff The /Azure/azure-rest-api-specs/pull/26189 has been merged |
Awesome, thanks @am-lim :) |
Onboarding Azure DevCenter.
Swagger: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/devcenter/resource-manager/Microsoft.DevCenter/stable/2023-04-01