diff --git a/.github/issue_assignment.yml b/.github/issue_assignment.yml index db9ce6dfd4a2..b31a0e8a1880 100644 --- a/.github/issue_assignment.yml +++ b/.github/issue_assignment.yml @@ -1,12 +1,13 @@ --- - rule: - booleanFilterExpression: "needs-triage" + booleanFilterExpression: "Java" assignees: - - PhoenixHe-msft - - raych1 - - akning-ms - - leni-msft - ruowan - jianyexi - zhenglaizhang +- rule: + booleanFilterExpression: "Python" + assignees: + - ruowan + - PhoenixHe-msft diff --git a/.github/pull_request_assignment.yml b/.github/pull_request_assignment.yml index cae1b0e3f21d..3b2b0a413e3a 100644 --- a/.github/pull_request_assignment.yml +++ b/.github/pull_request_assignment.yml @@ -1,52 +1,50 @@ --- - rule: - # eventgrid data-plane PR - paths: - - "specification/eventgrid/data-plane/**" + paths: "documentation/**" reviewers: - - lmazuel - + - ruowan + - raych1 + +- rule: + paths: "specification/@(security|edgeorder|synapse)/**" + reviewers: + - ruowan + - rule: - # synapse data-plane PR - paths: - - "specification/synapse/data-plane/**" + paths: "specification/**/Microsoft.Network/**" reviewers: - - jonathandturner + - ruowan + - NullMDR + - Dreamgoing - rule: - # data-plane PR - paths: - - "specification/**/data-plane/**" + paths: + - "specification/@(containerservice|databricks|containerregistry|compute)/**" + - "specification/@(docker)/**" reviewers: - - anuchandy - - jhendrixMSFT - - tjprescott - + - ruowan + - Dreamgoing + - rule: - paths: - - "documentation/**" + paths: "specification/**/date-plane/**" reviewers: - - josefree - - akning-ms + - Dreamgoing +- rule: + paths: + - "specification/**/resource-manager/**" + reviewers: + - NullMDR + - ruowan - rule: - paths: - - "**/package.json" - - ".github/**" - - "**/azure-pipelines.yml" - - ".azure-pipelines/**" - - ".azure-pipelines-preproduction/**" + paths: + - "**/package.json" + - "package.json" reviewers: - - akning-ms - - PhoenixHe-msft - - raych1 - - zhenglaizhang + - ruowan - rule: - # manager-plane PR - paths: - - "**" + paths: "**" reviewers: - - allenjzhang - - markcowl + - ruowan diff --git a/specification/contoso/resource-manager/Microsoft.Contoso/preview/2020-12-21/contoso.json b/specification/contoso/resource-manager/Microsoft.Contoso/preview/2020-12-21/contoso.json new file mode 100644 index 000000000000..9a6f63881817 --- /dev/null +++ b/specification/contoso/resource-manager/Microsoft.Contoso/preview/2020-12-21/contoso.json @@ -0,0 +1,232 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-12-21", + "title": "contoso", + "description": "Description of the new service" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Contoso/foos/{fooName}": { + "get": { + "tags": [ + "Foos" + ], + "operationId": "Foos_Get", + "x-ms-examples": { + "BatchAccountDelete": { + "$ref": "./examples/OperationGroupGet.json" + } + }, + "description": "This is a sample get operation", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/FooName" + } + ], + "responses": { + "200": { + "description": "Describe the result of a successful operation.", + "schema": { + "$ref": "#/definitions/Result" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Contoso/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists all of the available RP operations.", + "operationId": "ListOperations", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Resource Provider error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "Result": { + "description": "Sample result definition", + "properties": { + "sampleProperty": { + "type": "string", + "description": "Sample property of type string" + } + } + }, + "Operation": { + "description": "A Consumption REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.Consumption.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: UsageDetail, etc.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "OperationListResult": { + "description": "Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of consumption operations supported by the Microsoft.Consumption resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "ErrorResponse": { + "description": "Error response.", + "properties": { + "error": { + "$ref": "#/definitions/ErrorDefinition", + "description": "The error details." + } + } + }, + "ErrorDefinition": { + "description": "Error definition.", + "properties": { + "code": { + "description": "Service specific error code which serves as the substatus for the HTTP error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Description of the error.", + "type": "string", + "readOnly": true + }, + "details": { + "description": "Internal error details.", + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDefinition" + }, + "readOnly": true + } + } + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The API version to be used with the HTTP request." + }, + "FooName": { + "name": "fooName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the Foo", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/contoso/resource-manager/Microsoft.Contoso/preview/2020-12-21/examples/OperationGroupGet.json b/specification/contoso/resource-manager/Microsoft.Contoso/preview/2020-12-21/examples/OperationGroupGet.json new file mode 100644 index 000000000000..67da0b2c0904 --- /dev/null +++ b/specification/contoso/resource-manager/Microsoft.Contoso/preview/2020-12-21/examples/OperationGroupGet.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sampleacct", + "resourceGroupName": "contosoClient", + "fooName": "foodName", + "api-version": "2020-12-21", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "sampleProperty": "sampleProperty" + } + } + } +} \ No newline at end of file diff --git a/specification/contoso/resource-manager/readme.azureresourceschema.md b/specification/contoso/resource-manager/readme.azureresourceschema.md new file mode 100644 index 000000000000..09cdd9a9cead --- /dev/null +++ b/specification/contoso/resource-manager/readme.azureresourceschema.md @@ -0,0 +1,23 @@ +## AzureResourceSchema + +These settings apply only when `--azureresourceschema` is specified on the command line. + +### AzureResourceSchema multi-api + +``` yaml $(azureresourceschema) && $(multiapi) +batch: + - tag: schema-contoso-2020-12-21 + +``` + +Please also specify `--azureresourceschema-folder=`. + +### Tag: schema-contoso-2020-12-21 and azureresourceschema + +``` yaml $(tag) == 'schema-contoso-2020-12-21' && $(azureresourceschema) +output-folder: $(azureresourceschema-folder)/schemas + +# all the input files in this apiVersion +input-file: + - Microsoft.Contoso/preview/2020-12-21/contoso.json +``` diff --git a/specification/contoso/resource-manager/readme.csharp.md b/specification/contoso/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..5c92cd99c572 --- /dev/null +++ b/specification/contoso/resource-manager/readme.csharp.md @@ -0,0 +1,15 @@ +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.Contoso + output-folder: $(csharp-sdks-folder)/contoso/management/Microsoft.Contoso/GeneratedProtocol +``` diff --git a/specification/contoso/resource-manager/readme.go.md b/specification/contoso/resource-manager/readme.go.md new file mode 100644 index 000000000000..f032ba09c1a4 --- /dev/null +++ b/specification/contoso/resource-manager/readme.go.md @@ -0,0 +1,26 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + namespace: contoso + clear-output-folder: true +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2020-12-21-preview +``` + +### Tag: package-2020-12-21-preview and go + +These settings apply only when `--tag=package-2020-12-21-preview --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +```yaml $(tag) == 'package-2020-12-21-preview' && $(go) +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2020-12-21/$(namespace) +``` diff --git a/specification/contoso/resource-manager/readme.md b/specification/contoso/resource-manager/readme.md new file mode 100644 index 000000000000..0862cc5d94c3 --- /dev/null +++ b/specification/contoso/resource-manager/readme.md @@ -0,0 +1,83 @@ +# contoso + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for contoso. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the contoso. + +```yaml +openapi-type: arm +tag: package-2020-12-21 +``` + +### Tag: package-2020-12-21 + +These settings apply only when `--tag=package-2020-12-21` is specified on the command line. + +```yaml $(tag) == 'package-2020-12-21' +input-file: + - Microsoft.Contoso/preview/2020-12-21/contoso.json +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-resource-manager-schemas + after_scripts: + - node sdkauto_afterscript.js contoso/resource-manager + - repo: azure-cli-extensions +``` +## Az + +See configuration in [readme.az.md](./readme.az.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + +## AzureResourceSchema + +See configuration in [readme.azureresourceschema.md](./readme.azureresourceschema.md) diff --git a/specification/contoso/resource-manager/readme.python.md b/specification/contoso/resource-manager/readme.python.md new file mode 100644 index 000000000000..7a1bac02e178 --- /dev/null +++ b/specification/contoso/resource-manager/readme.python.md @@ -0,0 +1,40 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + + +``` yaml $(python) +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + package-name: azure-mgmt-contoso + no-namespace-folders: true + package-version: 1.0.0b1 +``` + +``` yaml $(python-mode) == 'update' +python: + output-folder: $(python-sdks-folder)/contoso/azure-mgmt-contoso/azure/mgmt/contoso +``` +``` yaml $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/contoso/azure-mgmt-contoso +``` + +``` yaml $(python) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-contoso +no-namespace-folders: true +package-version: 1.0.0b1 +``` + +``` yaml $(python-mode) == 'update' && $(track2) +output-folder: $(python-sdks-folder)/contoso/azure-mgmt-contoso/azure/mgmt/contoso +``` +``` yaml $(python-mode) == 'create' && $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/contoso/azure-mgmt-contoso +``` diff --git a/specification/contoso/resource-manager/readme.typescript.md b/specification/contoso/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..05891a4d2a7b --- /dev/null +++ b/specification/contoso/resource-manager/readme.typescript.md @@ -0,0 +1,14 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +``` yaml $(typescript) +typescript: + azure-arm: true + package-name: "@azure/arm-contoso" + output-folder: "$(typescript-sdks-folder)/sdk/contoso/arm-contoso" + payload-flattening-threshold: 1 + clear-output-folder: true + generate-metadata: true +``` diff --git a/specification/iotspaces/resource-manager/readme.md b/specification/iotspaces/resource-manager/readme.md index 49a0a68b3682..a405b1f149dd 100644 --- a/specification/iotspaces/resource-manager/readme.md +++ b/specification/iotspaces/resource-manager/readme.md @@ -73,6 +73,7 @@ swagger-to-sdk: - repo: azure-sdk-for-go - repo: azure-sdk-for-js - repo: azure-sdk-for-node + - repo: azure-sdk-for-trenton - repo: azure-resource-manager-schemas after_scripts: - node sdkauto_afterscript.js iotspaces/resource-manager diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 8ed65a56f734..4575a6aa1938 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -24,7 +24,7 @@ These are the global settings for the Sql API. title: SqlManagementClient description: 'The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete databases.' openapi-type: arm -tag: package-composite-v4 +tag: package-pure-2018-06-preview ``` ### Composite packages @@ -1057,6 +1057,7 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-net + - repo: azure-sdk-for-trenton - repo: azure-sdk-for-python - repo: azure-sdk-for-java - repo: azure-sdk-for-go diff --git a/specificationRepositoryConfiguration.json b/specificationRepositoryConfiguration.json index 9733d1f05cd2..c14ab0b0b808 100644 --- a/specificationRepositoryConfiguration.json +++ b/specificationRepositoryConfiguration.json @@ -1,7 +1,7 @@ { "$schema": "https://openapistorageprod.blob.core.windows.net/sdkautomation/prod/schemas/specificationRepositoryConfiguration.schema.json", - "pipelineName": "automation - sdk", - "sdkRepositoryMappings": { + "pipelineName": "automation - sdk - test", + "sdkRepositoryMappings": { "azure-sdk-for-go": { "integrationRepository": "AzureSDKAutomation/azure-sdk-for-go", "mainRepository": "Azure/azure-sdk-for-go" @@ -43,37 +43,56 @@ } }, "overrides": { - "Azure/azure-rest-api-specs-pr": { + "openapi-env-test/azure-rest-api-specs": { "sdkRepositoryMappings": { - "azure-sdk-for-go": { - "integrationRepository": "azure-sdk/azure-sdk-for-go-pr", - "mainRepository": "Azure/azure-sdk-for-go-pr" + "azure-sdk-for-go": { + "mainRepository": "openapi-env-test/azure-sdk-for-go" + }, + "azure-sdk-for-java": { + "mainRepository": "openapi-env-test/azure-sdk-for-java", + "configFilePath": "eng/mgmt/automation/swagger_to_sdk_config.json" + }, + "azure-sdk-for-js": { + "mainRepository": "openapi-env-test/azure-sdk-for-js" + }, + "azure-sdk-for-net": { + "mainRepository": "openapi-env-test/azure-sdk-for-net" + }, + "azure-sdk-for-python": { + "mainRepository": "openapi-env-test/azure-sdk-for-python", + "mainBranch": "python-track1-test" + }, + "azure-sdk-for-python-track2": { + "mainRepository": "openapi-env-test/azure-sdk-for-python", + "mainBranch": "python-track2-test" + }, + "azure-cli-extensions": { + "mainBranch": "report-diff-test", + "mainRepository": "openapi-env-test/azure-cli-extensions" + }, + "azure-resource-manager-schemas": { + "mainRepository": "openapi-env-test/azure-resource-manager-schemas" + }, + "azure-sdk-for-net-shivangi": { + "mainRepository": "openapi-env-test/azure-sdk-for-net", + "mainBranch": "Shivangi_AutomationScript", + "configFilePath": "eng/swagger_to_sdk_config.json" + }, + "azure-sdk-for-python-lmazuel": { + "mainRepository": "openapi-env-test/azure-sdk-for-python", + "mainBranch": "LMazuel_AutomationScript" + }, + "azure-sdk-for-net-minghc": { + "mainRepository": "openapi-env-test/azure-sdk-for-net", + "mainBranch": "v-minghc_testScript" }, - "azure-sdk-for-java": { - "integrationRepository": "azure-sdk/azure-sdk-for-java-pr", - "mainRepository": "Azure/azure-sdk-for-java-pr", - "configFilePath": "eng/mgmt/automation/swagger_to_sdk_config.json" + "azure-sdk-for-trenton": { + "integrationRepository": "test-repo-billy/azure-sdk-for-trenton", + "mainRepository": "test-repo-billy/azure-sdk-for-trenton", + "mainBranch": "secondary" }, - "azure-sdk-for-js": { - "integrationRepository": "azure-sdk/azure-sdk-for-js-pr", - "mainRepository": "Azure/azure-sdk-for-js-pr" - }, - "azure-sdk-for-net": { - "integrationRepository": "azure-sdk/azure-sdk-for-net-pr", - "mainRepository": "Azure/azure-sdk-for-net-pr" - }, - "azure-sdk-for-python": { - "integrationRepository": "azure-sdk/azure-sdk-for-python-pr", - "mainRepository": "Azure/azure-sdk-for-python-pr", - "mainBranch": "release/v3" - }, - "azure-sdk-for-python-track2": { - "integrationRepository": "azure-sdk/azure-sdk-for-python-pr", - "mainRepository": "Azure/azure-sdk-for-python-pr" - }, - "azure-cli-extensions": { - "integrationRepository": "azure-sdk/azure-cli-extensions-pr", - "mainRepository": "Azure/azure-cli-extensions-pr" + "azure-powershell": { + "mainRepository": "openapi-env-test/azure-powershell" } } }