Skip to content
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.Support to add version preview/2021-06-01-preview #14586

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4155238
Adds base for updating Microsoft.Support from version stable/2020-04-…
mudit794 May 28, 2021
4ea49a8
Updates readme
mudit794 May 28, 2021
9aa927b
Updates API version in new specs and examples
mudit794 May 28, 2021
53fa22e
Add GetSupportTicketResourceId
mudit794 May 28, 2021
d4b2820
Delete CheckNameAvailabilityForSupportTicketCommunication.json
mudit794 May 28, 2021
b04603e
Delete specification/support/resource-manager/Microsoft.Support/previ…
mudit794 May 28, 2021
29ea76b
add example
mudit794 May 28, 2021
91c4036
list operations
mudit794 May 28, 2021
acaf92c
Update LookUpSupportTicketResourceId.json
mudit794 May 28, 2021
bc15d34
Update readme.md
mudit794 May 28, 2021
fdc47a7
Update support.json
mudit794 May 28, 2021
0702487
Update support.json
mudit794 May 28, 2021
458683a
Rename support.json to supportLookUpResourceId.json
mudit794 May 31, 2021
8b3c1d7
Rename supportLookUpResourceId.json to supportTicketsResourceIdDetail…
mudit794 May 31, 2021
e9b6f88
Update readme.md
mudit794 May 31, 2021
0c444e0
Update ListOperations.json
mudit794 Jun 1, 2021
1617d14
Update LookUpSupportTicketResourceId.json
mudit794 Jun 1, 2021
11e6a03
make swagger generic for resource id look up
mudit794 Jun 1, 2021
efbcc96
Update LookUpSupportTicketResourceId.json
mudit794 Jun 1, 2021
3d291ec
Update LookUpSupportTicketResourceId.json
mudit794 Jun 1, 2021
efd272d
Rename LookUpSupportTicketResourceId.json to LookUpResourceId.json
mudit794 Jun 1, 2021
da854cd
Update readme.md
mudit794 Jun 2, 2021
fb19ef5
Update LookUpResourceId.json
mudit794 Jun 2, 2021
bbbe9c1
Update LookUpResourceId.json
mudit794 Jun 2, 2021
9312336
Update supportResourceIdDetails.json
mudit794 Jun 2, 2021
10d244d
Update LookUpResourceId.json
mudit794 Jun 2, 2021
6cf7dc9
Update supportResourceIdDetails.json
mudit794 Jun 2, 2021
fbf89d3
Update supportResourceIdDetails.json
mudit794 Jun 2, 2021
3365fed
Update LookUpResourceId.json
mudit794 Jun 2, 2021
b010604
Update supportResourceIdDetails.json
mudit794 Jun 2, 2021
8e2a773
Update LookUpResourceId.json
mudit794 Jun 2, 2021
de31718
Update LookUpResourceId.json
mudit794 Jun 2, 2021
989a180
Update supportResourceIdDetails.json
mudit794 Jun 2, 2021
8a4e325
remove error code
mudit794 Jun 2, 2021
e9aaee5
Update supportResourceIdDetails.json
mudit794 Jun 2, 2021
10fa48f
Update LookUpResourceId.json
mudit794 Jun 2, 2021
1929a6a
Update supportResourceIdDetails.json
mudit794 Jun 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"api-version": "2021-06-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.Support/register/action",
"display": {
"description": "Registers Support Resource Provider",
"operation": "Registers Support Resource Provider",
"provider": "Registers Support Resource Provider",
"resource": "Support Registration"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"api-version": "2020-06-01-preview",
"lookUpResourceIdRequest": {
"type": "Microsoft.Support/supportTickets",
"identifier": "1234668596"
}
},
"responses": {
"200": {
"body": {
"resourceId": "/subscriptions/subId/providers/Microsoft.Support/supportTickets/SupportTicketName"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
{
"swagger": "2.0",
"info": {
"version": "2021-06-01-preview",
"title": "Microsoft.Support",
"description": "Microsoft Azure Support Resource Provider."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"flow": "implicit",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"scopes": {
"user_impersonation": "impersonate your user account"
},
"type": "oauth2",
"description": "Azure Active Directory OAuth2 Flow."
}
},
"paths": {
"/providers/Microsoft.Support/operations": {
"get": {
"tags": [
"Operations"
],
"description": "This lists all the available Microsoft Support REST API operations.",
"operationId": "Operations_List",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved list of operations.",
"schema": {
"$ref": "#/definitions/OperationsListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ExceptionResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
},
"x-ms-examples": {
"Get all operations": {
"$ref": "./examples/ListOperations.json"
}
}
}
},
"/providers/Microsoft.Support/lookUpResourceId": {
"post": {
"tags": [
"SupportTickets"
],
"summary": "This operation fetches ARM resource id of support resource type.",
"operationId": "LookUpResourceId_Post",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "lookUpResourceIdRequest",
"in": "body",
"description": "Look up resource id request body",
"required": true,
"schema": {
"$ref": "#/definitions/LookUpResourceIdRequest"
}
}
],
"responses": {
"200": {
"description": "OK. Successfully obtained resource id of support resource type.",
"schema": {
"$ref": "#/definitions/LookUpResourceIdResponse"
}
},
"default": {
mudit794 marked this conversation as resolved.
Show resolved Hide resolved
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ExceptionResponse"
}
}
},
"deprecated": false,
"x-ms-examples": {
"Look up resource id of support resource type": {
"$ref": "./examples/LookUpResourceId.json"
}
}
}
}
},
"definitions": {
"OperationsListResult": {
"description": "The list of operations supported by Microsoft Support resource provider.",
"properties": {
"value": {
"description": "The list of operations supported by Microsoft Support resource provider.",
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
}
}
}
},
"Operation": {
"description": "The operation supported by Microsoft Support resource provider.",
"type": "object",
"properties": {
"name": {
"description": "Operation name: {provider}/{resource}/{operation}.",
"type": "string",
"readOnly": true
},
"display": {
"description": "The object that describes the operation.",
"properties": {
"description": {
"description": "The description of the operation.",
"type": "string",
"readOnly": true
},
"operation": {
"description": "The action that users can perform, based on their permission level.",
"type": "string",
"readOnly": true
},
"provider": {
"description": "Service provider: Microsoft Support.",
"type": "string",
"readOnly": true
},
"resource": {
"description": "Resource on which the operation is performed.",
"type": "string",
"readOnly": true
}
}
}
}
},
"LookUpResourceIdRequest": {
"description": "The look up resource Id request body",
"type": "object",
"properties": {
"identifier": {
"description": "The System generated Id that is unique. Use supportTicketId property for Microsoft.Support/supportTickets resource type.",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Microsoft.Support/supportTickets"
],
"x-ms-enum": {
"name": "Type",
"modelAsString": false
},
"description": "The type of resource."
}
}
},
"LookUpResourceIdResponse": {
"description": "The look up resource id response",
"type": "object",
"properties": {
"resourceId": {
"description": "The resource Id of support resource type.",
"type": "string"
}
}
},
"ExceptionResponse": {
"type": "object",
"properties": {
"error": {
"$ref": "#/definitions/ServiceError",
"description": "The API error details."
}
},
"description": "The API error."
},
"ServiceError": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The error code."
},
"message": {
"type": "string",
"description": "The error message."
},
"target": {
"type": "string",
"description": "The target of the error."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/ServiceErrorDetail"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ServiceErrorDetail

The ARM error definition is completely recursive, so this could be a reference to ServiceError. In general, you should avoid declaring your own definitions for common contracts and reference them out of common types v2 area of the repo. (This comment doesn't block the PR, though.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed error code from manifest and example

},
"description": "The list of error details.",
"readOnly": true
}
},
"description": "The API error details."
},
"ServiceErrorDetail": {
"type": "object",
"properties": {
"code": {
"type": "string",
"readOnly": true,
"description": "The error code."
},
"message": {
"type": "string",
"readOnly": true,
"description": "The error message."
},
"target": {
"type": "string",
"description": "The target of the error."
}
},
"description": "The error details."
}
},
"parameters": {
"SubscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"required": true,
"type": "string",
"description": "Azure subscription Id."
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "API version."
}
}
}
28 changes: 18 additions & 10 deletions specification/support/resource-manager/readme.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,48 @@
# Support

