-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[Hub Generated] Review request for Microsoft.Authorization to add version preview/2020-04-01-preview #11506
Merged
yungezz
merged 49 commits into
Azure:master
from
dagoroz:dev-authorization-Microsoft.Authorization-2020-04-01-preview
Dec 4, 2020
Merged
[Hub Generated] Review request for Microsoft.Authorization to add version preview/2020-04-01-preview #11506
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
2644905
Adds base for updating Microsoft.Authorization from version preview/2…
dagoroz 64382bd
Updates readme
dagoroz fc9df71
Updates API version in new specs and examples
dagoroz 505b1ff
add new properties
dagoroz 6500abc
update readme instructions
dagoroz dff6178
format
dagoroz dbae1dc
bump
dagoroz 89db37d
Adds suppression to readme
dagoroz c556228
Adds suppression to readme
dagoroz 5715f1a
Adds suppression to readme
dagoroz 690f806
Adds suppression to readme
dagoroz 272dcf5
Adds suppression to readme
dagoroz a897978
Adds suppression to readme
dagoroz 78ce124
Adds suppression to readme
dagoroz 638a679
merge
dagoroz 7f494b8
Adds suppression to readme
dagoroz 5b75826
Adds suppression to readme
dagoroz 7b1110a
Adds suppression to readme
dagoroz c2483ef
Adds suppression to readme
dagoroz f452317
Adds suppression to readme
dagoroz 03fc50f
Adds suppression to readme
dagoroz 81b50fc
bump validations
dagoroz eed9ef4
test suppressions
dagoroz 389dab0
return supresions
dagoroz 788edfc
run prettier-fix
dagoroz 1fa87b5
remove unused examples
dagoroz 59ce762
fix tag label
dagoroz 78a1b07
add condition and description to examples
dagoroz 89332e6
add explanation to new fields
dagoroz 75537b7
format
dagoroz 9244557
Merge branch 'master' of https://github.com/Azure/azure-rest-api-spec…
dagoroz f999d05
added missing response errors
dagoroz 0679acc
add missing response codes in examples
dagoroz d82ca04
fix error object
dagoroz 366e7d1
add missing codes
dagoroz 813df18
more missing codes
dagoroz 9ea51bf
more stuff
dagoroz 6385ef3
remove unused stuff
dagoroz 56f3706
move examples
dagoroz 5ac2583
add response to example
dagoroz 013e19b
add default responses
dagoroz 0db4882
add error definition
dagoroz 03f7313
add description to onject
dagoroz 94f1537
remove defaults
dagoroz 3e71e3c
remove defaults
dagoroz 482ea93
orthography
dagoroz 75312c7
prettifier
dagoroz b7d9841
add missing tag
dagoroz c704489
fix
dagoroz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,6 +135,12 @@ | |
"schema": { | ||
"$ref": "#/definitions/RoleAssignmentListResult" | ||
} | ||
}, | ||
"400": { | ||
"description": "Bad Request - Indicates the request has missing information and can not be completed", | ||
"schema": { | ||
"$ref": "#/definitions/Error" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
|
@@ -181,6 +187,12 @@ | |
"schema": { | ||
"$ref": "#/definitions/RoleAssignment" | ||
} | ||
}, | ||
"204": { | ||
"description": "Deleted - Indicates correct deletion without returning additional info" | ||
}, | ||
"412": { | ||
"description": "Precondition Failed" | ||
} | ||
}, | ||
"x-ms-examples": { | ||
|
@@ -230,6 +242,18 @@ | |
"schema": { | ||
"$ref": "#/definitions/RoleAssignment" | ||
} | ||
}, | ||
"400": { | ||
"description": "Bad Request - Indicates the request has missing information and can not be completed", | ||
"schema": { | ||
"$ref": "#/definitions/Error" | ||
} | ||
}, | ||
"409": { | ||
"description": "Conflict - indicates that the request could not be completed due to a conflict with the current state of the target resource", | ||
"schema": { | ||
"$ref": "#/definitions/Error" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
|
@@ -270,6 +294,15 @@ | |
"schema": { | ||
"$ref": "#/definitions/RoleAssignment" | ||
} | ||
}, | ||
"400": { | ||
"description": "Bad Request - Indicates the request has missing information and can not be completed", | ||
"schema": { | ||
"$ref": "#/definitions/Error" | ||
} | ||
}, | ||
"404": { | ||
"description": "Not Found - Indicates the specified role has not been found" | ||
} | ||
}, | ||
"x-ms-examples": { | ||
|
@@ -417,6 +450,12 @@ | |
"schema": { | ||
"$ref": "#/definitions/RoleAssignmentListResult" | ||
} | ||
}, | ||
"400": { | ||
"description": "Bad Request - Indicates the request has missing information and can not be completed", | ||
"schema": { | ||
"$ref": "#/definitions/Error" | ||
} | ||
} | ||
}, | ||
"x-ms-pageable": { | ||
|
@@ -463,6 +502,12 @@ | |
"schema": { | ||
"$ref": "#/definitions/RoleAssignmentListResult" | ||
} | ||
}, | ||
"400": { | ||
"description": "Bad Request - Indicates the request has missing information and can not be completed", | ||
"schema": { | ||
"$ref": "#/definitions/Error" | ||
} | ||
} | ||
Comment on lines
+506
to
511
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also the error response here is causing autorest generation failure - our convention is that the |
||
}, | ||
"x-ms-pageable": { | ||
|
@@ -540,6 +585,28 @@ | |
"conditionVersion": { | ||
"type": "string", | ||
"description": "Version of the condition. Currently accepted value is '2.0'" | ||
}, | ||
"createdOn": { | ||
"type": "string", | ||
"description": "Time it was created", | ||
"format": "date-time" | ||
}, | ||
"updatedOn": { | ||
"type": "string", | ||
"description": "Time it was updated", | ||
"format": "date-time" | ||
}, | ||
"createdBy": { | ||
"type": "string", | ||
"description": "Id of the user who created the assignment" | ||
}, | ||
"updatedBy": { | ||
"type": "string", | ||
"description": "Id of the user who updated the assignment" | ||
}, | ||
"delegatedManagedIdentityResourceId": { | ||
"type": "string", | ||
"description": "Id of the delegated managed identity resource" | ||
} | ||
}, | ||
"description": "Role assignment properties with scope." | ||
|
@@ -650,6 +717,25 @@ | |
"properties" | ||
], | ||
"description": "Role assignment create parameters." | ||
}, | ||
"Error": { | ||
"properties": { | ||
"error": { | ||
"description": "Object to be thrown in case of an unsuccessful response", | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"type": "string", | ||
"description": "Brief error code" | ||
}, | ||
"message": { | ||
"type": "string", | ||
"description": "Longer message explaining the details of the error" | ||
} | ||
} | ||
} | ||
}, | ||
"description": "Object to be thrown in case of an unsuccessful response" | ||
} | ||
}, | ||
"parameters": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ | |
"type": "Microsoft.Authorization/roleAssignments", | ||
"name": "roleassignmentId" | ||
} | ||
} | ||
}, | ||
"204": {}, | ||
"412": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hi @dagoroz @yungezz could any one explain this to me, why we have to add these "error response code" into this list?
In the generated SDKs, the status code listed here will NOT be considered as errors.
To indicate errors, please put the errors in the
default
response.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.
Same opinion as @ArcturusZhang. If 400 is expected as error, it should be covered by
default
, not400
.This change breaks track2 Java SDK, as
RoleAssignmentListResult
andError
is 2 completely different type. Hence the generated method will not able to figure out which type will be returned in runtime.(go can return more than 1 class in single method, java cannot)