Skip to content

Commit

Permalink
Revert change and add defaults (#12243)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagoroz authored Jan 5, 2021
1 parent cdc98b4 commit 2e1ad0d
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 186 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,24 +112,6 @@
}
},
"definitions": {
"Error": {
"properties": {
"error": {
"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"
},
"ResourceType": {
"properties": {
"name": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,24 +478,6 @@
}
},
"definitions": {
"Error": {
"properties": {
"error": {
"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"
},
"RoleAssignmentFilter": {
"properties": {
"principalId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,24 +348,6 @@
}
},
"definitions": {
"Error": {
"properties": {
"error": {
"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"
},
"RoleDefinitionFilter": {
"properties": {
"roleName": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,25 +298,6 @@
}
},
"definitions": {
"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"
},
"DenyAssignmentFilter": {
"properties": {
"denyAssignmentName": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@
"$ref": "#/definitions/RoleAssignmentListResult"
}
},
"400": {
"description": "Bad Request - Indicates the request has missing information and can not be completed",
"default": {
"description": "error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/Error"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
Expand Down Expand Up @@ -191,8 +191,11 @@
"204": {
"description": "Deleted - Indicates correct deletion without returning additional info"
},
"412": {
"description": "Precondition Failed"
"default": {
"description": "error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-examples": {
Expand Down Expand Up @@ -243,16 +246,10 @@
"$ref": "#/definitions/RoleAssignment"
}
},
"400": {
"description": "Bad Request - Indicates the request has missing information and can not be completed",
"default": {
"description": "error response describing why the operation failed.",
"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"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
Expand Down Expand Up @@ -295,14 +292,11 @@
"$ref": "#/definitions/RoleAssignment"
}
},
"400": {
"description": "Bad Request - Indicates the request has missing information and can not be completed",
"default": {
"description": "error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/Error"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
},
"404": {
"description": "Not Found - Indicates the specified role has not been found"
}
},
"x-ms-examples": {
Expand Down Expand Up @@ -451,10 +445,10 @@
"$ref": "#/definitions/RoleAssignmentListResult"
}
},
"400": {
"description": "Bad Request - Indicates the request has missing information and can not be completed",
"default": {
"description": "error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/Error"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
Expand Down Expand Up @@ -503,10 +497,10 @@
"$ref": "#/definitions/RoleAssignmentListResult"
}
},
"400": {
"description": "Bad Request - Indicates the request has missing information and can not be completed",
"default": {
"description": "error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/Error"
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
Expand Down Expand Up @@ -717,25 +711,6 @@
"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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"name": "roleassignmentId"
}
},
"204": {},
"412": {}
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
}
]
}
},
"400": {
"body": {
"error": {
"code": "BadRequest",
"message": "Your request was badly formed please correct it and try again"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@
"type": "Microsoft.Authorization/roleAssignments",
"name": "raId"
}
},
"400": {
"body": {
"error": {
"code": "BadRequest",
"message": "Your request was badly formed please correct it and try again"
}
}
},
"404": {}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
}
]
}
},
"400": {
"body": {
"error": {
"code": "BadRequest",
"message": "Your request was badly formed please correct it and try again"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@
}
]
}
},
"400": {
"body": {
"error": {
"code": "BadRequest",
"message": "Your request was badly formed please correct it and try again"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,6 @@
"type": "Microsoft.Authorization/roleAssignments",
"name": "roleassignmentId"
}
},
"400": {
"body": {
"error": {
"code": "BadRequest",
"message": "Your request was badly formed please correct it and try again"
}
}
},
"409": {
"body": {
"error": {
"code": "ConflictError",
"message": "the request could not be completed due to a conflict with the current state of the target resource"
}
}
}
}
}
18 changes: 2 additions & 16 deletions specification/authorization/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ These are the global settings for the Authorization API.

``` yaml
openapi-type: arm
tag: package-2020-04-preview
tag: package-2020-04-01-preview-only
```
## Suppression
Expand Down Expand Up @@ -73,24 +73,10 @@ directive:
### Tag: package-2020-04-01-preview-only
These settings apply only when `--tag=package-2020-04-01-preview-only` is specified on the command line.

``` yaml $(tag) == 'package-2020-04-01-preview-only'
input-file:
- Microsoft.Authorization/preview/2020-04-01-preview/authorization-RoleAssignmentsCalls.json
```

### Tag: package-2020-04-preview

These settings apply only when `--tag=package-2020-04-preview` is specified on the command line.

``` yaml $(tag) == 'package-2020-04-preview'
``` yaml $(tag) == 'package-2020-04-01-preview-only'
input-file:
- Microsoft.Authorization/preview/2015-06-01/authorization-ClassicAdminCalls.json
- Microsoft.Authorization/stable/2015-07-01/authorization-ElevateAccessCalls.json
- Microsoft.Authorization/preview/2018-01-01-preview/authorization-ProviderOperationsCalls.json
- Microsoft.Authorization/preview/2018-01-01-preview/authorization-RoleDefinitionsCalls.json
- Microsoft.Authorization/preview/2018-07-01-preview/authorization-DenyAssignmentGetCalls.json
- Microsoft.Authorization/preview/2020-04-01-preview/authorization-RoleAssignmentsCalls.json
```

Expand Down

0 comments on commit 2e1ad0d

Please sign in to comment.