> see https://aka.ms/autorest
This is the AutoRest configuration file for Support.


---
## Getting Started

## Getting Started

To build the SDK for Support, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest`
To see additional help and options, run:

> `autorest --help`
---

## Configuration

### Basic Information

### Basic Information
These are the global settings for the Support API.

``` yaml
openapi-type: arm
tag: package-2020-04
```
### Tag: package-preview-2021-06
These settings apply only when `--tag=package-preview-2021-06` is specified on the command line.

```yaml $(tag) == 'package-preview-2021-06'
input-file:
- Microsoft.Support/preview/2021-06-01-preview/supportResourceIdDetails.json
```
### Tag: package-2020-04

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

```yaml $(tag) == 'package-2020-04'
``` yaml $(tag) == 'package-2020-04'
input-file:
- Microsoft.Support/stable/2020-04-01/support.json
```
Expand All @@ -46,8 +57,8 @@ input-file:
```

---
# Code Generation

# Code Generation

## Swagger to SDK

Expand All @@ -68,7 +79,7 @@ swagger-to-sdk:
- repo: azure-resource-manager-schemas
```

## C#
## C#

See configuration in [readme.csharp.md](./readme.csharp.md)

Expand All @@ -91,6 +102,3 @@ See configuration in [readme.typescript.md](./readme.typescript.md)
## Ruby

See configuration in [readme.ruby.md](./readme.ruby.md)